If you are like me then there is no doubt that you’ve had the sound stuck while you where playing something, watching a movie or checking out a new software.
Now if the sound has stuck and you keep hearing something through the speakers even though you have killed the application responsible for the sound crash the sound won’t stop. If that’s the case you don’t need to reboot the machine all you need to do is stop the sound.
As a first step you can try to restart the sound daemon using the following command although for me it never worked.
sudo /etc/init.d/alsa-utils restartIf it works then you can stop here, if not then carry on. The following command will show you the processes that are currently holding up the sound device.
sudo lsof | grep pcmHere is what my computer shows.
xine 20374 ckr mem CHR 116,6 13714 /dev/snd/pcmC0D0p xine 20374 ckr 9w CHR 116,6 13714 /dev/snd/pcmC0D0p
Then you will need to kill these processes. the first number of each line from the result shown above is the process id. You can kill each process issuing the following command replace the number 20374 which is my process id to yours.
kill -9 20374
After doing that you should hear or not hear to be more precise the sound. After that all you need to do is to issue the following command to restart the sound daemon.
sudo /etc/init.d/alsa-utils restart
Hope this works for you. If you know a better way please say so in the comments.