#This is not finished yet, I just want to save what is done so far
Sound Troubleshooting Guide
for Ubuntu 10.04, 10.10, 11.04 and 11.10
Notes/Warnings/Tips about this document:
- This is a do-it-yourself guide to fix your sound problems. I do not guarantee that it will work, but feel free to edit this document if you have any problems.
- Make sure that you have plenty of time to do this guide, as it will probably take a few hours.
- Make sure that you have installed the latest updates for ubuntu before beginning this guide.
- All advice in this guide has been tested on Ubuntu. Though we have not tested thoroughly on Kubuntu, Xubuntu and Lubuntu the advice is likely to work for these versions as well.
In this guide, a Terminal window will be frequently used. In some cases, it is essential for you to use it to solve your problem. You can find a tutorial on using the terminal here: Using the terminal
- All commands to type are in boxes,
like this.
- You will probably not need all of this guide to cure your audio! Feel free to only pick the bits that appear relevant.
Preliminary checks and guide start:
Make sure that all of these things are OK (follow the checks in the order supplied):
- Your speakers are turned on fully (on the speakers)
Your speakers are turned on in AlsaMixer
- Your speakers are plugged into the correct ports.
- If your speaker has a power cable, make sure that it is plugged in.
- Your speakers work (try plugging them into a CD/DVD/Radio player)
- Your Ubuntu release is supported. If it isn’t supported anymore, install a supported release of Ubuntu (clean install, not upgrade from the upgrade tool).
- If your problem is NOT sound, but recording instead, check out Appendix G, and Appendix B, on the recording section. If it still doesn't work after tweaking the settings a lot, use the instruction under the heading Af to reinstall ALSA.
- If your problem is that the sound stops working after hibernation, follow the instructions under Ba.
- If you want to make MIDI work, make sure that sound works normally, then follow heading Bb.
- Boot into any supported Ubuntu LiveCD/DVD/USB, and see if sound works. If sound doesn’t work there, then the problem might be with Ubuntu, your sound card (or motherboard, if the sound card is internal), or the BIOS settings. Follow heading X for more information.
- Run the following command:
aplay -l
- If it gives an output similar to this:
aplay: device_list:221: no soundcard found...
Then follow heading Aa. - If it gives an output similar to this:
**** List of PLAYBACK Hardware Devices **** ALSA lib conf.c:3643:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf ALSA lib control.c:882:(snd_ctl_open_noupdate) Invalid CTL hw:0 aplay: device_list:249: control open (0): No such file or directory
Then follow heading Ab.
- If it does not give any of the 2 outputs (or similar to them), then follow heading Ac.
- Run the following command:
lspci -nn | grep '\[04[80][13]\]'
- If the command gives no output at all, follow heading X.
- If the command does give output, follow heading Ac.
Aa (Fix Audio Permissions)
- Run the following command:
sudo aplay -l
- If it gives an output similar to this:
aplay: device_list:221: no soundcard found...
Then follow heading Ac, and if sound still doesn’t work, repeat this guide (redoing the checks). - If it does not give that output (or similar to it), then run:
sudo usermod -aG `cat /etc/group | grep -e '^pulse:' -e '^audio:' -e '^pulse-access:' -e '^pulse-rt:' -e '^video:' | awk -F: '{print $1}' | tr '\n' ',' | sed 's:,$::g'` `whoami`
Then reboot, and run this command:aplay -l
You should see the devices now. - If still see the aplay: device_list:221: no soundcard found... output, then follow heading Ac, and if sound still doesn’t work, repeat this guide (redoing the checks).
If you do see the devices, and sound doesn’t work, use AlsaMixer to unmute your audio, and set it to 100%.
- If it gives an output similar to this:
Ab (Reinstall libasound2)
- Run the following command:
sudo apt-get install --reinstall libasound2
Your sound should work. If it doesn’t, repeat this guide (redoing the checks).
Ac (Make the system/ALSA recognize the sound card(s))
- Run this command: (referred to in this section as the 'big one')
echo "Sound cards recognized by the system:"; lspci -nn | grep --color=none '\[04[80][13]\]'; echo "Sound cards recognized by ALSA:"; lspci -nn | grep '\[04[80][13]\]' | while read line; do lspci -nnk | grep -A 3 '\[04[80][13]\]' | grep -e 'Kernel modules: ..*' -e '\[04[80][13]\]' | grep --color=none -F "$line"; done; echo "Sound cards recognized by ALSA, and activated:"; lspci -nn | grep '\[04[80][13]\]' | while read line; do lspci -nnk | grep -A 3 '\[04[80][13]\]' | grep -e 'Kernel drivers in use: ..*' -e '\[04[80][13]\]' | grep --color=none -F "$line"; done
- First, make sure that Ubuntu recognizes all of your soundcards. If it doesn’t, make sure that your sound card is properly placed in its slot (you can disregard this step if it is integrated into the motherboard), and make sure that the BIOS does not disable the sound card.
Then, make sure that ALSA recognizes all of the sound cards that Ubuntu recognizes. If it doesn’t recognize all of them, then follow this tutorial. After that, reboot and re-run the big command above, and it should be recognized.
- Finally, make sure that all of the sound cards recognized by ALSA are activated. If they are not all activated, get the slot number of the card that is not activated (the first field, usually something in this format (can be letters or numbers): 00:00.0), and run: (replace SLOTID by the slot id of the sound card that is not activated. If you have more than one sound card, re-run this command as many times as needed, always replacing SLOTID):
DRIVER=`lspci -ks SLOTID | grep "Kernel modules:" | awk -F: '{print $2}' | sed 's/ *//g'`; modprobe $DRIVER && echo "$DRIVER" | sudo tee -a /etc/modules
Reboot, re-run the big command above, and it should be activated!