pulseaudio process does not close on logout
When running MATE desktop session, and log out (from GUI session),
I can see that 2 processes stay active: gam_server and pulseaudio.
Where gam_server closes itself after minute or two, pulseaudio user process stays active and does not close after user logout.
I suppose pulseaudio should close after user logged out and not stay active.
Updated by Gary Mills about 1 year ago
I'm seeing exactly the same problem. Here's my copy during a desktop session:
UID PID PPID C STIME TTY TIME CMD mills 67 1 0 Jul 12 ? 0:03 /usr/bin/pulseaudio --start --log-target=syslog
As you can see here, pulseaudio has already daemonized itself, becoming a child of process 1 (init). In this state, it can't respond to a desktop logout. It needs to remain a child of the process that started it, probably mate-session, so that it can receive the logout signal correctly.
Updated by Tim Mooney 5 months ago
I just checked latest hipster and the same issue is still present.
Gary might be correct, but based on the small amount of research I've done this afternoon, I'm not 100% convinced that pulseaudio is designed to be a child of the session. It seems like the default behavior (daemonize and run as the user) is what's happening here. I don't know if other distributions are using a session-cleanup-script with lightdm to run 'pulseaudio --kill', or something else is happening to shut it down on session exit.
I have found the first answer here https://unix.stackexchange.com/questions/204522/how-does-pulseaudio-start to be very useful, as it does appear that's how pulseaudio is being started on hipster too.