Tuesday, May 4, 2010

Ubuntu - a problem with two souncards

So I got a brand spanking new Kubuntu 10.04 installed on my desktop PC.
After a few days I noticed I have some intermittent problems with sound - sometimes Youtube videos were mute and sometimes everything was OK. Tried to reinstall flash plugin but there was no change.
I figured out there might be a problem with two sound cards in my machine.
I have an on-board Intel HDA sound card and a PCI Creative X-Fi Fatality. During the start of the system - in some cases the primary card was X-Fi and in other cases it was HDA.
Since for quite some time X-Fi drivers work in Ubuntu out-of-the-box then HDA audio was redundant.
How to disable it from Ubuntu (I could  probably have done it from BIOS)?
First - list soundcards in your system (in terminal):
more /proc/asound/modules


the output I got was:

0 snd_hda_intel
1 snd_ctxfi

How to get rid of HDA?

You have to edit the file: /etc/modprobe.d/blacklist.conf

In my case - I press: Alt + F2 and enter kdesu kate in the command prompt.
I opened the aforementioned blacklist.conf file and added the following line at the end:
 # Disable onboard HDA audio
blacklist snd_hda_intel

Save, restart, back to the terminal:
more /proc/asound/modules

0 snd_ctxfi

Success?