Restart Ubuntu sound processes via command line

I tried to hibernate Ubuntu (which fails, but thats another issue) and resumed my system.

After this, the sound doesn't get played.

What command can/should I run to restart the ubuntu sound system.


Solution 1:

If Ubuntu is still using Alsa for its sound engine (I'm not sure as its been awhile since I've used it), you can restart by typing sudo /etc/init.d/alsa-utils restart into the terminal.

Since it doesn't seem to be working, you might need to make sure that nothing is trying to use it. (example shamelessly stolen from the Ubuntu forums)

name@comp:~$ lsof | grep pcm
sh 5079 name 70u CHR 116,6 13639 /dev/snd/pcmC0D0p

name@comp:~$ kill -9 5079

Solution 2:

As suggested by mikewhatever in his answer to this question on Ask Ubuntu:

pulseaudio -k && sudo alsa force-reload

Solution 3:

PulseAudio is a user service, so run systemctl with the --user flag.

systemctl --user restart pulseaudio

Solution 4:

Ubuntu swichted to pulseaudio some time ago, so it would be:

sudo /etc/init.d/pulseaudio restart

EDIT: In case that doesn't cut it, you could also rmmod and modprobe the kernel modules used for sound. Which those are probably depends on your sound card. lsmod might give you a clue...