Bug#594001: PA doesn't stop running after X-session has ended, although it is started as a session daemon
Alexander Kurtz
kurtz.alex at googlemail.com
Sun Aug 22 22:43:39 UTC 2010
Package: pulseaudio
Version: 0.9.21-3
Severity: normal
Tags: patch
Hi,
if PA is started as a X session daemon using the script under
/usr/bin/start-pulseaudio-x11, for example during startup of GNOME or
other desktop environments, it will continue to run even if the X
session has ended. If you log into a VT after logging out of X you will
see something like this:
$ ps -fu 1000
UID PID PPID C STIME TTY TIME CMD
1000 15881 1 0 00:13 ? 00:00:00 /usr/bin/pulseaudio --start
1000 16463 15730 0 00:14 tty2 00:00:00 -bash
1000 16473 16463 0 00:15 tty2 00:00:00 ps -fu 1000
I think this is wrong because PA was started explicitly for the
X-session and should therefore exit with it.
This behaviour is not only annoying because you have needless processes
flying around, but apparently also causes several bugs:
* #556971[1]: "pulseaudio does not remember volume settings, always set to 0"
* #593746[2]: "pulseaudio doesn't support that $XAUTHORITY may have changed after logout/login"
* #593952[3]: "hotplugging devices doesn't work completely if PA was started during earlier X-session"
* maybe more?
The attached patch is a dirty hack to shutdown PA once the X-session has
ended. I know that this is no proper way to get the job done, but I
spent the last hour googling for some way to detect the end of a
X-session and didn't find anything remotely useful. This solution
a) does at least work
b) uses very few ressources (almost none)
I therefore think it's a good starting point, however I very much hope
that someone comes up with something not that ugly.
Best regards
Alexander Kurtz
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556971#12
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593746
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593952
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kill-pulseaudio-with-x-session.patch
Type: text/x-patch
Size: 446 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-pulseaudio-devel/attachments/20100823/90240577/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-pulseaudio-devel/attachments/20100823/90240577/attachment.pgp>
More information about the pkg-pulseaudio-devel
mailing list