Daniel Leidert: Getting the audio over HDMI to work for the HP N54L microserver running Debian Wheezy and a Sapphire Radeon HD 6450
Conclusion: Sound over HDMI works with the Sapphire Radeon HD 6450 card in my HP N54L microserver. It requires a recent kernel and firmware from Wheezy 7.7 backports and the X.org server. There is no sound without X.org, even if audio has been enabled for the radeon kernel module. Last year I couldn't get audio over HDMI to work after I installed a Sapphire Radeon HD 6450 1 GB (
11190-02-20g) card into my N54L microserver. The cable that connects the HDMI interfaces between the card and the TV monitor supports HDMI 1.3, so audio should have been possible even then. However, I didn't get any audio output by XBMC playing video or music files. Nothing happened with stock Wheezy 7.1 and X.org/XBMC installed. So I removed the latter two and used the server as stock server without X/desktop and delayed my plans for an HTPC.Now I tried again after I found some new hints, that made me curious for a second try :) Imagine my joy, when (finally) speaker-test produced noise on the TV! So here is my configuration and a step-by-step guide to- enable Sound over HDMI for the Radeon HD 6450
- install a graphical environment
- install XBMC
- automatically start XBMC on boot
# apt-get autoremove --purge pulseaudio pulseaudio-utils pulseaudio-module-x11 gstreamer0.10-pulseaudioNext I installed a recent linux kernel and recent firmware from Wheezy backports:
# apt-get install alsa-base alsa-utils alsa-oss
# apt-get install -t wheezy-backports linux-image-amd64 firmware-linux-free firmware-linux firmware-linux-nonfree firmware-atheros firmware-bnx2 firmware-bnx2xThis put linux-image-3.16-0.bpo.3-amd64 and recent firmware onto my system. I've chosen to upgrade linux-image-amd64 instead to pick a special (recent) linux kernel package from Wheezy backports to keep up-to-date with recent kernels from there.Then I enabled the audio output of the kernel radeon module. Essentially there are at least three ways to do this. I use the one to modify /etc/modules.d/radeon.conf and set the audio parameter there. The hw_i2c parameter is disabled. I read, that it might cause trouble with the audio output here although I never personally experienced it:
options radeon audio=1 hw_i2c=0JFTR: This is how I boot the N54L by default:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force pcie_aspm=force nmi_watchdog=0"After rebooting I see this for the Radeon card in question:
At this point, without having the X.org server installed, I still have no audio output to the connected monitor. Running alsamixer I only see the S/PDIF bar for the HDA ATI HDMI device, showing a value of
# lsmod egrep snd\ radeon\ drm awk ' print $1 ' sort
[..]
drm
drm_kms_helper
i2c_algo_bit
i2c_core
radeon
snd
snd_hda_codec
snd_hda_codec_hdmi
snd_hda_controller
snd_hda_intel
snd_hwdep
snd_pcm
snd_seq
snd_seq_device
snd_timer
soundcore
ttm
[..]
# lspci -k
[..]
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM]
Subsystem: PC Partner Limited / Sapphire Technology Device e204
Kernel driver in use: radeon
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Caicos HDMI Audio [Radeon HD 6400 Series]
Subsystem: PC Partner Limited / Sapphire Technology Radeon HD 6450 1GB DDR3
Kernel driver in use: snd_hda_intel
[..]
# cat /sys/module/radeon/parameters/audio
1
# cat /sys/module/radeon/parameters/hw_i2c
0
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 0/1
Subdevice #0: subdevice #0
# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
hdmi:CARD=HDMI,DEV=0
HDA ATI HDMI, HDMI 0
HDMI Audio Output
00. I can mute and un-mute this device but not change the value. No need to worry, sound comes with step two. Step 2 - Install a graphical environment (X.org server)Next is to install a graphical environment, basically the X.org server. This is done in Debian by the desktop task. Unfortunately tasksel makes use of APT::Install-Recommends="true" and would install a desktop environment and some more recommended packages. At the moment I don't want this, only X. So basically I installed only the task-desktop package with dependencies:
# apt-get install task-desktop xfonts-cyrillicNext is to install a display manager. I've chosen lightdm:
# apt-get install lightdm accountsserviceDone. Now (re-)start the X server. Simply ...
# service lightdm restart... should do. And now there is sound, probably due to the X.org Radeon driver. The following command created noise on the two monitor speakers :)
# speaker-test -c2 -D hdmi:0 -t pinkFinally there is sound over HDMI! Step 3 - Install XBMC To be continued ...
Apparently, people care when you, as privileged person (white, male,
long-time Debian Developer) throw in the towel because the amount of
crap thrown your way just becomes too much. I guess that's good, both
because it gives me a soap box for a short while, but also because if
enough people talk about how poisonous the well that Debian is has
become, we can fix it.
This morning, I resigned as a member of the systemd maintainer team.
I then proceeded to leave the relevant IRC channels and announced this
on twitter. The responses I've gotten have been almost all been
heartwarming. People have generally been offering hugs, saying thanks
for the work put into systemd in Debian and so on. I've greatly
appreciated those (and I've been getting those before I resigned too,
so this isn't just a response to that). I feel bad about leaving the
rest of the team, they're a great bunch: competent, caring, funny,
wonderful people. On the other hand, at some point I had to draw a
line and say "no further".
Debian and its various maintainer teams are a bunch of tribes (with
possibly Debian itself being a supertribe). Unlike many other
situations, you can be part of multiple tribes. I'm still a member of
the DSA tribe for instance. Leaving pkg-systemd means leaving one of
my tribes. That hurts. It hurts even more because it feels like a
forced exit rather than because I've lost interest or been distracted
by other shiny things for long enough that you don't really feel like
part of a tribe. That happened with me with debian-installer. It was
my baby for a while (with a then quite small team), then a bunch of
real life thing interfered and other people picked it up and ran with
it and made it greater and more fantastic than before. I kinda lost
touch, and while it's still dear to me, I no longer identify as part
of the debian-boot tribe.
Now, how did I, standing stout and tall, get forced out of my tribe?
I've been a DD for almost 14 years, I should be able to weather any
storm, shouldn't I? It turns out that no, the mountain does get worn
down by the rain. It's not a single hurtful comment here and there.
There's a constant drum about this all being some sort of conspiracy
and there are sometimes flares where people wish people involved in
systemd would be run over by a bus or just accusations of
incompetence.
Our code of conduct says, "assume good faith". If you ever find
yourself not doing that, step back, breathe. See if there's a
reasonable explanation for why somebody is saying something or
behaving in a way that doesn't make sense to you. It might be as
simple as your native tongue being English and their being something
else.
If you do genuinely disagree with somebody (something which is
entirely fine), try not to escalate, even if the stakes are high.
Examples from the last year include talking about this as a war and
talking about "increasingly bitter rear-guard battles". By using and
accepting this terminology, we, as a project, poison ourselves.
Big changes are always a complicated thing to get done and can be the harder the bigger or more diverse an organization is it is taking place in.
Transparency
Ideally every change is well communicated early and openly.
Leaving people in the dark about what will change and when means people have much less time to feeling comfortable about it or arranging with it mentally.
Especially bad can be extending the change later or or shortening transition periods.
Letting people think they have some time to transition only to force them to rush later will remove any credibility you have and severely reduce their ability to believe you are not crossing them.
Making a new way optional is a great way to create security (see below), but making that obligatory before the change even arrives as optional with them will not make them very willing to embrace change.
Take responsibility
Every transformation means costs.
Even if some change did only improve and did not make anything worse once implemented (the ideal change you will never meet in reality), the deployment of the change still costs:
processes have adapted to it, people have to relearn how to do things, how to detect if something goes wrong, how to fix it, documentation has to be adopted and and and.
Even as the change causes more good than costs in the whole organization (let's hope it does, I hope you wouldn't try to do something if the total benefit is negative), the benefits and thus the benefit to cost ratio will differ for the different parts of your organization or the different people within it.
It's hardly avoidable that for some people there will not be much benefit, much less perceived benefit compared to the costs they have to burden for it.
Those are the people whose good will you want to fight for, not the people you want to fight against.
They have to pay with their labor/resources and thus their good will for your benefit the overall benefit.
This is much easier if you acknowledge that fact.
If you blame them for having the costs, claim their situation does not even exist or even ridicule them for not embracing change you only prepare yourself for frustration.
You might be able to persuade yourself that everyone that is not willing to invest in the change is just acting out of malevolent self-interest.
But you will hardly be able to persuade people that it is evil to not help your cause if you treat them as enemies.
And once you ignored or played down costs that later actually happen, your credibility in being able to see the big picture will simply cease to exist at all for the next change.
Allow different metrics
People have different opinions about priorities, about what is important, about how much something costs and even about what is a problem.
If you want to persuade them, try to take that into account.
If you do not understand why something is a reason, it might be because the given point is stupid. But it might also be that you miss something. And often there is simple a different valuation of what is important, what the costs are and what are problems.
If you want to persuade people, it is worth to try to understand those.
If all you want to do is persuade some leader or some majority then ridiculing their concerns might get you somewhere.
But how do you want to win people over if you do not even appear to understand their problems.
Why should people trust you that their costs will be worth the overall benefits if you tell them the costs that they clearly see do not exist? How credible is referring to the bigger picture if the part of the picture they can see does not match what you say the bigger picture looks like?
Don't get trolled and don't troll
There will always be people that might be unreasonable or even try to provoke you. Don't allow being provoked. Remember that for successful changes you need to win broad support. Feeling personally attacked or feeling presented a large amount of pointless arguments easily results in not bringing proper responses or actually looking at arguments.
If someone is only trolling and purely malevolent, they will tease you best if they bring actual concerns of people in a way you likely degrade your yourself and your point in answering.
Becoming impertinent with the troll is like attacking the annoying little goblin hiding next to the city guards with area damage.
When not being able to persuade people, it is also far to easy to consider them in bad faith and/or attacking them personally. This can only escalate even more. Worst case you frustrate someone in good faith. In most cases you poison the discussion so much that people actually in good faith will no longer contribute the discussion. It might be rewarding short term because after some escalation only obviously unreasonable people will talk against you, but it makes it much harder to find solutions together that could benefit anyone and almost impossible to persuade those that simply left the discussion.
Give security
Last but not least, remember that humans are quite risk-averse. In general they might invest in (even small) chances to win, but go a long way to avoid risks.
Thus an important part of enabling change is to reduce risks, real and perceived ones and give people a feeling of security.
In the end, almost every measure boils down to that:
You give people security by giving them the feeling that the whole picture is considered in decisions (by bringing them early into the process, by making sure their concerns are understood and part of the global profit/cost calculation and making sure their experiences with the change are part of the evaluation).
You give people security by allowing them to predict and control things (by transparency about plans, how far the change will go and guaranteed transitions periods, by giving them enough time so they can actually plan and do the transition).
You give people security by avoiding early points of no return (by having wide enough tests, rollback scenarios,...).
You give people security by not letting them alone (by having good documentation, availability of training, ...).
Especially side-by-side availability of old and new is an extremely powerful tool, as it fits all of the above:
It allows people to actually test it (and not some little prototype mostly but not quite totally unrelated to reality) so their feedback can be heard. It makes it more predictable as all the new ways can be tried before the old ones no longer work. It is the ultimate role-back scenario (just switch off the new). And allows for learning the new before losing the old.
Of course giving the people a feeling of security needs resources. But it is a very powerful way to get people to embrace the chance.
Also in my experience people only fearing for themselves will usually mostly be passive by not pushing forward and trying to avoid or escape the changes.
(After all, working against something costs energy, so purely egoistic behavior is quite limiting in that regard).
Most people actively pushing back do it because they fear for something larger than only them. And any measure to making them fear less that you ruin the overall organization, not only avoids unnecessary hurdles rolling out the change but also has some small chance to actually avoid running into disaster with closed eyes.
A common way to build a firewall ruleset is to run a shell script
calling
Some of you may already be aware of the

I left Debian. I don't really have a lot to say about why, but I do
want to clear one thing up right away. It's not about systemd.
As far as systemd goes, I agree with my friend John Goerzen:
Like 

There s a lot of discussion / moaning /arguing at this time, so I thought I d post something about how LAVA got into Debian Jessie, the work involved and the lessons I ve learnt. Hopefully, it will help someone avoid the disappointment of having their package missing the migration into a future stable release. This was going to be a talk at the Minidebconf-uk in Cambridge but I decided to put this out as a permanent blog entry in the hope that it will be a useful reference for the future, not just Jessie.
Context
LAVA relies on a number of dependencies which were at the time all this started NEW to Debian as well as many others already in Debian. I d been running LAVA using packages on my own system for a few months before the packages were ready for use on the main servers (I never actually installed LAVA using the old virtualenv method on my own systems, except in a VM). I did do quite a lot of this on my own but I also had a team supporting the effort and valuing the benefits of moving to a packaged system.
At the time, LAVA was based on Ubuntu (12.04 LTS Precise Pangolin) and a new Ubuntu LTS was close (Trusty Tahr 14.04) but I started work on this in 2013. By the time my packages were ready for general usage, it was winter 2013 and much too close to get anything into Ubuntu in time for Trusty. So I started a local repo using space provided by Linaro. At the same time, I started uploading the dependencies to Debian. json-schema-validator, django-testscenarios and others arrived in April and May 2014. (Trusty was released in April). LAVA arrived in NEW in May, being accepted into unstable at the end of June. LAVA arrived in testing for the first time in July 2014.
Upstream development continued apace and a regular monthly upload, with some hotfixes in between, continued until close to the freeze.
At this point, note that although upstream is a medium sized team, the Debian packaging also has a team but all the uploads were made by me. I planned ahead. I knew that I would be going to Macau for Linaro Connect in February a critical stage in the finalisation of the packages and the migration of existing instances from the old methods. I knew that I would be on vacation from August through to the end of September 2014 including at least two weeks with absolutely no connectivity of any kind.
Right at this time, Django1.7 arrived in experimental with the intent to go into unstable and hence into Jessie. This was a headache for me, I initially sought to delay the migration until after Jessie. However, we discussed it upstream, allocated time within the busy schedule and also sought help from within Debian with the RFH tag. Rapha l Hertzog contributed patches for django1.7 support and we worked on those patches upstream, once I was back from vacation. (The final week of my vacation was a work conference, so we had everyone together at one hacking table.)
Still there was more to do, the django1.7 patches allowed the unit tests to complete but broke other parts of the lava-server package and needed subsequent tweaks and fixes.
Even with all this, the auto-removal from testing for packages affected by RC bugs in their dependencies became very important to monitor (it still is). It would be useful if some packages had less complex dependency chains (I m looking at you, uwsgi) as the auto-removal also covers build-depends. This led to some more headaches with libmatheval. I m not good with functional programming languages, I did have some exposure to Scheme when working on Gnucash upstream but it wasn t pleasant. The thought of fixing a scheme problem in the test suite of libmatheval was daunting. Again though, asking for help, I found people in the upstream team who wanted to refresh their use of scheme and were able to help out. The fix migrated into testing in October.
Just for added complications, lava-server gained a few RC bugs of it s own during that time too fixed upstream but awkward nonetheless.
Achievement unlocked
So that s how a complex package like lava-server gets into stable. With a lot of help. The main problem with top-level packages like this is the sheer weight of the dependency chain. Something seemingly unrelated (like libmatheval) can seriously derail the migrations. The package doesn t use the matheval support provided by uwsgi. The bug in matheval wasn t in the parts of matheval used by uwsgi. It wasn t in a language I am at all comfortable in fixing but it s my name on the changelog of the NMU. That happened because I asked for help. OK, when django1.7 was scheduled to arrive in Debian unstable and I knew that lava was not ready, I reacted out of fear and anxiety. However, I sought help, help was provided and that help was enough to get upstream to a point where the side-effects of the required changes could be fixed.
Maintaining a top-level package in Debian is becoming more like maintaining a core package in Debian and that is a good thing. When your package has a lot of dependencies, those dependencies become part of the maintenance workload of your package. It doesn t matter if those are install time dependencies, build dependencies or reverse dependencies. It doesn t actually matter if the issues in those packages are in languages you would personally wish to be expunged from the archive. It becomes your problem but not yours alone.
Debian has a lot of flames right now and Enrico encouraged us to look at what else is actually happening in Debian besides those arguments. Well, on top of all this with lava, I also did what I could to help the arm64 port along and I m very happy that this has been accepted into Jessie as an official release architecture. That s a much bigger story than LAVA yet LAVA was and remains instrumental in how arm64 gained the support in the kernel and various upstreams which allowed patches to be accepted and fixes to be incorporated into Debian packages.
So a roll call of helpers who may otherwise not have been recognised via changelogs, in no particular order:
Meet Alfred. Alfred is a Debian user. He has a laptop with Debian and
a desktop environment running on it. Alfred does a lot of impotant
things on his computer: his hobby is to photograph his cat, and also
he works for a non-governmental organisation that investigates and
reports on human rights violations. His job involves a lot of travel
to many parts of the world, and he needs to handle a lot of very
sensitive information. His laptop uses full-disk encryption, and it's
generally speaking very well secured against the various security
threats that are due to his job.
He is worried about losing important data. He's not too worried that
the sensitive information he has will leak if his laptop is stolen,
but it might be impossible to re-create the data if the laptop is
gone. If he interviews a whistleblower for a slave-trading
corporation, and his laptop is stolen after that, it might be
impossible to ever meet with the whistleblower again.
Alfred wants backups of his data. He gets a USB thumb drive, and
plugs it in. The laptop has never seen the drive before, so it asks
Alfred if the drive should be used for backups. Alfred says yes.
The laptop formats the thumb drive, again with full-disk encryption,
and then runs a backup. The backup automatically picks up all the
files from Alfred's home directory, and some system confguration files
that may be necessary as well. (Read: /home and /etc.) Files that are
usually not very precious, such as web browser caches, are
automatically excluded.
Later, when Alfred wants to update the backup, he plugs in the same
drive again. The system recognises the drive, and runs the backup.
While the backup is running, Alfred has an indicator in his desktop
status bar. If Alfred leaves the drive plugged in, and changes
anything in his home directory, that gets immediately backed up to the
backup drive. Until the changes have been backed up, the indicator
stays on Alfred's status bar.
This isn't good enough, however. Alfred needs to carry the USB drive
with him, and if he's mugged, he might lose both the laptop and the
backup drive. Therefore, the system administrator at Alfred's NGO,
Janet, sets up an account on an online backup server, and e-mails
Alfred a configuration file, which Alfred drops into the backup
system's configuration tool.
From then on, whenever Alfred's laptop is online, and can see the
backup server (identified by an SSH host key), any changes Alfred
makes are backed up as soon as possible. For the next interview, as
soon as the interview is finished and Alfred closes the laptop lid to
suspend it, the backup has already finished, both to the online server
and the USB thumb drive.
Alfred is now happy, and no longer fears for the safety of his data.
Janet, however, is still a little worried, because the online backup
server is an attractive target for attacks. She asks Alfred to
configure the backup service on the laptop to encrypt and digitally
sign the backups, and sends the master backup public key with the
request. Janet keeps the corresponding private key in a secure
location.
Alfred goes into the configuration dialog, ticks the right box, and
drops in the server public key. The backup software generates a new
public key for the laptop to use for encrypting the backups, and
Alfred e-mails that to Janet, using PGP encrypted and signed e-mail.
He also puts the laptop backup encryption keys on a couple of USB
thumb drives, which he stores in safe places (in his sock drawer and
coffee jar, but don't tell anyone that).
Alfred's online backups are now encrypted with public keys so that
both Alfred and Janet can decrypt them, but only they can do that. The
backups are digitally signed so that if the server is hacked, the
backups can't be altered without it being detectable.
Some time passes.
Alfred needs to go to speak to the general assembly of the Cat
Conference, about how awesome his cat is. This requires him to travel
to the US, and he's worried that the US authorities will confiscate
his laptop and try to get at his work files that way. He deletes all
his work files, ssh keys, and other files that aren't necessary to
show his cat pictures at the conference.
The conference goes fine, and when Alfred comes back home, he gets the
USB thumb drive that contains his backup encryption key. He plugs it
in, tells the backup configuration software to import it. Alfred can
then open his backups on the online backup server in his file browser,
and can restore back his files by copying them with drag and drop.
However, the next day Alfred's cat, upset at how much he travels, pees
on the laptop. It is ruined. Everything is lost.
Alfred gets a new laptop from Janet, and installs Debian on it. During
installation, Alfred gives the installer the USB backup drive, and the
installer restores all of Alfred's own files, and also restores system
configuration. After a little while, Alfred has a newly installed
laptop with all his usual software and all of his files.
