[pulseaudio-discuss] Remaining PA process after X logout

Takashi Iwai tiwai at suse.de
Mon Feb 26 11:20:03 UTC 2018


On Mon, 26 Feb 2018 12:06:50 +0100,
Tanu Kaskinen wrote:
> 
> On Mon, 2018-02-26 at 10:56 +0100, Takashi Iwai wrote:
> > On Mon, 26 Feb 2018 10:47:09 +0100,
> > Tanu Kaskinen wrote:
> > > 
> > > On Mon, 2018-02-26 at 10:20 +0100, Takashi Iwai wrote:
> > > > On Mon, 26 Feb 2018 10:12:44 +0100,
> > > > Tanu Kaskinen wrote:
> > > > > What about fedora? I somehow would expect fedora to be eager to adopt
> > > > > the socket activation feature in pulseaudio that has been available for
> > > > > a long time already.
> > > > > 
> > > > > If you're using pulseaudio under systemd, it seems weird if all user
> > > > > services don't get terminated on logout.
> > > > 
> > > > I guess they would hit the same issue.  But maybe there can be some
> > > > workaround.
> > > 
> > > I don't think the same issue would affect pulseaudio if it was under
> > > systemd control, unless the user instance of systemd keeps running for
> > > longer than logind keeps the runtime dir around. I'd be very surprised
> > > if that was the case. I had a look at systemd documentation, which
> > > confirmed to me that when the user instance of systemd shuts down, it
> > > will stop all services that haven't explicitly requested not to be
> > > stopped.
> > 
> > The man page of logind.conf seems wrong.  The default value of
> > KillUserProcesses is "no" in the recent versions, judging from the
> > configure.ac; i.e. systemd doesn't behave aggressively to kill user
> > processes at logout.
> > 
> > Maybe this setup can be the difference between distros?
> 
> The default value of KillUserProcesses can indeed cause differences
> between distros, because it was changed to "yes" a couple of years ago.
> I suppose you have an older version, since configure.ac doesn't exist
> any more (systemd uses meson as the build system nowadays). Also, some
> distros may have reverted the default back to "no" due to problems that
> KillUserProcesses can cause.

Yes, that's a plausible explanation of the differences.

> However, I'm not talking about KillUserProcesses in the quoted
> paragraph. I'm talking about the situation where there is a user
> instance of systemd running and managing pulseaudio. Pulseaudio ships
> .service and .socket files for systemd, which suse apparently doesn't
> use. If suse were to use those, then the user instance of systemd would
> manage the lifecycle of the pulseaudio daemon, and when the user
> instance of systemd shuts down on logout, it should stop all services
> it's managing (but not anything that it isn't managing). Logind's
> KillUserProcesses is a different thing, and it should enter the picture
> only if there's still something from the session running after systemd
> has shut down.

Ah good point.  I checked the openSUSE Tumbleweed, the latest rolling
release, and indeed it's using already the systemd stuff for starting
up.  It means that the issue is seen only with the older versions.

So, I guess this isn't a thing to be fixed in the PA code, but it's
more about the configuration; maybe worth to warn about it in the
documentation, though.


thanks,

Takashi


More information about the pulseaudio-discuss mailing list