Bug 435389

Summary: User switching freezes at login
Product: [Plasma] kwin Reporter: Rex Dieter <rdieter>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: adamw, alex765, bcotton, kde, nate
Priority: VHI    
Version: 5.21.3   
Target Milestone: ---   
Platform: Other   
OS: Other   
URL: https://github.com/sddm/sddm/pull/1371/commits/308fd0df2583b02251f0d80c397ccbf9fa7a9e04
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Rex Dieter 2021-04-05 17:26:40 UTC
Using plasma-5.21.3 on fedora 34 with systemdBoot=true with wayland user sessions, starting with
krunner -> new session
(warning - new session) -> ok
screen blinks -> sddm (I think)
switch-user -> hang (mouse, stops moving)
Comment 1 Rex Dieter 2021-04-05 17:28:34 UTC
fedora downstream bug,
https://bugzilla.redhat.com/show_bug.cgi?id=1929643
Comment 2 Nate Graham 2021-04-07 22:25:16 UTC
Can confirm.
Comment 3 Rex Dieter 2021-04-08 17:50:08 UTC
Since this feature is fraught with peril and can lead to a frozen system... in the meantime, is there any (easy?) way to disable the user switch feature?
Comment 4 Vlad Zahorodnii 2021-04-08 20:39:54 UTC
When user switches back, session becomes active for a brief moment and then goes back to being inactive. I checked it and kwin doesn't temper with the session, it must be something else.
Comment 5 Nate Graham 2021-04-08 20:47:18 UTC
ksmserver maybe?

User switching works for me on X11 with systemd startup BTW.
Comment 6 David Edmundson 2021-04-08 21:10:24 UTC
> is there any (easy?) way to disable the user switch feature?

There's a kiosk key, but I don't think that's an avenue worth spending any time on. 

It sounds like a case of SDDM just not getting to the right VT and ending up somewhere with no getty nor greeter
Comment 7 Vlad Zahorodnii 2021-04-09 06:01:47 UTC
I cannot reproduce this issue when using GDM, so it does look like SDDM accidentally deactivates the session or something.
Comment 8 David Edmundson 2021-04-13 11:22:21 UTC
I think we're in danger of mixing up multiple different logout issues. The downstream report is quite confusing.

From my testing:

When we start a new session, it seems SDDM tries to start on what it assumes in the next available VT. It used 1 for the first greeter, so it goes on to VT 2.
Our wayland session is on VT2, so it obviously fails. 

We try this 3 times and then get left in a weird state. This is why we don't get a user switch screen, we're still on the initial lock screen. It also potentially explains why we don't go back to a greeter after logout as SDDM is in a weird state.

I will follow up on this very specific issue, and then we can see where we end up.
Comment 9 David Edmundson 2021-04-13 11:33:59 UTC
I can confirm that: https://github.com/sddm/sddm/pull/1371/commits/308fd0df2583b02251f0d80c397ccbf9fa7a9e04

fixes that specific issue. Logout afterwards seemed to work.
Comment 10 Adam Williamson 2021-04-13 15:48:31 UTC
What Kamil is describing and what Geraldo is describing in the downstream bug may not necessarily be the same thing. Kamil's reports are usually accurate and comprehensive, so I'd focus on that part. I'll try and get them both to test a build with your fix, thanks.