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?
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:
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:
Finally, start pulseaudio again as a daemon:
Start banshee again and enjoy!
Pulseaudio is a user service, so:
Also there is this:
For checks replace
restart
withstatus
.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.
Use the service command (Ubuntu 14.04 or older only):
Following works for me on Ubuntu 18.04:
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 thecheck
command indicates that the daemon has started successfully. Otherwise, runpulseaudio --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.Run the following commands:
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:
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)
You would run this command to restart PulseAudio in Ubuntu 2020 releases:
I'd like to add my penny's worth to my namesake @rolf's
systemD
answer.The scenario:
Pulseaudio is locked up tight
You've tried:
systemctl --user stop pulseaudio.service pulseaudio.socket
systemctl --user restart pulseaudio.service
systemctl --user reset-failed pulseaudio.service
Still stubbonly it shows:
The key here is that the restart counter has been exceeded.
If you manually run:
pulseaudio -vvvv
You may find the final lines say:
Here, you need to find your user id's /run/user/1000/pulse directory, where the number 1000 is my user id number
Get your uid from the command:
id
In the the pulse run directory is a file called
pid
, delete it!Try starting
pulseaudio -vvvv
again, only to discover that it's bound to the Dbus or the bind Address already in useSo:
ps -ef | grep pulseaudio
to find any process still running it and kill it withkill -15
pid number from grepNow you can restart pulseaudio:
or:
You could logout and log back in again :)