Usually audio playback causes no problems in Linux, but sometimes audio vanishes suddenly and you cannot get playback until you logout/restart the system. Here’s how you can restore audio playback without restarting.
Usually the problem is caused by a crashed program that is still using the audio device preventing other processes accessing it. If you run a playback software from the command line (e.g.
vlc foo.mp3) you typically see an error like:
/dev/dsp: Device or resource busy
The solution is simple, you just need to identify the runaway process and kill it. Command
lsof | grep snd
gives a list of candidates that might be occupying the audio device. These can be terminated by
killall program_name or
kill PID, where PID is the process ID shown in the second column of