Remaining PA process after X logout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 26 Feb 2018 10:12:44 +0100,
Tanu Kaskinen wrote:
> 
> On Sat, 2018-02-24 at 11:17 +0100, Takashi Iwai wrote:
> > Hi,
> > 
> > we've stumbled on a long-standing issue with PA, namely, PA fails to
> > start after relogin quickly.  The details and discussions are found in
> >   https://bugzilla.suse.com/show_bug.cgi?id=1052437
> > 
> > In short, the problem is that the session management removes
> > $XDG_RUNTIME_DIR (/run/users/*) after logout while PA remains running.
> > This leaves also the ESD socket in /tmp/esd-$uid, too.  When re-login,
> > a new PA process is kicked off because the old socket in /run/user/*
> > is gone.  Then it hits with the existing /tmp/esd-$uid, considering as
> > a fatal error, hence it aborts.
> > 
> > 
> > Now the primary question is what's the right approach to fix this.
> > I guess the best would be to kill PA properly at each X session logout
> > instead of self-killing after idle.  Then where's the best place to put
> > that?
> 
> Does suse use systemd to manage the pulseaudio user service?

It's started by XDG autostart.

> If not,
> what component does remove $XDG_RUNTIME_DIR?

This is done by logind and pam_systemd, I suppose.

> It would seem logical that
> the same component would terminate services that break if their sockets
> are removed.

systemd *can* clean up the whole user-space (e.g. add
KillUserProcess=yes in /etc/logind.conf), but it's not enabled as
default.  There are users and services that want to keep running the
sfuff after logout (think of some computing task).  So forcibly
enabling this just for PA doesn't sound like a right solution,
either.

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

> > And, why this seems appearing only on KDE or else but not in GNOME is 
> > still another question.  Maybe there is any missing piece in other
> > DEs?
> 
> Maybe the gnome session management doesn't remove $XDG_RUNTIME_DIR?

No idea about it.  I'm no GNOME user / dev, either.


thanks,

Takashi


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux