DebuggingSoundProblems

Differences between revisions 19 and 67 (spanning 48 versions)
Revision 19 as of 2008-05-14 09:59:27
Size: 8323
Editor: user1
Comment: change toc
Revision 67 as of 2011-10-27 20:10:46
Size: 7463
Editor: pool-173-48-207-124
Comment: Remove some more references to obsolete releases
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:

||<tablestyle="float:right; font-size: 0.9em; width:30%; background:#F1F1ED; background-repeat: no-repeat; background-position: 98% 0.5ex; margin: 0 0 1em 1em; padding: 0.5em;">'''Contents'''[[BR]][[TableOfContents]]||
<<Include(Debugging/Header)>>
||<tablestyle="float:right; font-size: 0.9em; width:30%; background:#F1F1ED; background-repeat: no-repeat; background-position: 98% 0.5ex; margin: 0 0 1em 1em; padding: 0.5em;"><<TableOfContents>>||
Line 8: Line 8:
=== Preliminary checks ===
 1. Is your sound system plugged in and switched on. I spent an hour trying to diagnose a sound issue when the problem was that I had switched off the speakers to answer a phone call and forgot that I had done so. :-(

=== Checking volume levels ===
 1. From command line: Open a terminal window and launch ''alsamixer'' then make sure sound is unmuted and that the volume is turned up. Unmute everything, sometimes a muted channel will be the problem, even if the description doesn't seem immediately relevant.
 1. From GUI: This can be done by running something like ''gnome-alsamixer'' from a terminal window or navigating to your your Volume Control. Again, at this point make sure sound is unmuted and that the volume is turned up. Unmute everything, sometimes a muted channel will be the problem, even if the description doesn't seem immediately relevant. Also check that your switches are set correctly - for instance that if you use the analog output the analog switch is set ON or that the digital or S/PDIF switch is set OFF. You can select which tracks/switches are visible in Volume Control (see above) under Edit->Preferences.
  * Note: These controls have equivalent functionality to alsamixer but with a graphical interface. Checking or unchecking devices in the these accomplishes the exact same thing as unmuting or muting devices, respectively, in alsamixer.
  * Starting with Ubuntu 7.04, the sound volume control is also accessible from Menu->Sound&Video->Volume Control. It may be hidden in your menus but can be shown by going to System > Preferences > Main Menu and under Applications > Sound&Video ticking Volume Control.

=== Checking sound device assignment ===
 1. Most sound applications output to card0 by default. In some cases, other audio devices (like a USB MIDI Keyboard) might be recognized as a soundcard and take card0, bumping your real soundcard to card1. To see which devices are connected to which cards, do the following:
  * {{{ cat /proc/asound/cards
}}}
 1. You can manipulate the device number assignment by adding snd-usb-audio to /etc/modprobe.d/alsa-base . Next boot, the snd-usb-audio device will get index 1.
  * {{{ options snd-usb-audio index=1
There is a troubleshooter that checks for some of the most common problems. Press Alt+F2, then enter this command:
{{{
ubuntu-bug audio
Line 25: Line 13:
=== Checking permissions and resources === == Preliminary checks ==

 1. Is your sound system plugged in and switched on? I spent an hour trying to diagnose a sound issue when the problem was that I had switched off the speakers to answer a phone call and forgot that I had done so. :-(

 2. Is your speaker or microphone muted? Check here:
   * [[Audio/CheckForMutedSpeakerVolume|Check for muted speaker]]
   * [[Audio/CheckForMutedMicrophone|Check for muted microphone]]

== Checking volume levels ==

Before messing around with uninstalling and installing various sound programs to fix a problem, check your volume levels. It is often the case that a muted channel is the problem, even though the description may not sound immediately relevant. In this regard, muted Surround or Center channels are common culprits. So unmute and raise the volume of one channel at a time and check whether sound is then produced by a running sound application e.g. Banshee.

You can access the volume levels for the various channels from the command line or the GUI.

 1. From command line: Open a terminal window and launch ''alsamixer''. Then unmute as described above.
  * Note: Often you need to specify the card you want to control, do that by launching ''alsamixer -c0'' or ''alsamixer -c1'' etc, where the number after ''-c'' corresponds to your soundcard's index. To know what indexes your soundcards have, see below (under "Checking sound device assignment").

 1. From GUI: This can be done by running something like ''gnome-alsamixer'' from a terminal window or navigating to your your Volume Control. Then unmute as described above. Also check that your switches are set correctly - for instance that if you use the analog output the analog switch is set ON or that the digital or S/PDIF switch is set OFF. You can select which tracks/switches are visible in Volume Control (see above) under Edit->Preferences.
  * Note: These controls have equivalent functionality to alsamixer but with a graphical interface. Checking or unchecking devices in the these accomplishes the exact same thing as unmuting or muting devices, respectively, in alsamixer.
  * The sound volume control is also accessible from Menu->Sound&Video->Volume Control. It may be hidden in your menus but can be shown by going to System > Preferences > Main Menu and under Applications > Sound&Video ticking Volume Control.

== Checking sound device assignment ==

 1. Most sound applications output to card0 by default. In some cases, other audio devices (like a USB MIDI Keyboard) might be recognized as a soundcard and take card0, bumping your real soundcard to card1. To see which devices are connected to which cards, do the following:
  * {{{
 cat /proc/asound/cards
}}}
 1. You can manipulate the device number assignment by adding modifying /etc/modprobe.d/sound.conf (create it if necessary). Next boot, the snd-usb-audio device will get index 1 (by default it will be 2).
  * {{{
 options snd slots=,snd-usb-audio
}}}
The index numbers (0, 1, ... 7) signify the priority of the device, with the highest priority device being 0, then 1, and so forth. In theory, applications should first attempt to use the highest priority device first, but if for some reason the application is unable to use the device, it will use the next highest priority device. For example, if you have a USB sound card that can get picked up with OSS, which browsers, flash, and skype may not output, if you set your USB card at first priority, it will play when using, say, Banshee, but your other applications will play through your other soundcard. For more information see Documentation/sound/alsa/ALSA-Configuration.txt in the kernel source.

== Checking permissions and resources ==
Line 28: Line 50:
  1. If you application sounds works, but your system sounds does not (login, logout, error sounds...) try removing the .asoundrc* files from your own directory (e.g. with 'rm .asoundrc*'). It should make the system sounds work without a reboot.   1. If the application sounds work, but the system sounds do not (login, logout, error sounds...) try removing the .asoundrc* files from your own directory (e.g. with 'rm .asoundrc*'). It should make the system sounds work without a reboot.
Line 36: Line 58:
If you feel you have encountered a software bug, please report the bug at https://launchpad.net/ubuntu/+filebug using your kernel version as the package. If you are uncertain of the kernel version that you have installed you can check by typing ''uname -a'' in a terminal. Also, be sure to include the following information to your report. Please be sure to add each file as a separate attachment:
 1. Output of 'uname -a'
   * {{{ uname -a > uname-a.log
}}}
 1. Output of 'sudo lspci -vvnn'
  * {{{ sudo lspci -vvnn > lspci-vvnn.log
}}}
 1. Output of 'dpkg -s linux-ubuntu-modules-$(uname -r)'
  * {{{ dpkg -s linux-ubuntu-modules-$(uname -r)
}}}
  * various sound drivers are provided by the linux-ubuntu-modules package
 1. Sound Information (see below for how to gather)

=== Automatic Sound Information Collection ===
This is the preferred method for gathering the appropriate sound information from you system. It's helps ensure that you gather the sound information correctly and completely. The following script gathers all required information in one go [http://hg.alsa-project.org/alsa/raw-file/tip/alsa-info.sh] . The script was written to aid the alsa developers, and also to help the people in #alsa to sort out sound issues. Please download and run the script as follows:
 1. {{{ ./alsa-info.sh --no-upload
}}}
 1. /tmp/alsa-info.txt will be generated. Attach this file to your bug report
 1. The alsa-info.sh script can either be run as 'bash alsa-info.sh' _or_ made executable and run as './alsa-info.sh'.

=== Manual sound configuration collection ===
This is the information gathered from the automated sound information collection script. We highly recommend you use the automated script when gathering the sound information regarding your system. Manually collection of the information by hand is a tedious process and is more prone to user error.

 1. You can use aplay to get a list of soundcards configured by alsa
  * {{{ $ aplay --list-devices
aplay: device_list:200: no soundcards found...
}}}
 1. The following commands can help to figure out what sound card (chip set) you have (Look for lines that contain 'Multimedia audio controller'). The actual {sub,}{vendor,device} IDs are important. That's how we track whether something exists as a quirk or needs to be added/modified.
  * {{{ $ lspci -vvnn
$ lspnp -v
}}}
 1. The following command lists the codecs involved. The output from this command is ''vital''. Different codecs pushing the same driver (say, intel8x0, emu10k1, or hda-intel) exhibit a huge variation in errata.
  * {{{ tail -2 /proc/asound/oss/sndstat
}}}
 1. It is ''imperative'' that you include the amixer output from your preferred (the one that's giving problems) audio device. The community has spent years documenting known mixer issues on http://alsa.opensrc.org/ (see drivers). For instance, many of the codecs driving cs46xx, emu10k1, and intel8x0 require multiple elements to be selected, unmuted, and raised to audible levels.
  * {{{ amixer
}}}
 1. This script command (which is really just filtered cat /proc/asound/cards) lists the enumerated sound devices on your system.
  * {{{ asoundconf list
}}}
 1. We need to know if you've modified any runtime configuration files that affect how alsa-lib interacts with your sound devices. The nonexistence of the above files is not a problem.
  * {{{ cat /etc/asound.conf ~/.asoundrc*
}}}
 1. Many codecs and drivers, upon initialization, will spit something via printk() into the kernel ring buffer. Any diagnostic messages will appear in this output.
  * {{{ dmesg
}}}
 1. Sound devices require resources. We need to see if those resources are properly assigned, the above command lists interrupts used.
  * {{{ cat /proc/interrupts
If you feel you have encountered a software bug, the way to report it varies between versions.
Run the following terminal command:
{{{
ubuntu-bug audio
Line 86: Line 64:
= Misc =
A bit of useful information regarding manual installation of sound drivers as well as troubleshooting pulseaudio, flash, and sound mixing can be found here:
This will submit a detailed bug report with information about your current system.
Line 89: Line 66:
https://help.ubuntu.com/community/DebuggingSoundProblemsMisc If the above fails for some reason, you can file a bug report, then upload alsa-info information [[Audio/AlsaInfo|according to these instructions]].
Line 91: Line 68:
= Links =
http://alsa.opensrc.org/index.php
== Triaging sound bugs ==

In general, no-sound/low-sound/headphone-no-sound/no auto-mute/etc. bugs should be:
 * Filed against the '''linux''' source package.
 * Add the '''kernel-sound''' tag
 * '''Subscribe''' (do not assign) the '''Ubuntu-audio''' team (not the ubuntu-audio-dev team)

Only assign bugs to the "alsa-driver" source package if the reporter is using the alsa-source binary package with module-assistant OR is requesting a blacklist or slots/index modification.

 * Do not mark bugs as duplicates unless you're 100% sure that both the '''hardware''', '''software''', and '''symptom''' match exactly. Slightly different hardware very often requires slightly different fixes. If in doubt, file a new bug.

[[Audio/SameHardware|Here's an article]] of how to determine whether you have the same hardware as the original bug reporter.

= Further sound troubleshooting =

After reporting a bug you might want to see the community documentation:

 * https://help.ubuntu.com/community/SoundTroubleshootingProcedure
 * https://help.ubuntu.com/community/Sound
 * https://help.ubuntu.com/community/SoundTroubleshooting
 * https://help.ubuntu.com/community/DebuggingSoundProblemsMisc
Line 95: Line 91:
CategoryDocumentation CategoryBugSquad CategoryDocumentation CategoryBugSquad CategoryDebugging

Debugging Central

This page is part of the debugging series — pages with debugging details for a variety of Ubuntu packages.

Basic troubleshooting

There is a troubleshooter that checks for some of the most common problems. Press Alt+F2, then enter this command:

ubuntu-bug audio

Preliminary checks

  1. Is your sound system plugged in and switched on? I spent an hour trying to diagnose a sound issue when the problem was that I had switched off the speakers to answer a phone call and forgot that I had done so. Sad :-(

  2. Is your speaker or microphone muted? Check here:

Checking volume levels

Before messing around with uninstalling and installing various sound programs to fix a problem, check your volume levels. It is often the case that a muted channel is the problem, even though the description may not sound immediately relevant. In this regard, muted Surround or Center channels are common culprits. So unmute and raise the volume of one channel at a time and check whether sound is then produced by a running sound application e.g. Banshee.

You can access the volume levels for the various channels from the command line or the GUI.

  1. From command line: Open a terminal window and launch alsamixer. Then unmute as described above.

    • Note: Often you need to specify the card you want to control, do that by launching alsamixer -c0 or alsamixer -c1 etc, where the number after -c corresponds to your soundcard's index. To know what indexes your soundcards have, see below (under "Checking sound device assignment").

  2. From GUI: This can be done by running something like gnome-alsamixer from a terminal window or navigating to your your Volume Control. Then unmute as described above. Also check that your switches are set correctly - for instance that if you use the analog output the analog switch is set ON or that the digital or S/PDIF switch is set OFF. You can select which tracks/switches are visible in Volume Control (see above) under Edit->Preferences.

    • Note: These controls have equivalent functionality to alsamixer but with a graphical interface. Checking or unchecking devices in the these accomplishes the exact same thing as unmuting or muting devices, respectively, in alsamixer.
    • The sound volume control is also accessible from Menu->Sound&Video->Volume Control. It may be hidden in your menus but can be shown by going to System > Preferences > Main Menu and under Applications > Sound&Video ticking Volume Control.

Checking sound device assignment

  1. Most sound applications output to card0 by default. In some cases, other audio devices (like a USB MIDI Keyboard) might be recognized as a soundcard and take card0, bumping your real soundcard to card1. To see which devices are connected to which cards, do the following:
    •  cat /proc/asound/cards
  2. You can manipulate the device number assignment by adding modifying /etc/modprobe.d/sound.conf (create it if necessary). Next boot, the snd-usb-audio device will get index 1 (by default it will be 2).
    •  options snd slots=,snd-usb-audio

The index numbers (0, 1, ... 7) signify the priority of the device, with the highest priority device being 0, then 1, and so forth. In theory, applications should first attempt to use the highest priority device first, but if for some reason the application is unable to use the device, it will use the next highest priority device. For example, if you have a USB sound card that can get picked up with OSS, which browsers, flash, and skype may not output, if you set your USB card at first priority, it will play when using, say, Banshee, but your other applications will play through your other soundcard. For more information see Documentation/sound/alsa/ALSA-Configuration.txt in the kernel source.

Checking permissions and resources

  1. Make sure that all users needing access to the Sound Device can "Use audio devices" in the "User Privileges" tab of users-admin (System->Administration->Users and Groups).

  2. Test different "Sound Servers": Go to System > Preferences > Sound ("Multimedia Systems Selector" in earlier editions of Ubuntu). From there, you can test the different options. In some scenarios several different sound servers may be installed, and only one may work. This is probably the origin of the problem if you cannot play audio with xine or rhythmbox, but you can with xmms or helix/realplayer.

  3. If the application sounds work, but the system sounds do not (login, logout, error sounds...) try removing the .asoundrc* files from your own directory (e.g. with 'rm .asoundrc*'). It should make the system sounds work without a reboot.
  4. If you can get absolutely no sound and you have an onboard sound chip you can try to disable it in the BIOS. This solves the problem is some cases.
  5. If you have no sound and you have a regular sound card type "lsmod | grep snd" in the terminal and see if there is more than one card listed. It's possible that you have a motherboard sound chip that is interfering. Add it to the bottom of the blacklist file. For example, sudo nano /etc/modprobe.d/blacklist then add "blacklist snd_via82xx" to the bottom.

Reporting Sound Bugs

Please do not report problems on this page; use the normal support channels instead. See http://www.ubuntu.com/support

If you feel you have encountered a software bug, the way to report it varies between versions. Run the following terminal command:

ubuntu-bug audio

This will submit a detailed bug report with information about your current system.

If the above fails for some reason, you can file a bug report, then upload alsa-info information according to these instructions.

Triaging sound bugs

In general, no-sound/low-sound/headphone-no-sound/no auto-mute/etc. bugs should be:

  • Filed against the linux source package.

  • Add the kernel-sound tag

  • Subscribe (do not assign) the Ubuntu-audio team (not the ubuntu-audio-dev team)

Only assign bugs to the "alsa-driver" source package if the reporter is using the alsa-source binary package with module-assistant OR is requesting a blacklist or slots/index modification.

  • Do not mark bugs as duplicates unless you're 100% sure that both the hardware, software, and symptom match exactly. Slightly different hardware very often requires slightly different fixes. If in doubt, file a new bug.

Here's an article of how to determine whether you have the same hardware as the original bug reporter.

Further sound troubleshooting

After reporting a bug you might want to see the community documentation:


CategoryDocumentation CategoryBugSquad CategoryDebugging

DebuggingSoundProblems (last edited 2014-07-26 11:08:14 by penalvch)