Sometimes the pulseaudio service stops and it doesn't restart itself when I open an audio file with banshee or totem.
How I can make pulseaudio start again without having to logout?
29 Answers
I solved my problem.
Check if any pulseaudio instance is running:
pulseaudio --checkIt normally prints no output, just exit code.
0means running. Mine were not running, so I just advanced to step 3.If any instance is running:
pulseaudio -kFinally, start pulseaudio again as a daemon:
pulseaudio -DStart banshee again and enjoy!
Pulseaudio is a user service, so:
systemctl --user restart pulseaudio.serviceAlso there is this:
systemctl --user restart pulseaudio.socketFor checks replace restart with status.
In a standard setup running pulseaudio -k restarts the daemon. Nothing else to do.
In case pulseaudio is not running typing pulseaudio without further options will start the daemon using defaults in /etc/pulse/daemon.conf and /etc/pulse/default.pa.
User-defined settings in ~/.pulse/ or ~/.config/pulse/ will override system-wide settings. In case of issues it will often help to delete these directories before restarting pulseaudio.
For details see PulseAudio Wiki.
6Use the service command (Ubuntu 14.04 or older only):
sudo service pulseaudio restart 4 Following works for me on Ubuntu 18.04:
pulseaudio -k && sudo alsa force-reload 2 Here's how to do it in Ubuntu 15.10:
- Launch Terminal
- Run
pulseaudio -kto kill the running daemon. You will get an error only if no daemon was running, otherwise no messages will appear. - Ubuntu will attempt to restart the daemon automatically assuming there are no problems with the configuration. You can run
pulseaudio --checkto check that Pulseaudio is running. A clean exit (no message) from thecheckcommand indicates that the daemon has started successfully. Otherwise, runpulseaudio --startto launch the daemon. If you recently changed your configuration file and the daemon fails to start, check your file for errors and check the syslog (with the SystemLog app) for any messages from Pulseaudio.
If the pulseaudio failing to work is related to S3 sleep (Suspend to RAM), the real cause may be audio hardware problem and then you have to do heavy-handed full reset:
pulseaudio -k && sudo alsa force-reload && sleep 2 && pulseaudio -k && sudo alsa force-reloadYeah, it needs to be done twice with small delay. I don't know why but this seems to work every time.
If you have multiple desktop environments in parallel (fast user switching)
sudo killall pulseaudio && sudo alsa force-reload && sleep 2 && sudo killall pulseaudio && sudo alsa force-reload Run the following commands:
pulseaudio --check
pulseaudio --kill
pulseaudio --start You would run this command to restart PulseAudio in Ubuntu 2020 releases:
systemctl --user restart pulseaudio 1