« De-crufting the new Facebook with Adblock Plus | Main
November 7, 2009
Fixing sound issues with Flash in Ubuntu and Kubuntu Karmic on an Intel sound card
Looks like it's time for yet another post about how I solved some obscure technical issues!
Since upgrading my Kubuntu installation to 9.10 (Karmic Koala) a few days ago, I had been experiencing problems with sound. Firstly, loud popping noises would come out of my speakers every few seconds when no audio was playing, as if the sound system was sending bursts of random junk to the sound card. Secondly, Flash media in Firefox wouldn't produce any sound.
The first issue is with Pulseaudio and HDA Intel audio controllers. By default, Pulseaudio tells the sound card to power down after ten idle seconds; unfortunately, it seems that this causes loud pops to be emitted. The solution is:
In /etc/modprobe.d/alsa-base and /etc/modprobe.d/alsa-base.conf, look for and comment out (add a "#" to the start of the line) the following line:
options snd-hda-intel power_save=10 power_save_controller=N
Note: These files are system files, so you will need to have root (administrator) privileges to edit them. This is typically achieved by opening a console and typing sudo [editor] /path/to/file ; the [editor] should be replaced by the name of whatever console-based text editing program you have, typically nano, pico or my personal choice, joe.
Fixing sound in Flash was trickier. The first step was to make sure I had the latest correct Flash package for [K]Ubuntu. I had a package called adobe-flashplugin installed, and attempting to remove it using apt-get resulted in the following error message:
update-alternatives: error: no alternatives for iceape-flashplugin.
A little research revealed the following: firstly, that adobe-flashplugin is not the correct Flash package. I suspect that it's the version that Adobe themselves offer from their website, which I must have installed at some point. Secondly, that it comes with a script that it tries to run before the package is removed, and that script it is very much broken. The solution, as I was able to adapt from this bug report, was as follows:
sudo rm /var/lib/dpkg/info/adobe-flashplugin.prerm sudo apt-get remove adobe-flashplugin sudo apt-get install flashplugin-installer flashplugin-nonfree-extrasound
The final step, which I derived from this Ubuntu Forums posting by klemes, was to go back to /etc/modprobe.d/alsa-base and /etc/modprobe.d/alsa-base.conf, and add the following line:
options snd-hda-intel model=auto
(Again, the problem seemed to be related to my HDA Intel sound card.) Follow this by running the command sudo alsa reload in a terminal, and restart Firefox. Hopefully now you should have sound back in Flash.
What a lot of hoo-ha! If you've needed to read this, I hope it saved you some trouble.
Posted by hex at 11:15 AM in: Flash, Kubuntu, Linux, Ubuntu, howto, sound