View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > Troubleshooting sound problems

From LQWiki

Jump to: navigation, search

To find the source of your sound problems, you should clarify the most basic sound system issues first. So, go on in the order of this article.

Contents

Physical

Test if the sound works. Circumvent any mixer. Just write directly to the sound device /dev/dsp (use CTRL-C to stop the sound):

cat /dev/urandom >/dev/dsp

If you do not hear a sound

If you do not get an error message

If you cannot hear a sound, check

  • is your user allowed to play sound
  • did you load the correct sound driver
  • are your speakers working and have enough volume
  • does restarting the sound daemon help:
/etc/init.d/alsasound restart

If you get an error message

What application is blocking the sound card?

If you get an error that says another application is blocking the sound card, you can check to see what process is responsible. This can look like the following:

tweedleburg:~ # lsof | grep -E "dsp|snd"   
mplayer   19861       root    4w      CHR               14,3              104564 /dev/dsp

"lsof" is the command that lists open files (including special files like devices). The grep is to isolate connections to /dev/dsp, /dev/dsp1, /dev/snd, etc. In this example, mplayer, process id 19861, is blocking the device /dev/dsp, your sound card. You can kill it with the command

killall mplayer 

This error is symptomatic of programs that use the old Open Sound System. Newer applications that use the ESound daemon or the new Advanced Linux Sound Architecture should be able to emit sounds at the same time as other new applications.


Personal tools