[systemd-devel] systemd prevents pulseaudio from shutting down

Colin Guthrie gmane at colin.guthr.ie
Sun Jun 3 14:08:01 PDT 2012


'Twas brillig, and Reindl Harald at 03/06/12 20:08 did gyre and gimble:
> 
> 
> Am 03.06.2012 20:22, schrieb Robert Buhren:
>> i'm using archlinux with gnome3.4. Pulseaudio 2.0, systemd 184, and Linux 3.4.
>> Pulseaudio has no unitfile, as it is started by gnome itself.
> 
> however
> 
> the question remains: why is pulseaudio still running after logout

That's the intended behaviour. PulseAudio will spawn itself
automatically when needed and shut itself down when it's not needed any
more, after a suitable timeout (defaults to 20).

As startup is quite intensive (it requires a lot of probing of the
hardware to see what modes it uses) we take two general precautions to
avoid excessive restarts:

 1) We implement an "exit-idle-time". Simply set this to 0 if you want
PA to exit by itself immediately after it becomes unused (man
pulse-daemon.conf)

 2) When logging into an X11 session, we load a special X11 module that
ensures that PA is not exited until the X11 session is finished.


So in this setup you have two main options to get the results you want.
The first is to simply set the exit-idle-time=0 in daemon.conf. This
should make PA behave generally a bit more gracefully, but does nothing
to help any other apps that may behave in a similar way.

The second option (and IMO the better one) is to configure pam_systemd
to kill the processes of the user session when it's done. This should be
a matter of setting the kill-session-processes= (and optionally the
kill-only-users=) options in your pam configuration. See man pam_systemd.

HTHs

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/



More information about the systemd-devel mailing list