[02:58] <OvenWerks> Eickmeyer[m]: installed 20.04.
[02:58] <Eickmeyer[m]> OvenWerks: Cool.
[02:58] <OvenWerks> logged in and created second account (joe tester and jane tester)
[03:00] <OvenWerks> sorry called away, will talk later.
[03:08] <Eickmeyer[m]> No worries.
[05:29] <OvenWerks> without starting jack pulse starts and stops loging out and in to both accounts.
[05:30] <OvenWerks> Start jack with autostart and when logging out and into another account the second account has no audio and there are two autojacks running, one for each.
[05:30] <OvenWerks>  :P
[05:30] <OvenWerks> tried removing the & from the autojack command line still the same
[05:31] <OvenWerks> then also removed the redirection and still the same.
[05:32] <Eickmeyer[m]> Ok, so that means it's still not killing the process on logout, which means the process isn't being launched upon login by the user account, and therefore is not ending when the user logs out.
[05:33] <Eickmeyer[m]> You can launch something as the user, but the user doesn't necessarily have to be logged-in. Only if the user is logged-in and launches a process does it stay with that session.
[05:33] <OvenWerks> interesting fact. pulse audio has both a systemd user service as well as a file in autostart. But I notice that the way systemd deals with pulse has changed from 18.04 to 2004
[05:34] <Eickmeyer[m]> We need a systemd expert.
[05:35] <OvenWerks> in fact looking at the systemd logging, I see the various targets shutting down between one session and the next. The login screen is it's own session BTW
[05:35] <OvenWerks> Anyway, I think I will have better luck with the new systemd setup than the 1804 version
[05:35] <OvenWerks> it seems to be doing what I think it should.
[05:36] <OvenWerks>  I have to run journalctl sudo to see all of it though.
[05:39] <Eickmeyer[m]> That tells me the new version of -controls won't be backportable (new word).
[05:40] <OvenWerks> yes it will... it will merely have the same problems as with autostart
[05:40] <OvenWerks> it will be good to 18.04
[05:41] <Eickmeyer[m]> Ok.
[05:41] <OvenWerks> I may be able to get it to work on both for that matter as I learn more
[05:41] <OvenWerks> What we have been doing for months is rather than logout and in to a second account,,, just reboot.
[05:43] <OvenWerks> if you are reading the systemd journal, be aware that many of the targets in system have the same name as targets in the user side :P
[05:43] <OvenWerks> they both have Paths, Timers, Sockets, Basic, default, etc.
[05:43] <Eickmeyer[m]> Yeah, it's a matter of seeing which "user" is running the target.
[05:45] <Eickmeyer[m]> Unrelated, ladish has been marked for autoremoval from Debian Testing on March 5th. RIP
[06:18] <OvenWerks> ladish was something I looked at and never figured out how to use. Plugins have made session managers not as important anymore.
[06:19] <OvenWerks> Interestingly enough, time wise, the first session doesn't really stop until after the next one has already fully started.
[06:42] <OvenWerks> xfce offers the ability to run something in autostart at logout instead of login... but it seems to be non-standard.
[06:43] <OvenWerks> Eickmeyer[m]: I think I will need to download and install vanilla and see what they do.
[06:44] <OvenWerks> I think the way the session is set up is wrong. It doesn't make a call that tells systemd --user to shutdown.
[15:53] <Eickmeyer[m]> teward: Do we know anyone who is decent at systemd? There's an issue with ubuntustudio-controls that OvenWerks is trying to solve in regards to jack autostart.
[15:55]  * Eickmeyer[m] tags cyphermox , RikMills , RAOF , tsimonq2 , and Wimpress with the same question ^
[15:56] <RikMills> sadly no
[15:57]  * OvenWerks notes that logind.conf -> KillUserProcesses=yes does not really.
[16:35] <OvenWerks> adding an autostart item with a "RunHook=1" will run at logout... but seems to be xfce specific :P
[16:40] <OvenWerks> Eickmeyer[m]: https://blogs.gnome.org/benzea/2019/10/01/gnome-3-34-is-now-managed-using-systemd/
[16:56] <OvenWerks> loginctl kill-user <user_ID> works.
[16:56] <Eickmeyer[m]> So then, the question is, how do we get loginctl kill-user <user_ID> to run at logout?
[16:57] <OvenWerks> actually loginctl kill-user $USER works too. I am guessing that is a xfce thing
[16:58] <Eickmeyer[m]> loginctl is part of logind which is part of systemd. So no, not just an xfce thing.
[16:58] <OvenWerks> The little logout/restart/shutdown dialog
[16:59] <OvenWerks> what I mean is that the dialog that xfce uses to logout should do so with that command
[16:59] <Eickmeyer[m]> Darn, no sign of bluesabre in here.
[16:59] <Eickmeyer[m]> He'd know.
[16:59] <OvenWerks> I am not sure how a logout is supposed to be done
[17:00] <bluesabre> Hey!
[17:01] <OvenWerks> bluesabre: how does xfce deal with the logout button?
[17:01] <Eickmeyer[m]> Hey bluesabre !
[17:01] <Eickmeyer[m]> I also pinged laney (Ian Lane, mentioned in the article you linked OvenWerks ).
[17:02] <OvenWerks> Eickmeyer[m]: do you have a vanilla install somewhere?
[17:03] <Eickmeyer[m]> I do.
[17:03] <Eickmeyer[m]> (with ubuntustudio-installer, of course).
[17:04] <OvenWerks> if you do a boot->login->logout->login then in a terminal: journalctl --user -b
[17:04] <bluesabre> I think there’s an command like ‘xfce4-session —log-out’
[17:05] <bluesabre> Not currently near a Linux box to confirm
[17:05] <bluesabre> Oh
[17:05] <OvenWerks> then search for "Stopped target"
[17:06] <bluesabre> xfce4-session-logout
[17:06]  * Laney was summoned
[17:06] <bluesabre> https://manpages.ubuntu.com/manpages/precise/en/man1/xfce4-session-logout.1.html
[17:06] <Eickmeyer[m]> OvenWerks: Can you explain the situation to Laney ?
[17:07] <bluesabre> Pretty sure that does the heavy lifting
[17:07] <bluesabre> But I'll confirm when I get home
[17:07] <OvenWerks> Laney: we are noticing that systemd --user shows reaching targets but on logout the targets do not seem to get stopped.
[17:07] <OvenWerks> bluesabre: I will try then.
[17:08] <Laney> do you have StopWhenUnneeded=yes?
[17:08] <OvenWerks> Laney: I am wondering if this is true for all DEs or just xfce
[17:08] <OvenWerks> in which file?
[17:09] <Laney> in the the .target unit
[17:09] <Laney> Things are supposed to stop, yeah
[17:10] <OvenWerks> when I use: loginctl kill-user $USER things work.
[17:11] <OvenWerks> but when I use the logout button they dont This is bad because when jack is running and I logout one user and login to another user that new session gets not sound because the sound card is locked.
[17:12] <OvenWerks> Pulse is not so much of a problem because it only uses the device when it needs it.
[17:13] <OvenWerks> Laney: the thing is the .target files are standard (basic, default, etc.)
[17:14] <Laney> which target is staying alive when it shouldn't?
[17:14] <OvenWerks> All of them
[17:16] <Laney> you have some logic in your session manager to end things?
[17:16] <OvenWerks> when I do a journalctl --user -b after login-logout-login I see only Reached target messages, no Stopped target messages
[17:16] <Laney> for instance in gnome we start 'gnome-session-shutdown.target', which has Conflicts= on other .targets, which causes them to quit and so on
[17:17] <OvenWerks> xfce doesn't seem to have anything like that.
[17:17] <OvenWerks> ok so this is an xfce bug then.
[17:18] <Laney> and when the user session (the thing you see in loginctl) is ended, it should signal all remaining processes to quit
[17:18] <OvenWerks> that doesn't seem to happen
[17:19] <Laney> get the system in the state with a lingering process, SSH into it, and look at loginctl session-status THAT_SESSION_ID
[17:21] <OvenWerks> I tried setting KillUserProcesses=yes in logind.conf but no joy there either
[17:21] <Laney> it should be State: closing
[17:23] <OvenWerks> my laptop takes a while to boot :)
[17:38] <Laney> going to be disappearing shortly i'm afraid
[17:39] <OvenWerks> Laney: after reboot login-logout-login and loginctl shows two sessions
[17:39] <OvenWerks> (for the same user
[17:39] <OvenWerks> $ loginctl 
[17:39] <OvenWerks> SESSION  UID USER SEAT  TTY
[17:39] <OvenWerks>      c2 1001 jane seat0    
[17:39] <OvenWerks>      c4 1001 jane seat0   
[17:40]  * OvenWerks is using two users joe and jane for testing...
[17:40] <OvenWerks> c2 shows State: closing
[18:13] <OvenWerks> Laney: setting KillUserProcesses=yes sort of works. It does not work is that user is logged in remotely
[18:16] <OvenWerks> bluesabre: it appears that xfce when it shutsdown needs to ask for the exit.target from systemd and then maybe tell logind to exit. (or maybe just tell logind to exit is enough)
[18:27] <OvenWerks> xfce4-session-logout sends a debus message to org.xfce.SessionManager
[19:38] <OvenWerks> loginctl kill-session $user seems to be the secret sauce that works best
[19:39] <OvenWerks> even with a remote login at the same time, systemd hits the exit.target.
[19:43] <OvenWerks> systemctl --user exit 0  works reall well too
[20:16] <Eickmeyer[m]> Cool! Progress!
[20:18] <OvenWerks> dbus-send --session --reply-timeout=2000 --type=method_call --dest=org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager.Exit  kills things but does not reverse the targets.
[20:22] <OvenWerks> The reason I am looking at dbus sends is because that seems to be the way that a session talks to logind or systemd
[20:25] <OvenWerks> but I don't see a method for go to this target now. There is a set default target method, but I don't know if that would leave it default for next session or even if it would have effect right away.
[20:34] <OvenWerks> So, create a throwaway user to test :)
[20:56] <OvenWerks> Thes set default target method changes the default target until I delete the link :P so no good
[20:57] <OvenWerks> systemctl --user isolate exit.target goes to that target (isolate???)
[21:00] <OvenWerks> and stops all targets in between... but I do not know what dbus message that sends.