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 (other bugs)
Version First Reported In: git-stable-Plasma/6.1
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 Florian Ruechel
Modified: 2025-06-29 10:14 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


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, Florian Ruechel
Details
State of SDDM screen after setting up autologin (notice "Apply" is active) (83.32 KB, image/png)
2024-04-19 01:23 UTC, Florian Ruechel
Details
Contents of kde_settings.conf (210 bytes, text/plain)
2024-04-19 01:24 UTC, Florian Ruechel
Details
systemsettings output when loadking kcm_sddm (7.25 KB, text/plain)
2024-04-24 10:22 UTC, Florian Ruechel
Details
Screenshot_shows_fixing_the_issue_by_reverting_the_commit_of_kirigami (133.38 KB, image/png)
2024-06-22 09:23 UTC, Li Jiajun
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Ruechel 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 Florian Ruechel 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 Florian Ruechel 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 Florian Ruechel 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 Florian Ruechel 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.
Comment 10 Dashon 2024-06-18 12:40:49 UTC
Also running into this issue into plasma 6.1
Comment 11 Li Jiajun 2024-06-22 09:23:23 UTC
Created attachment 170803 [details]
Screenshot_shows_fixing_the_issue_by_reverting_the_commit_of_kirigami

Flozza is right. 
I fixed the issue by comment out the commit of kirigami 458003901cfcdbea2e3789e320d44725f5a18428
Perhaps  SDDM-KCM requires modifications to accommodate the changes implemented in Kirigami.

Here is my patch to comment out that commit as temporal fix.

From ccc65a2a206de614acb13154d40516fe5082c45a Mon Sep 17 00:00:00 2001
From: wlmqljj <wlmqljj@gmail.com>
Date: Sat, 22 Jun 2024 16:51:12 +0800
Subject: [PATCH] revert
 https://invent.kde.org/frameworks/kirigami/-/merge_requests/1480

---
 src/layouts/columnview.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/layouts/columnview.cpp b/src/layouts/columnview.cpp
index 583a8885..bb729271 100644
--- a/src/layouts/columnview.cpp
+++ b/src/layouts/columnview.cpp
@@ -709,10 +709,10 @@ void ContentItem::updateVisibleItems()
                 m_visibleItems.removeAll(item);
             });
             attached->setInViewport(true);
-            item->setEnabled(true);
+            // item->setEnabled(true);
         } else {
             attached->setInViewport(false);
-            item->setEnabled(false);
+            // item->setEnabled(false);
         }
     }
 
-- 
2.45.2
Comment 12 Thomas Bertels 2024-09-30 16:10:09 UTC
A simple way to reproduce is to disable session auto login then re-enable it.

A workaround is to edit the /etc/sddm.conf.d/kde_settings.conf file and replace "Session=Plasma (X11)" or "Session=Plasma (Wayland)" by "Session=plasma".
Comment 13 Thomas Bertels 2024-09-30 16:33:34 UTC
Correction: for Wayland, Session is correctly set to "plasmawayland" but for X11 it's set to "Plasma (X11)" instead of "plasma", all without quotes.
Comment 14 Florian Ruechel 2025-06-28 14:24:02 UTC
This is fixed for me now on SDDM KCM version 6.4.1-1, would be curious to hear if it's working for other people now, too. I was able to simply enable it in the settings and it's working.
Comment 15 Thomas Bertels 2025-06-29 10:14:45 UTC
Same here with SDDM KCM 6.3.5-1.