I was listening to music, and my sound suddenly went dead in all my applications. I'm using Ubuntu 12.04, which uses pulseaudio, so I tried sudo /etc/init.d/pulseaudio restart
, but nothing happened. According to lsof | grep pcm
, nothing is using the soundcard at the moment, although I'm not entirely sure if my source for that command is applicable.
Is there a way another way to restart Ubuntu 12.04's sound system from the command line without rebooting the system?
I've used
pulseaudio -k && sudo alsa force-reload
a couple of times, and it worked well. The first part kills pulseaudio, the second reloads ALSA. You don't need to restart pulseaudio, because it auto-restarts.What I do when my sound doesn't work is
and then I press Alt + F2 and type in pulseaudio. It usually works for me.
Just for completeness, in newer Ubuntus versions that use systemd, I used this and it worked well:
systemctl --user restart pulseaudio
In my case there were nasty messages in
kern.log
/dmesg
:The solution was simply to suspend and resume the machine!
For the new multimedia framework Pipewire, restart the Pipewire services.
I encountered this issue with a USB audio device that would sometimes when booting the machine, not connect properly leaving me without audio until a reboot. If you are someone who is having the same issue but with a USB audio device then I recommend the following which fixed it for me:
None of the other answers would fix it and I assume that came down to the USB device not registering properly on boot. This simply reboots the USB devices. Note: you should only run all commands at once, running
sudo rmmod xhci_hcd
alone will disable all USB devices e.g., your keyboard, meaning the remaining commands cannot be run.I will be honest and say that I doubt that the
xchi_pci
part is necessary, so if someone is more knowledgeable regarding this please correct me.Have you looked inside the folder to see if pulseaudio was available in init.d, try replacing pulse audio with alsa-utils
I had exactly the same symptom: sound suddenly died (after trying to use Audacity, in my case). The OP didn't mention he was/wasn't wearing headphones, which was my case. I tried all options here and, when going to Preferences and changing to HDMI or Speaker output worked, but switching to Headphones didn't work (no sound). I then tried to unplug and re-plug the headphones and it worked.
Sleeping + waking up the PC is the only thing that's fixed it for me (other than a reboot). I'm using bluetooth audio w/ the notoriously buggy intel ax20x.