Inconsistent "Switch user" action on Plasma/LightDM

Hi Plasma friends,
New to KDE. Could set everything as wanted so far, but this… :pleading_face:
Please see System details below.

Case 1: Only one user logged in

  • action: Application Launcher > Leave > Switch user

  • response: LightDM login screen

  • expected response: exactly that :grinning:

Case 2: Two users already logged in

  • action: Application Launcher > Leave > Switch user (same as before)

  • response: Plasma lock screen

  • expected response: LightDM screen :unamused:

Operating System: EndeavourOS
KDE Plasma Version: 5.21.
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Kernel Version: 6.0.9-arch1-1
OS Type: 64-bit
Graphics Platform: X11
DM: LightDM

~/.Xresources (on both users’)

xscreensaver-auth.default.*.newLoginCommand: dm-tool switch-to-greeter

Any thoughts…?

The reason you aren’t getting a response is probably because nobody who has read this knows the answer. :sweat_smile:

Most people use SDDM with Plasma. SDDM has historically had limitations around user switching so my guess would be that Plasma is handling it internally because of that. That is just speculation on my part though.

Also, welcome to the community!


Thank you for your answer and for the warm welcome!

Ok. I myself ended up trying LightDM after running into some SDDM limitations.

I´ll keep trying to figure this out and post if I get progress… maybe someone will find it usefull someday.

1 Like

SDDM limitations? Like what would that be? I use Kde and i don’t see any issues the way i use it. :thinking:

OK. I didn´t mean to heart anybody´s feelings. I´m sorry if I did.
Just looking for some help here.

Having said that and going back to your question:
Do you really want me to make a list of the limitations I´ve found? Here? On this thread?
Wouldn´t that be off topic?
Actually, isn´t the question off topic?
Aren´t moderators supposed to watch for that?

I will be happy to answer, but that won´t help solve the issue for which this thread existis.

Maybe change POV for this task.
KDE is tightly connected (assumes it is the DM) with SDDM, which is not, in your case.

An idea, after reading this issue, is to Lock the screen, when you want to switch user.
I don’t know how this would behave, but… here you are to test and feed back :wink:

AFAIK Lightdm includes dm-tool to send messages/actions to lightdm greeter, which is not the case for SDDM (to my knowledge).

1 Like

Not hurting anyone’s feelings. I just don’t understand your issue because i don’t use lightdm on Kde and i only have a single user.

Thanks for the answer

Using Launcher > Leave > Lock takes me to Plasma lock screen, which is exactly what I am tring to avoid.

This is great. It works like a charm.
dm-tool switch-to-greeter does the job form console and from a bash file!!!

Is there any way to change Plasma behaviour when Launcher > Leave > Switch user and when Launcher > Leave > Lock are clicked, so as to execute dm-tool command instead of calling the lock screen?

The only one in GUI settings (that I know) is the commands for shutdown and reboot.

You may also create a shortcut/icon on a toolbar/panel that would run a command. With this, current Lock settings in various pages (Lock screen, SDDM=>Behavior, Battery) would be better disabled, to not interfere.

1 Like

Hi there.
OK. I have been busy serching and testing… and found a way arround. I would be too much to call it a solution thought.

Firt thing I learnt is that all this stuff is useless:

…because on EndevourOS / Plasma, XScreenSaver is not installed/used.

After petsam pointed me to using dm-tool, I came to this post:

…where they suggest replacing KDE screenlocker greeter executable binary file ( kscreenlocker_greet ) with an executable shell script that uses dm-tool to handle user switching and screen locking.

I modified the script to make it a smoother kscreenlocker_greet fake.

This is the result:



# kscreenlocker_greet fake
# handles screen locking and user switching by means of dm-tool

if [ $2 = '--switchuser' ]
    dm-tool switch-to-greeter
    dm-tool lock

if [ $retval == 0 ]
     echo 'Locked at' $(date +%s) # same thing kscreenlocker_greet would output

exit $retval

# Reference for future mods
# Sample parameters passed to kscreenlocker_greet when called
# for Application Launcher > Leave > Switch user
# --immediateLock --switchuser --ksldfd 38
# for Application Launcher > Leave > Lock
# --immediateLock --ksldfd 36

Please beware I am a complete newbie and, as such, I am not system-level conscious of the repercusions this may have.

The script of the previous post may solve the inconsistency explained at the beginning of the thread, but it has its drawbacks:

  1. Not a neat solution. In fact, I will wait a couple of day before considering the thread solved to see if somebody finds a problem I have missed

  2. LightDM Unlocking fails randomly (at least in my PC). Please see User gets logged out after unlocking! - LightDM/Plasma(X11)

Well, I can’t follow, or you are hiding your true identity or Linux knowledge. :face_with_head_bandage:
If you are really a newbie, I would definitely suggest against replacing system packages files, even if your custom replacements are working.

Nobody can in fact find any problem, while you are the only one who can test it practically (not in theory), unless a DM developer shows up.

I slightly see an invitation towards other users, to test your custom Franken on their own systems.
That’s bold for a newbie (as self introduced). Maybe it’s time to uncover your true identity, Linus. :stuck_out_tongue_winking_eye:

There are several aspects you should gain some more knowledge on, before you contribute to sddm/lightdm development, like how Xorg server, logind/systemd works, what $DISPLAY is and more.

Keep on reading, and don’t forget to give feedback on your personal endeavour. :+1:

BTW, you should mention this topic on the new one you have opened to troubleshoot issues from this topic’s solution, or just keep everything in one place (here).

Personally I’d just stick to SDDM on KDE Plasma. :wink:


Seems like somebody had a rough day at kindergarten

The problem is this forum complains now that the topic has a solution, which is pretty irritating. In addition, I’m getting a hint to welcome somebody to the community.

@panchuz Bienvenido al foro, es un poco dificil buscar ayuda en algun sitio de Internet algunas veces en la manera que la gente contesta, tienes que tratar de acostumbrarte. Pueden juzgarte de la manera que contestas en este topic solamente. Perdoname pero puedo escribir mejor en ingles que español aunque esto no vino por tradución.

This is a somewhat educated guess but

Lightdm runs on tty1 and your users are on tty2 and maybe tty3. When you go to switch instead of dropping to lightdm you’re dropping to the others users tty. Instead of tty1 which is likely some weird interaction with lightdm and plasma.

Something like this happens with plasma Wayland when running sddm in Wayland mode without using git version.

Which version of lightdm are you using?

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.