Sometimes pulseaudio service stops and it doesn't restarts itself when I open an audio file with banshee or totem.

How I can make it start again without logout?

share|improve this question

I solved my problem.

  1. 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.

  2. If any instance is running :

    pulseaudio -k
    
  3. Finally, start pulseaudio again as a daemon :

    pulseaudio -D
    
  4. Start banshee again and enjoy !
share|improve this answer
1  
For me --check didn't show anything, even though -k stopped audio playback, implying pulseaudio was running. – Cerin Apr 24 '15 at 19:24
    
For me, pulseaudio gets so hung up (forgetting a sink) that 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
    
fyi, the step 1: "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

In a standard setup running pulseaudio -k restarts the daemon. Nothing else to do.

In case PA 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.

share|improve this answer
    
/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/pulseaudiowhy – Thorsten Niehues Jul 21 '17 at 9:27

Use the service command:

sudo service pulseaudio restart
share|improve this answer
    
While this question is acceptable, it would definitely be more desirable if you were to include some explanation as to why this would resolve the issue. – RPi Awesomeness Feb 26 '15 at 2:03
    
I unfortunately don't have any specific knowledge in addition to the very explicit command. If if had, I would have had explained more. If you have any idea, please be my guest. – PowerKiKi Mar 2 '15 at 13:40
17  
Ubuntu 16.04: 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:

  1. Launch Terminal
  2. Run pulseaudio -k to kill the running daemon. You will get an error only if no daemon was running, otherwise no messages will appear.
  3. Ubuntu will attempt to restart the daemon automatically assuming there are no problems with the configuration. You can run 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.
share|improve this answer

My experience on Ubuntu 16.04 with a Dell E6230 laptop from 2013. The pulseaudio process normally use 0.0% CPU (using top d2 -u $USER to see CPU usage). When playing Youtube in Firefox, it uses around 2-4%. When stopping/pausing playback, it drops back to zero.

However, sometimes it get "stuck" at 2-4% even if the laptop is silent. And it stays like this for a long time, maybe until the next reboot. pulseaudio -k solves this. Running this while youtube is playing, stops it at once (reloading the tab or rewinding a few seconds will start it again)

So a solution could be to run pulseaudio -k in a cron job a few times per hour, but only if no playback is running. Anyone know how to detect if something is playing audio at the moment?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.