You are not logged in.

#1 2010-03-09 21:38:18

nLEyETn
Member
Registered: 2008-10-01
Posts: 34

[SOLVED] Pulseaudio daemon stopping after use.

I am new to using pulseaudio so I'm not sure what the purpose of this behavior is.  When I login to my account I have the pulseaudio daemon start by running `pulseaudio --start`.  Whenever I start the daemon, I notice a little buzzing noise through my speakers for a split second.  After I use a program that has audio and the program exits, I notice when I open up another program that uses it, it reinitializes the daemon because I hear the noise through my speaker.  I checked the processes to see if pulseaudio is still running after i close the first program and it shows it has quit.

I have checked through some pulseaudio options and noticed two that are probably affecting it:

exit-idle-time
allow-exit

I found that exit-idle-time refers to the daemon being terminated after a certain amount of idle time but I'm not sure what allow-exit does.

The thing I don't understand is why should the pulseaudio daemon quit at all?  Isn't the purpose of the daemon to stay running so that other programs can access it when they need to?  Now I know the pulseaudio daemon does restart when a program needs it if it is not already running.  The problem with that is when I open up mplayer and pulseaudio is not running.  Pulseaudio restarts but the initialization is to slow where mplayer doesn't have a chance to see it and does not use the audio output.  I then have to quit mplayer and restart it right away for it to use pulse since it is now running.  Is there a downside to keep pulseaudio running all the time and is it possible to do that with the options?

Last edited by nLEyETn (2010-03-15 22:50:38)

Offline

#2 2010-03-10 02:57:50

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED] Pulseaudio daemon stopping after use.

I have no idea whether this will help or not, but couldn't you add pulseaudio to the list of daemons in /etc/rc.conf? I know the wiki doesn't mention it, but it may work. I don't use pulseaudio, so sorry if I am not much help smile

EDIT: Just throwing it out there, but what are the possible parameters of allow-exit? What is it set to now? I think it does what the name implies: allows it to exit after that amount of time.

Last edited by cesura (2010-03-10 02:59:44)

Offline

#3 2010-03-10 04:35:57

nLEyETn
Member
Registered: 2008-10-01
Posts: 34

Re: [SOLVED] Pulseaudio daemon stopping after use.

Thanks for the suggestion, but pulseaudio shouldn't be run in system mode as stated on their website:

Many folks seem to think it is a good idea to run PA in system mode. But it is not. Nobody should run it that way, with the exception of very few cases, which are listed further down.

I did find some info on 'allow-exit' which is listed as allowing a user to exit the daemon.

Another option I found called 'autospawn' is used to start a pa daemon when needed.  This seems to be exactly what it is doing on my computer, but I still haven't found out why the daemon shouldn't stay running.

Offline

#4 2010-03-10 04:55:12

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [SOLVED] Pulseaudio daemon stopping after use.

Are you sure the daemon exits? If your only evidence is a weird sound when something starts playing, what happens is that pulseaudio enables power-saving features on your sound card, so that your sound card powers down after a certain amount of time (the daemon still runs) with no sound. You're probably hearing the sound made by the card powering up.

Use ps -e | grep pulse to see if pulseaudio is running.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#5 2010-03-10 05:23:08

nLEyETn
Member
Registered: 2008-10-01
Posts: 34

Re: [SOLVED] Pulseaudio daemon stopping after use.

I have checked the process listing and pulse does not show up in it.

Offline

#6 2010-03-10 09:11:55

ccc1
Member
Registered: 2009-04-16
Posts: 111

Re: [SOLVED] Pulseaudio daemon stopping after use.

nLEyETn wrote:

is it possible to do that with the options?

yes, put "exit-idle-time = -1" in your daemon.conf.

Last edited by ccc1 (2010-03-10 09:12:22)

Offline

#7 2010-03-15 22:48:25

nLEyETn
Member
Registered: 2008-10-01
Posts: 34

Re: [SOLVED] Pulseaudio daemon stopping after use.

Thanks for the info.  Do you happen to know if there is some beneficial reason to having the pulseaudio daemon quit and restart when needed as opposed to just keeping it running?

Offline

Board footer

Powered by FluxBB