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?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communitySometimes 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!
pulseaudio -k
doesn't do the job. After sudo killall pulseaudio
, everything starts up again and works fine. (Ubuntu 16.04)
– Raphael
Nov 17 '17 at 13:01
pulseaudio --check
normally prints no output, just exit code 0 which means running" => so, there is no output, it's running; but, if you want to check the exit code anyway, run: echo $?
which should print 0
if it's running. (the $?
is the exit code of the previous command. If you run it twice, then it prints the exit code of echo
)
– michael
Dec 7 '17 at 6:15
pulseaudio --check && pulseaudio -k
- it will only run the kill if check exits with 0 (running)
– Jeff Ward
Dec 1 '20 at 17:32
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.
/usr/bin/pulseaudio
returns bash: /usr/bin/pulseaudio: Permission denied
even though the file permissions seem fine: -rwxr-xr-x+ 1 root root 87K Jun 21 08:09 /usr/bin/pulseaudio
why
– Thorsten Niehues
Jul 21 '17 at 9:27
rm ~/.config/pulse/*
followed by pulseaudio -k
did the trick.
– WinEunuuchs2Unix
Mar 31 '18 at 18:52
pulseaudio -k
kills the daemon, period. The manpage is very clear on that. You have to run pulseaudio --start
afterwards to start the daemon.
– Atralb
Dec 21 '20 at 6:42
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
.
pulseaudio -k
does or returns nothing at all. The other option that worked was killall pulseaudio
.
– nyxee
May 8 '20 at 20:05
Use the service command (Ubuntu 14.04 or older only):
sudo service pulseaudio restart
Failed to restart pulseaudio.service: Unit pulseaudio.service not found.
– user1182474
Apr 11 '17 at 18:58
Here's how to do it in Ubuntu 15.10:
pulseaudio -k
to kill the running daemon. You will get an error only if no daemon was running, otherwise no messages will appear.pulseaudio --check
to check that Pulseaudio is running. A clean exit (no message) from the check
command indicates that the daemon has started successfully. Otherwise, run pulseaudio --start
to 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.Following works for me on Ubuntu 18.04:
pulseaudio -k && sudo alsa force-reload
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-reload
Yeah, 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
You would run this command to restart PulseAudio in Ubuntu 2020 releases:
systemctl --user restart pulseaudio