Bug 434370 - Switch user fails
Summary: Switch user fails
Status: RESOLVED UPSTREAM
Alias: None
Product: ksmserver
Classification: Plasma
Component: general (show other bugs)
Version: 5.21.2
Platform: Other Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
: 453510 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-03-13 20:53 UTC by medin
Modified: 2022-05-09 17:10 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description medin 2021-03-13 20:53:02 UTC
I have one user, if I click switch user the session is closed then SDDM appears, I type my password then press enter but the splash screen freezes indefinitely and I should manually force power off my laptop to use it again.

Operating System: Manjaro Linux
KDE Plasma Version: 5.21.2
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.4.101-1-MANJARO
OS Type: 64-bit
Comment 1 Nate Graham 2021-03-15 23:34:27 UTC
The splash screen freezes, or the login screen freezes?
Comment 2 medin 2021-03-15 23:57:31 UTC
(In reply to Nate Graham from comment #1)
> The splash screen freezes, or the login screen freezes?

After entering password in SDDM and pressing enter, SDDM disappears and KDE splash boot with loading icon appears and freezes, and it never shows desktop no matter how much I wait for it.
Comment 3 Bharadwaj Raju 2021-03-25 17:28:18 UTC
(In reply to medin from comment #0)
> I have one user, if I click switch user the session is closed then SDDM
> appears, I type my password then press enter but the splash screen freezes
> indefinitely and I should manually force power off my laptop to use it again.

No, your session is preserved on the TTY it was open before (7 or 1 depending on your distro config). Press Ctrl+Alt+FN to switch to it and you'll see your session locked and preserved.

However maybe SDDM behaviour should be changed so if a user attempts to login to existing session it should redirect them to that TTY.
Comment 4 medin 2021-03-25 17:41:39 UTC
(In reply to Bharadwaj Raju from comment #3)
> (In reply to medin from comment #0)
> > I have one user, if I click switch user the session is closed then SDDM
> > appears, I type my password then press enter but the splash screen freezes
> > indefinitely and I should manually force power off my laptop to use it again.
> 
> No, your session is preserved on the TTY it was open before (7 or 1
> depending on your distro config). Press Ctrl+Alt+FN to switch to it and
> you'll see your session locked and preserved.
> 
> However maybe SDDM behaviour should be changed so if a user attempts to
> login to existing session it should redirect them to that TTY.

I just tested now, SDDM is using the same tty2.
Comment 5 Bharadwaj Raju 2021-03-25 17:50:40 UTC
For me my usual session opens on TTY1 and when selecting Switch User SDDM opens on TTY2.

Arch Linux, 5.21.3.
Comment 6 medin 2021-03-25 18:00:56 UTC
(In reply to Bharadwaj Raju from comment #5)
> For me my usual session opens on TTY1 and when selecting Switch User SDDM
> opens on TTY2.
> 
> Arch Linux, 5.21.3.

I'm sorry, you are right, I checked again and the original session used tty1, but after switching SDDM wants to start a new session with same user on tty2.
Comment 7 Nate Graham 2021-03-25 20:08:31 UTC
(In reply to Bharadwaj Raju from comment #3)
> However maybe SDDM behaviour should be changed so if a user attempts to
> login to existing session it should redirect them to that TTY.
This is a configurable behavior in SDDM. It's controlled by the value of ReuseSession=true in /etc/sddm.conf (or /etc/sddm.conf.d/kde_settings.conf, if you have that) and it now defaults to true in SDDM itself unless overridden by the user or the distro: https://github.com/sddm/sddm/blob/develop/src/common/Configuration.h#L94

So there are two options here:
1. You or your distro have set ReuseSession=false in the config file
2. Your distro is shipping an old version of SDDM that does not have this change of the default settings yet
3. There is a bug in SDDM preventing session re-using from working properly

Either way, this isn't a KDE bug. Please figure out which of those things is the problem, and then follow up with the appropriate party. :) Thanks!
Comment 8 medin 2021-03-25 21:28:38 UTC
(In reply to Nate Graham from comment #7)
> (In reply to Bharadwaj Raju from comment #3)
> > However maybe SDDM behaviour should be changed so if a user attempts to
> > login to existing session it should redirect them to that TTY.
> This is a configurable behavior in SDDM. It's controlled by the value of
> ReuseSession=true in /etc/sddm.conf (or /etc/sddm.conf.d/kde_settings.conf,
> if you have that) and it now defaults to true in SDDM itself unless
> overridden by the user or the distro:
> https://github.com/sddm/sddm/blob/develop/src/common/Configuration.h#L94
> 
> So there are two options here:
> 1. You or your distro have set ReuseSession=false in the config file
> 2. Your distro is shipping an old version of SDDM that does not have this
> change of the default settings yet
> 3. There is a bug in SDDM preventing session re-using from working properly
> 
> Either way, this isn't a KDE bug. Please figure out which of those things is
> the problem, and then follow up with the appropriate party. :) Thanks!

I have SDDM 0.19.0-3, and the option ReuseSession is truly set by default to false, I never touched this file.
After changing its value to true, the problem is solved, Thanks for your help :)
Comment 9 Nate Graham 2021-03-25 21:50:31 UTC
It sounds like there is a bug in SDDM then, if it defaults to false instead of true. Can you please file a bug on SDDM about this? Thanks!
Comment 10 Nate Graham 2022-05-09 17:10:12 UTC
*** Bug 453510 has been marked as a duplicate of this bug. ***