HdaIntelSoundHowto - Community Help Wiki
As of 2012, much of the information on this page is outdated. Please refer to the official sound debugging guide and Ubuntu Audio Development team's pages for more up-to-date information.
If your boot hangs on loading the module for snd-hda-intel, try disabling the card in your BIOS. It is called "HD Audio Controller", "Azalia Audio" or similar. Then try solving the problem using the instructions below.
Identify the Problem
Most cards seem to work as of Ubuntu 9.04 or later using the stock kernel. However, the following problems might occur on some setups:
- No sound at all
- Low volume output
- High pitched noise
- Poor sound quality
- Sound disappears when touching volume controls
- Sound works at random after each reboot
- No mic working
- Sound only plays through headphones or internal speakers (not through attached audio sets)
Manually Specify Module Parameters
- First you must find which model of sound card you use, so run this command:
cat /proc/asound/card0/codec* | grep Codec
It will return model of your sound card(s), for example: "Codec: Realtek ALC260", so your sound card is ALC260.
- You should open a file in ALSA documentation. This file is here:
- or if that file does not exist, try:
or check: HD-Audio-Models
(If you compiled your own kernel or ALSA modules, the documentation for your version can probably be found in the source package you used)
- Search for your model, and take a look at its types, for example I found the following lines for ALC260:
hp HP machines hp-3013 HP machines (3013-variant) fujitsu Fujitsu S7020 acer Acer TravelMate basic fixed pin assignment (old default model) auto auto-config reading BIOS (default)
Read all of them and try to find the one which is more similar to your sound card, for example if you have a laptop, you can choose "acer".
- Open /etc/modprobe.d/alsa-base with the following command:
sudo nano /etc/modprobe.d/alsa-base
- In Ubunty Jaunty and more recent, the file ends with .conf :
sudo nano /etc/modprobe.d/alsa-base.conf
Then paste the following line at the end of the file (change MODEL with the type of sound card's model, in our example it should be "acer" (without quotation marks)):
options snd-hda-intel model=MODEL
sudo alsa force-reload
Suitable options for many popular laptop models can be found in this forum thread
I'd like to add an example to clarify: my mic did not work under Ubuntu (whereas playback did and the mic itself worked under Vista). I actually found out that my Realtek audio codec was ALC269 by typing
(and/or by looking into Vista Control Panel (Sound)). Looking at the ALSA-Configuration.txt this corresponds to model basic, so I added
options snd-hda-intel model=basic
at the end of /etc/modprobe.d/alsa-base and rebooted.
Playing with probe_mask
Another possible option is the 'probe_mask' parameter, which has been known to fix sound issues characterized by the occurrence of "azx_get_response timeout, switching to single_cmd mode" messages reported with 'dmesg'. Try either "probe_mask=1" or "probe_mask=8" by adding a line like:
options snd-hda-intel probe_mask=1
For detailed information about this problem, see More Notes on HD-Audio Driver by Takashi Iwai, section 2.2. "Codec-Probing Problem".
Choosing Your Model
The full list of models is available in ALSA-Configuration.txt in the subdirectory /alsa-kernel/Documentation/ of the alsa-driver-1.0.14 directory you created. Note that this list is ordered on modules and codec chips. To find your codec use this command from a terminal:
If one of those worked but was not autodetected, you can help the alsa developers by sending them the output of lspci -nv and the model you used on Alsa BTS.
Wrong mixer in use: Sometimes the volume control chooses the OSS mixer if the compatibility module is loaded. You may need to right click on the volume control applet in your gnome-panel and go to the preferences and change the device to the one called Alsa Mixer. The same applies to the gnome volume control program.
Mixer doesn't seem to work: The HD Audio standard has many output channels. As a result, the correct volume sliders might not be visible. Enable the volume sliders through Edit->Preferences in gnome volume control.
No mic working, rest OK: Firstly, check if muting one of two microphone channels makes a difference. This is usually front right, but on some occasions also works with muting front left. Follow this hyperlink to section "Increasing very low microphone input" to see how to do it https://help.ubuntu.com/community/SoundTroubleshooting#Line_Input.2BAC8-Microphone_Troubleshooting
After installing and configuring the Intel-SigmaTel STAC 9205 soundcard in my DELL Latitutde D630 as described above, I could use xmms to play sound on this machines. The microphone did, however, not work. To make the mic work as well, I booted Win XP on the same machine, plugged the microphone in and selected Microphone instead of the menu items "Line-In" or "No action" in the Intel-SigmaTel event window. That event window was opened by the Win XP soundcard driver when I plugged in the microphone. I then booted ubuntu 7.04 with alsa-driver-1.0.15-rc3 and used alsamixer to make the following changes: Front-Gain: 94<>94, both Input Sources = Front Mic, then pressed F4 and set the 2 captures to 100<>100 and to 93<>93. Eventually, I pressed Esc to end alsamixer and save my changes. After these steps, I could use arecord -f cd out.wav to record sound using my microphone. BTW, I used "options snd-hda-intel model=auto" as the last line of /etc/modprobe.d/alsa-base for this particular soundcard and OS.
I too had a problem with mic not working with playback OK, and it turned out that (probably due to model mismatch in snd-hda-intel options) the capture volume controls were mislabeled and the slider that was responsible for the microphone was the one with "Digital" caption. "Capture" and "Capture1" didn't control the recording regardless of recording devices chosen for those channels in "Input Source" and "Input Source 1".
On the ASUS A7J (audio chip Realtek ALC882), I got a problem with the front mic after updating to Jaunty. To enable the microphone, I had to select "Mic" (and not "Front mic") in the option tab as first capture device. It's probably as well a labeling issue. Contact me (skadge -at- gmail -dot- com) if you have the
I have a Gateway NV52 series laptop which refused to enable the internal mic. After looking around the Internet, I found that if you add "options snd-hda-intel model=laptop position_fix=1 enable=yes" to /etc/modprobe.d/alsa-base.conf and reboot, it works again without any problems.
Solution for Apple Macs
In case of slightly distorted, weird, crackled sound on Apple Macs it have been reported by several users, that unload snd_hda_intel module at boot time and then reload it, can help to get rid of crackled sound. For do this, edit /etc/rc.local by typing in Terminal
gksudo gedit /etc/rc.local
And add two following lines to the end of file before "exit 0":
rmmod snd_hda_intel modprobe snd_hda_intel
- This fix also worked for me using a Fujitsu Siemens Amilo Si 1520 laptop, Codec: Conexant CX20549 (Venice), using Ubuntu 8.10. The sound worked out of the box, but it was weird and distorted. After removing the module and adding it again, the sound is back to normal. -- mairabc 2008-11-27 09:32:33
- One more update: at some point it seemed that the sound was distorting again. In fact, the problem is that I was using too high volume levels. Checking this forum post and this guide, I've managed to get a configuration that seems to work fine. Use alsamixer to set the PCM level to below 50, and use only the Master channel to control the volume. Save your settings so that they keep the same after boot by running
$ sudo alsactl store 0
Sound is no longer distorted, though it is somewhat low. I guess the speakers are not powerful enough to handle more than that.
(Note: using Ubuntu 8.10, kernel 2.6.27-11-generic, alsa 1.0.17 provided by the official packages.) -- mairabc 2009-03-27 18:30:27
Update: The build instructions in this paragraph are outdated. For Ubuntu 8.04 and 8.10 (at least) following the these instructions won't work. It is recommended that you see the more generic SoundTroubleshooting page for information on how to update audio drivers.
As of Ubuntu 6.06, these instructions do not interfere with the Ubuntu package structure or other kernel modules - in other words, the changes seem drastic however they are simply adding greater functionality to an existing kernel module (Please read the Caveats section!)
- Install the required tools and kernelheaders
sudo aptitude install build-essential libncurses-dev gettext xmlto xmltoman linux-headers-`uname -r`
- Install your kernel headers
Download the latest version of alsa from Alsa project (driver, lib, and utils) to a directory (eg. ~/downloads). In the following we assume that the latest version is 1.0.14. Please change this in accordance with the one you downloaded from the Alsa project site.
- Setup installation directories
sudo mkdir -p /usr/src/alsa cd /usr/src/alsa sudo cp ~/downloads/alsa* . sudo tar xjf alsa-driver*.bz2 sudo tar xjf alsa-lib*.tar.bz2 sudo tar xjf alsa-utils*.tar.bz2
- Compile and install alsa-driver
cd alsa-driver* sudo ./configure --with-cards=hda-intel --with-kernel=/usr/src/linux-headers-$(uname -r) sudo make sudo make install
-- The configure step fails in Ubuntu 8.10 with the kernel 2.6.27-7. The configure script is unable to find the autoconf.h file and complains that it wants the full kernel sources. Aditya
-- The configure step will work on Ubuntu 8.10 if the --with-kernel option is removed. After installing the linux-source package, the ALSA driver can be configured for Ubuntu 8.10 with this command: sudo ./configure --with-cards=hda-intel
-- Alternatively, if you have a custom kernel and don't want to use the package linux-source, you can create a symlink, /usr/src/linux-headers-$(uname -r)/include/linux/autoconf.h pointing to /usr/src/linux-headers-$(uname -r)/include/generated/autoconf.h , and a similar symlink every other file in the generated directory
- Compile and install alsa-lib
cd ../alsa-lib* sudo ./configure sudo make sudo make install
- Compile and install alsa-utils
cd ../alsa-utils* sudo ./configure sudo make sudo make install
Note that you must have the curses library installed to be able to compile alsa-utils. You can install it with this command from a terminal: sudo apt-get install libncurses5-dev
In case you get this error:
checking for new_panel in -lpanelw... no configure: error: panelw library not found
you can try to fix it adding this symbolic links:
sudo ln -s libpanelw.so.5 /usr/lib/libpanelw.so sudo ln -s libformw.so.5 /usr/lib/libformw.so sudo ln -s libmenuw.so.5 /usr/lib/libmenuw.so sudo ln -s libncursesw.so.5 /lib/libncursesw.so
- if you have no sound, run dmesg and look for the string "snd_"
dmesg shows "disagrees about version of symbol" and "Unknown symbol" for snd_ctl_add, etc
if you reboot and have no sound, and check dmesg to find:
[ 1058.932000] snd_hda_intel: disagrees about version of symbol snd_ctl_add [ 1058.932000] snd_hda_intel: Unknown symbol snd_ctl_add [ 1058.932000] snd_hda_intel: disagrees about version of symbol snd_pcm_new [ 1058.932000] snd_hda_intel: Unknown symbol snd_pcm_new [ 1058.932000] snd_hda_intel: disagrees about version of symbol snd_pcm_limit_hw_rates [ 1058.932000] snd_hda_intel: Unknown symbol snd_pcm_limit_hw_rates [ 1058.932000] snd_hda_intel: disagrees about version of symbol snd_card_register [ 1058.932000] snd_hda_intel: Unknown symbol snd_card_register
... etc. then you need to do a few extra steps.
ubuntu default snd-hda-intel.ko location: /lib/modules/2.6.22-14-generic/ubuntu/media/snd-hda-intel/snd-hda-intel.ko
alsa 1.0.15's installation location: /lib/modules/2.6.22-14-generic/kernel/sound/pci/hda/snd-hda-intel.ko
so copy /lib/modules/2.6.22-14-generic/kernel/sound/pci/hda/snd-hda-intel.ko to /lib/modules/2.6.22-14-generic/ubuntu/media/snd-hda-intel/snd-hda-intel.ko .
and put the modules/* in alsa's compile directory into /lib/modules/.../kernel/sound, you can use "find" to get their location. snd-hda-intel.ko snd-hwdep.ko snd.ko snd-mixer-oss.ko snd-page-alloc.ko snd-pcm.ko snd-pcm-oss.ko snd-rtctimer.ko snd-seq-device.ko snd-seq.ko snd-seq-midi-event.ko snd-seq-oss.ko snd-timer.ko
then, depmod -a
reboot, try again.
(Thanks to forum user pcmanlin on this ubuntu forum thread)
alsa-utils don't compile
If you have trouble compiling alsa-utils simply run
and it will show you the installed version. Check on http://www.alsa-project.org/ if your card is supported in that version and download the source packages. Go back to the "Setup installation directories" step above and try again.
Overwriting packaged files and adding unmanaged files by runningsudo make installmay break upgrades. A better way is to create a backport by using the build scripts from your current alsa source packages. This would also allow you to undo the changes if they don't work, by simply downgrading back to the original package version.
More Notes on HD-Audio Driver by Takashi Iwai - excellent document that explains many issues with the snd-hda-intel driver written by one of the module's authors.
Check if your device card model is a Realtek and download alsa from Realtek site:
cat /proc/asound/card0/codec* | grep Codec Codec: Realtek ALC888
Realtek High Definition Audio Codecs
Explained at this ubuntu forums thread