Bug 484259

Summary: Auto login behaviour has X11 session selected even though Wayland is currently in use
Product: [Applications] systemsettings Reporter: Malte S. Stretz <mss>
Component: kcm_sddmAssignee: Plasma Bugs List <plasma-bugs>
Status: REOPENED ---    
Severity: normal CC: kde, kde, nate
Priority: NOR    
Version: 6.0.2   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=432018
https://bugs.kde.org/show_bug.cgi?id=484260
Latest Commit: Version Fixed In:
Attachments: /etc/sddm.conf.d/kde_settings.conf
Screenshot
diff between old and fixed settings

Description Malte S. Stretz 2024-03-22 17:25:53 UTC
Created attachment 167616 [details]
/etc/sddm.conf.d/kde_settings.conf

SUMMARY

After an upgrade from 5.27.10 (4:5.27.10-0xneon+22.04+jammy+release+build28) to 6.0.2 (4:6.0.2-0xneon+22.04+jammy+release+build32) auto-login does not work anymore. So I went to the SDDM settings to enable it again. According to the UI the feature is still enabled though SDDM seems to ignore it.

I saw this before and can disable and re-enable the feature to fix this. Last time I did this I accidentially switched from Wayland to X11 though because the drop down list has "Plasma (X11)" instead of "Plasma (Wayland)" selected.

I guess that the session was renamed on upgrade and it can't find the old session file anymore. If that happens it should fall back either to the session type which is currently running.

I will attach a screenshot and the kde_settings.conf from /etc/sddm.conf.d

STEPS TO REPRODUCE
1. Upgrade from 5.x to 6.0.2
2. Notice that Auto Logon does not work anymore
3. Go to KCM to fix it

OBSERVED RESULT
Session "Plasma (X11)" is preselected even though I am running a Wayland session right now and the kde_settings.conf still has the Session=plasmawayland set.

EXPECTED RESULT
"Plasma (Wayland)" should be selected.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 6.0
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.5.0-26-generic (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6300U CPU @ 2.40GHz
Memory: 19,4 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520
Manufacturer: LENOVO
Product Name: 20F9CTO1WW
System Version: ThinkPad T460s

ADDITIONAL INFORMATION
This sounds like bug 432018 came back.
Comment 1 Malte S. Stretz 2024-03-22 17:27:15 UTC
Created attachment 167617 [details]
Screenshot
Comment 2 Malte S. Stretz 2024-03-22 17:41:06 UTC
Created attachment 167621 [details]
diff between old and fixed settings

I fixed the settings and the cause for this behaviour seems to be that the session "plasmawayland" was renamed to just "plasma". Some backwards compatibility would be nice.
Comment 3 Nate Graham 2024-04-11 23:21:00 UTC

*** This bug has been marked as a duplicate of bug 483006 ***
Comment 4 Malte S. Stretz 2024-04-12 07:11:34 UTC
This is not a duplicate of bug 483006. That one is describing the root cause which leads to the suboptimal behaviour of the KCM as described in the summary.

There are a few things which can be improved in the KCM when such a thing (the session definition pointed at in the config disappears) happens:

1. The "Automatically log in" check mark should be disabled. Instead maybe a message should appear with a text like "The previously configured auto-login session is invalid. Please select a new one".

2. The value in "with session" should not default to "Plasma (X11)". That is actually the opposite of what is wanted according to bug 483006. It should at worst default to "Plasma (Wayland)". I think some heuristics can be added to make it default to the Plasma session for the currently running composer. Or even the currently running session but it looks like that information is not readily available anymore.

I already digged a bit through the source code and might have a shot at this when I have some spare time.