Restart Ubuntu sound processes via command line

12

5

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.

Lakshman Prasad

Posted 2009-08-02T18:52:48.223

Reputation: 2 245

see also https://askubuntu.com/a/15224/17060

– michael – 2017-12-07T06:17:11.357

Did Dan Walker’s answer work for you?  If it did, it would be nice if you would add a comment saying so.  If not, why did you accept it? You should accept an answer only if it works for you.

– Scott – 2018-08-04T19:33:30.343

Answers

10

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

Dan Walker

Posted 2009-08-02T18:52:48.223

Reputation: 8 869

2You may also have to restart pulse-audio. – Dana the Sane – 2009-08-02T19:04:08.633

1Nice try. Good answer. But in my case, doesn't solve the problem. Yes, to my best knowledge, I use ALSA itself. – Lakshman Prasad – 2009-08-02T19:04:34.500

Any specific order to follow. Restarted both. No luck. I am confident, by restarting my system, sound will work. But I dont want to. – Lakshman Prasad – 2009-08-02T19:06:02.123

Seems like I will have to kill firefox, chrome, and gnome-panel. As good as restarting the system :| . Anyway, thanks! – Lakshman Prasad – 2009-08-02T19:11:42.673

19

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

pulseaudio -k && sudo alsa force-reload

Equanimous Guy

Posted 2009-08-02T18:52:48.223

Reputation: 191

2This is the one that worked for me, on Ubuntu 18.04 ("bionic") – Dan Stowell – 2019-01-21T08:14:06.267

7

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...

Kim

Posted 2009-08-02T18:52:48.223

Reputation: 2 238

3

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

systemctl --user restart pulseaudio

JSON C11

Posted 2009-08-02T18:52:48.223

Reputation: 131

I get Job for pulseaudio.service failed because the control process exited with error code. See "systemctl --user status pulseaudio.service" and "journalctl -xe" for details. Any advice? – xjcl – 2020-01-24T23:53:43.073

0

Alsa Usage:

 /sbin/alsa {unload|reload|force-unload|force-reload|suspend|resume}


sudo alsa reload

Juan Cruz

Posted 2009-08-02T18:52:48.223

Reputation: 1

Can you expand your answer a little to explain it? Thanks. – fixer1234 – 2016-04-30T19:47:57.277

0

I reverted to a previous kernel after a reboot. Sound was restored. I found out that the newer upgraded kernel did not have the extra modules installed like the older one did. lsmod listed no sound modules.

Don Harter

Posted 2009-08-02T18:52:48.223

Reputation: 1