Bug 510997

Summary: Plasma Login Manager does not recall the last session saved to its profile
Product: [Plasma] plasma-login-manager Reporter: Christopher Snowhill <kode54>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kde, kdedev, olib141, site.kde
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.5.90
Sentry Crash Report:

Description Christopher Snowhill 2025-10-24 07:10:17 UTC
SUMMARY
Plasma Login Manager manages to save which session I last started with it to the state config, but fails to load it back on log out back to it.

STEPS TO REPRODUCE
1. Start plasma-login-manager
2. Log into Plasma Wayland
3. Log out

OBSERVED RESULT
Plasma Login Manager correctly selects my user, but only selects the first session in the list, which is not Plasma Wayland.

EXPECTED RESULT
Login manager should also select the correct session on my two displays.

SOFTWARE/OS VERSIONS
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.5.0
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0

ADDITIONAL INFORMATION
I am using the testing repositories, so I get Plasma 6.5.0 sooner. However, I see that qt6 is flagged as out of date. I am building plasma-login-manager-git using the AUR package.
Comment 1 Oliver Beard 2025-10-24 15:28:35 UTC
From discussion with the user, after inserting:

    console.log("!!!!", PlasmaLogin.StateConfig.lastLoggedInUser, PlasmaLogin.StateConfig.lastLoggedInSession);

following https://invent.kde.org/plasma/plasma-login-manager/-/blob/master/src/frontend/greeter/qml/Main.qml?ref_type=heads#L404

output is:

    !!!! chris /usr/share/wayland-sessions>
    !!!! 

This means that for some reason, the greeter sent a second login request following the first, which was successful. This request has an empty username and session. The backend appears to have told us this login was successful, so we save that username and session to the state config.

We should determine why the frontend is sending a second login request (I will attempt to reproduce this behaviour) and also why the backend tells us it was a success (when it cannot possibly be! — user and session are empty).
Comment 2 Christopher Snowhill 2025-10-24 21:30:30 UTC
I have realized it! It is closing and saving each screen separately, and I have not entered any username or password or configured any session on the second screen.

Yes, it opens a separate greeter view on each of my two screens, and they both have independent login/password form and independent session selectors.
Comment 3 David Edmundson 2026-01-14 14:59:55 UTC
*** Bug 507409 has been marked as a duplicate of this bug. ***