How can I restart pulseaudio without having to logout?
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?
I solved my problem.
-
Check if any pulseaudio instance is running:
pulseaudio --check
It normally prints no output, just exit code.
0
means running. Mine were not running, so I just advanced to step 3. -
If any instance is running:
pulseaudio -k
-
Finally, start pulseaudio again as a daemon:
pulseaudio -D
Start banshee again and enjoy!
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.
Pulseaudio is a user service, so:
systemctl --user restart pulseaudio.service
Also there is this:
systemctl --user restart pulseaudio.socket
For checks replace restart
with status
.
Use the service command (Ubuntu 14.04 or older only):
sudo service pulseaudio restart
Following works for me on Ubuntu 18.04:
pulseaudio -k && sudo alsa force-reload