Created attachment 132340 [details] Figures 1-4 showing different greeters (login screens) and frozen session SUMMARY Session management is totally broken - system does not work with multi-user parallel sessions STEPS TO REPRODUCE 1) Starting with fresh boot and no sessions running, the greeter is displayed with list of users - lets say User1, User2, User3, and User4, a password prompt, and additional options such as "Sleep, Restart, Shutdown, Other," and also a drop down to select session type such as "Plasma, Plasma Wayland..." and also a "Virtual Keyboard." Lets call this the normal greeter (see Figure 1.). If User1 logs in and starts a session (vt7), then locks the session the normal greeter is NOT displayed but rather a greeter that only displays a single option which is to unlock User1 session. Lets call this the broken greeter(see Figure 2). No option appears to start any new session and there is no option such as "Sleep, Restart, Shutdown, Other." So the system can only be unlocked/used by user1 and no other user can login or start a session or do anything else. Obviously this is not the desired/expected behavior. 2) User1 from situation above unlocks the session, and from application menu selects "Power/Session" > "Switch User." First of all this is totally stupid because only User1 can do this which defeats the purpose because we need a way for User2 etc to start a session without loging in to User1. But lets just see the behavior. The normal greeter appears and displays list of users and all the other expected options. Now User2 can login and start a session (vt8). If the session is locked we see again the broken greeter. No option appears to start any new session etc. The only way to get back to User1 on vt7 is to use Ctrl+Alt+F7 which switches to vt7 where the the broken greeter appears. 3) We now have User1 (vt7) and User2 (vt8) and can toggle those with Ctrl+Alt+F7(F8). So lets go to vt8 and unlock then "Power/Session" > "Switch User." Now we see yet another greeter(see figure 3). This time a list of sessions is displayed (eg User1 on TTY 7) and there are options "Switch to This Session, "Start New Session," or "Back." Lets select "User1 on TTY 7" and then "Switch to This Session." This results in the session becoming frozen and displaying only the Desktop wallpaper and mouse cursor(see Figure 4). Mouse clicks Alt+F2 have no response. Ctrl+Alt+F7 returns you to the session on vt7, where the broken greeter appears but which functions to allow User1 to unlock the session. Session on vt8 can be killed with Ctrl+Alt+Backspace x 2. Unfortunately if User1 then tries to initiate a new session for User2 the session starts but only progresses to a frozen session again. Clearly this is unacceptable and totally borked. Session management has serious issues and does not function properly. This is limiting the system to a single user. OBSERVED RESULT Can not use the system with multiple users. If one user starts session and locks it, there is no option for any other user to start a session. Switching sessions from within a session causes current session to become frozen. EXPECTED RESULT System should work with multiple users! When a user starts a session and then locks the session there should be an option for other users to start a new, or unlock already running, parallel session. When attempting to switch to a parallel session current session should not be come frozen. SOFTWARE/OS VERSIONS Windows: macOS: Operating System: openSUSE Tumbleweed 20201012 KDE Plasma Version: 5.20.0 KDE Frameworks Version: 5.75.0 Qt Version: 5.15.1 Kernel Version: 5.8.14-1-default OS Type: 64-bit Processors: 6 × AMD Phenom(tm) II X6 1055T Processor Memory: 15.6 GiB of RAM Graphics Processor: Quadro K2000/PCIe/SSE2 ADDITIONAL INFORMATION
I'd like to add that I do have a "Switch User" button on the lock screen here when using KDM as login manager. But when using SDDM, the button is missing here too. I'm using Leap 15.2 with an older systemd btw (but Plasma 5.20.0 from additional repos).
(In reply to Wolfgang Bauer from comment #1) > I'd like to add that I do have a "Switch User" button on the lock screen > here when using KDM as login manager. > > But when using SDDM, the button is missing here too. > > I'm using Leap 15.2 with an older systemd btw (but Plasma 5.20.0 from > additional repos). Thanks for testing that out on SDDM and confirming the issue. Just to be clear I'm using SDDM but I've tried using xdm, lightdm on Tumbleweed but when I lock the session I always get the greeter/lockscreen missing the switch user options.
(In reply to Eric Johnson from comment #2) > Thanks for testing that out on SDDM and confirming the issue. Just to be > clear I'm using SDDM but I've tried using xdm, lightdm on Tumbleweed but > when I lock the session I always get the greeter/lockscreen missing the > switch user options. There's specific code to support KDM. The others you mention should fall into the same category as SDDM IIANM (though I'm not sure if xdm actually supports that at all).
PS: I suppose org.kde.plasma.private.sessions in plasma-workspace (https://invent.kde.org/plasma/plasma-workspace/-/blob/master/components/sessionsprivate/sessionsmodel.cpp , https://invent.kde.org/plasma/plasma-workspace/-/blob/master/components/sessionsprivate/sessionsmodel.h) should be ported away from (the deprecated?) KDisplayManager, like it was done for Kicker/the application menu in https://invent.kde.org/plasma/plasma-workspace/-/commit/05414ed58d43d87d907326636faac53ae2e7bd60 . Maybe that would fix the missing button? That's what the lockscreen uses to determine whether the button should be shown, at least: visible: sessionsModel.canStartNewSession && sessionsModel.canSwitchUser
(In reply to Wolfgang Bauer from comment #4) > visible: sessionsModel.canStartNewSession && sessionsModel.canSwitchUser OTOH, why does it check for both properties? Shouldn't it be shown also if only one of them is possible? Or only the latter one at least? No idea if that is relevant in reality though.
And that's exactly the problem here (when using SDDM): sessionsModel.canStartNewSession is true, but sessionsModel.canSwitchUser is false, so the button is not shown. If I change it to visible:true (so the button is shown unconditionally), creating a new session works but switching to a parallel running session does not (the list is empty). So apparently the real problem is that sessionsModel.canSwitchUser is not set properly here (in the non-KDM case at least).
(In reply to Wolfgang Bauer from comment #6) > So apparently the real problem is that sessionsModel.canSwitchUser is not > set properly here (in the non-KDM case at least). I mean that the detection whether user switching is possible does not work properly. Although, the problem seems to be more general than just affecting the lock screen. If I choose "Switch User" from the application menu, it directly jumps to the SDDM login screen (shouldn't it show a list of existing parallel sessions if there are some?) I thought user switching (i.e. to an existing parallel session) should be possible with SDDM, shouldn't it?
(In reply to Wolfgang Bauer from comment #6) > And that's exactly the problem here (when using SDDM): > sessionsModel.canStartNewSession is true, but sessionsModel.canSwitchUser is > false, so the button is not shown. Hm. Today sessionsModel.canSwitchUser is true (with SDDM), and the button shows up. So I cannot investigate at the moment why KDisplayManager::isSwitchable() returned false. (*) But if I click the "Switch User" button on the lock screen with other sessions running, it still directly switches to the login screen. Shouldn't it show a list of existing sessions to switch to instead? And Plasma's user switch applet doesn't show other user sessions either, only the current one. (*) PS: I did have a look in qdbusviewer yesterday when it was not working. All expected DBUS services/interfaces seemed to be there, and the "CanMultiSession" property of the current session was true. So AFAICS, KDisplayManager::isSwitchable() should have returned true, but obviously something went wrong there.
(In reply to Wolfgang Bauer from comment #8) > But if I click the "Switch User" button on the lock screen with other > sessions running, it still directly switches to the login screen. Shouldn't > it show a list of existing sessions to switch to instead? > And Plasma's user switch applet doesn't show other user sessions either, > only the current one. Also this works with KDM, I do get a list of existing sessions then if I click the button, with two options to "Switch to session" and "Create a new session". Only if there are no other sessions do I get to the login screen immediately. And the user switch applet does show the other sessions too.
Argh! Please ignore comment#8: (In reply to Wolfgang Bauer from comment #8) > Hm. > Today sessionsModel.canSwitchUser is true (with SDDM), and the button shows > up. > So I cannot investigate at the moment why KDisplayManager::isSwitchable() > returned false. (*) I modified SessionsModel::canSwitchUser() to always return true as a test yesterday evening, but I didn't remember that I already installed that patched version... So it is still (reliably) broken here with SDDM, sessionsModel.canSwitchUser is false because KDisplayManager::isSwitchable() returns false for some reason. That's likely also the reason why the session list was still empty this morning. (on the positive side, this should make it easier to further investigate the problem... ;-) )
*** This bug has been marked as a duplicate of bug 423526 ***