Bug 485769 - Autologin settings for SDDM not read from kde_settings.conf correctly
Summary: Autologin settings for SDDM not read from kde_settings.conf correctly
Status: REPORTED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_sddm (show other bugs)
Version: 6.0.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-19 01:22 UTC by Flozza
Modified: 2024-05-07 23:50 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
State of SDDM screen once existing settings have been manually filled in (Apply now greyed out) (111.98 KB, image/png)
2024-04-19 01:22 UTC, Flozza
Details
State of SDDM screen after setting up autologin (notice "Apply" is active) (83.32 KB, image/png)
2024-04-19 01:23 UTC, Flozza
Details
Contents of kde_settings.conf (210 bytes, text/plain)
2024-04-19 01:24 UTC, Flozza
Details
systemsettings output when loadking kcm_sddm (7.25 KB, text/plain)
2024-04-24 10:22 UTC, Flozza
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Flozza 2024-04-19 01:22:41 UTC
Created attachment 168658 [details]
State of SDDM screen once existing settings have been manually filled in (Apply now greyed out)

SUMMARY

The "Login Screen (SSDM)" settings for autologin don't seem to be read into the UI correctly.


STEPS TO REPRODUCE
1. Go to "Login Screen (SSDM)" and select "Behavior"
2. Configure "Automatically log in" by ticking the box "as user" and selecting a user. Choose either session (I used Wayland).
3. Apply
4. Go back to SSDM theme settings. The "Apply" button appears to show there are changes to apply.
5. Check /etc/sddm.conf.d/kde_settings.conf - they should contain the correct values in the [Autologin] section now
6. Go to "Behavior" again. The "Automatically log in" settings are disabled again. The Apply button is still showing there's changes to apply.
7. Manually restore the exact settings as before: The Apply button is now greyed out. It has recognised these are the settings already in the file.
8. Move back to themes and select "Apply". The kde_settings.conf has removed the autologin configuration.

OBSERVED RESULT

Settings UI does not correctly load autologin settings from kde_settings.conf. Upon changing the values, it realises those are already set. When changing any other settings, it will rewrite the file, but without the correct autologin configuration. If autologin is configured in the settings file and no further settings are applied then autologin works.

EXPECTED RESULT

The settings UI correctly reads and displays the autologin settings when opening the UI.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux (kernel 6.8.7) under Wayland
(available in About System)
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION

I am also having issues changing the background image, but I haven't dug into that yet and I'm not sure if they are related.
Comment 1 Flozza 2024-04-19 01:23:29 UTC
Created attachment 168659 [details]
State of SDDM screen after setting up autologin (notice "Apply" is active)
Comment 2 Flozza 2024-04-19 01:24:45 UTC
Created attachment 168660 [details]
Contents of kde_settings.conf
Comment 3 Li Jiajun 2024-04-20 14:26:18 UTC
As a common user, I can reproduce this. Seems a regression.
Version: sddm-kcm 6.0.4
Comment 4 Matthias 2024-04-24 09:37:47 UTC
Did we rule out, that this is the theme?
Comment 5 Matthias 2024-04-24 10:00:11 UTC
Same with Oxygen and Breeze.
Comment 6 Flozza 2024-04-24 10:22:28 UTC
Created attachment 168858 [details]
systemsettings output when loadking kcm_sddm

When I run `systemsettings kcm_sddm` via console I get the output in the attached log.txt. To my untrained eyes they seem like unrelated warnings, but somebody with more knowledge might spot an issue in there. Many of the warnings in there seem unrelated to kcm_sddm as they don't appear when I run `kcmshell6 kcm_sddm`.

The only warnings I see when running `kcmshell6 kcm_sddm` are these:

qrc:/kcm/kcm_sddm/main.qml:161:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
QNetworkReplyImpl::_q_startOperation was called more than once QUrl("")
qrc:/kcm/kcm_sddm/main.qml:131:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
qrc:/kcm/kcm_sddm/main.qml:128:5: QML DetailsDialog: Binding loop detected for property "implicitHeight"
qrc:/kcm/kcm_sddm/main.qml:128:5: QML DetailsDialog: Binding loop detected for property "implicitHeight"
qrc:/kcm/kcm_sddm/main.qml:128:5: QML DetailsDialog: Binding loop detected for property "implicitHeight"
qrc:/kcm/kcm_sddm/main.qml:128:5: QML DetailsDialog: Binding loop detected for property "implicitHeight"
qrc:/kcm/kcm_sddm/main.qml:176:13: QML QQuickImage*: Protocol "" is unknown
qrc:/kcm/kcm_sddm/main.qml:161:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
file:///usr/lib/qt6/qml/org/kde/kirigami/ActionTextField.qml:194: TypeError: Cannot read property 'verticalCenter' of null
file:///usr/lib/qt6/qml/org/kde/kirigami/ActionTextField.qml:194: TypeError: Cannot read property 'verticalCenter' of null
Comment 7 Flozza 2024-04-24 13:03:00 UTC
I did some more testing and may have found the cause of this behaviour: https://invent.kde.org/frameworks/kirigami/-/commit/458003901cfcdbea2e3789e320d44725f5a18428

By using git bisect I was able to narrow it down to this commit and if I revert it on current master then settings are filled in correctly. I know way too little to figure out why this would be the case, but I hope it helps someone with the fix.
Comment 8 medin 2024-05-05 23:25:09 UTC
I confirm the issues, there are two:

1) That Apply button does nothing even if I click many times on it and entering the correct password, the changes are saved to "/etc/sddm.conf.d/kde_settings.conf" only after many attempts.

2) After rebooting and successfully auto login to Wayland or X11, the autologin values previously saved in SDDM GUI are lost and autologin appear disabled, while inside "kde_settings.conf" it's still enabled.

Operating System: Manjaro Linux 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.9-1-MANJARO (64-bit)
Comment 9 medin 2024-05-07 23:50:30 UTC
(In reply to medin from comment #8)
> I confirm the issues, there are two:
> 
> 1) That Apply button does nothing even if I click many times on it and
> entering the correct password, the changes are saved to
> "/etc/sddm.conf.d/kde_settings.conf" only after many attempts.
> 
Sorry, this seems caused by bug485407.