72

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.

2

7 Answers 7

24

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
5
  • 3
    You may also have to restart pulse-audio. Aug 2, 2009 at 19:04
  • 1
    Nice try. Good answer. But in my case, doesn't solve the problem. Yes, to my best knowledge, I use ALSA itself.
    – lprsd
    Aug 2, 2009 at 19:04
  • Any specific order to follow. Restarted both. No luck. I am confident, by restarting my system, sound will work. But I dont want to.
    – lprsd
    Aug 2, 2009 at 19:06
  • Seems like I will have to kill firefox, chrome, and gnome-panel. As good as restarting the system :| . Anyway, thanks!
    – lprsd
    Aug 2, 2009 at 19:11
  • That's what I ended up having to do @LakshmanPrasad - I had, easily, 12-18 pulse processes. Cut that down to ~6 after closing everything except gnome. It's easier, if not too windows-y to just restart. Oct 9, 2020 at 19:26
145

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

pulseaudio -k && sudo alsa force-reload
10
  • 13
    This is the one that worked for me, on Ubuntu 18.04 ("bionic") Jan 21, 2019 at 8:14
  • 10
    Works on 20.04 as well. Mar 15, 2020 at 15:23
  • Works on KDE Neon 5.18.
    – A.L.
    Apr 9, 2020 at 14:15
  • this is the best solution, because after the notebook sleep and I used to listen music I had strange noises, now with this restart everything is Ok !!! Great ! Great !
    – MadMad666
    May 31, 2020 at 0:54
  • 1
    Also fine on Ubuntu 22.04 !
    – duburcqa
    Apr 29, 2022 at 18:50
36

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

systemctl --user restart pulseaudio
2
  • 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
    Jan 24, 2020 at 23:53
  • @json-c11 Does this restart ALSA too?
    – Pranav
    Feb 24, 2021 at 10:00
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...

5

Pipewire restart for Ubuntu >= 22.10

Pipewire became the default sound framework since Ubuntu 22.10, so now you need to:

systemctl --user restart pipewire.service
systemctl --user restart pipewire-pulse.service

Learned from: https://askubuntu.com/questions/230888/is-there-another-way-to-restart-the-sound-system-if-pulseaudio-alsa-dont-work/1374982#1374982

Open applications may need to be restarted to pick up the newly restarted service.

1
  • 1
    this the only one that works, at least for Pop!_OS 22.04 (equal to Ubuntu 22.04 Jammy)
    – Kokizzu
    Nov 23, 2023 at 15:15
1

Alsa Usage:

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


sudo alsa reload
1
  • Can you expand your answer a little to explain it? Thanks.
    – fixer1234
    Apr 30, 2016 at 19:47
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .