Bug 342722 - Setting or unsetting Auto Login is not saved
Summary: Setting or unsetting Auto Login is not saved
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_users (show other bugs)
Version: 5.17.90
Platform: unspecified Linux
: NOR major
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 403628 413377 416449 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-11 06:14 UTC by Geoff
Modified: 2020-03-14 18:08 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.18.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geoff 2015-01-11 06:14:20 UTC
Following assigning 'Auto login' to a user the setting is non persistent following further logins and CANNOT be reverted back to manual login!

Reproducible: Always

Steps to Reproduce:
1. User Manager > edit user > Administrator: check  +  Auto Login: check
2. Reboot
3. User is logged in automatically

Actual Results:  
Following reboot auto login no longer checked, however user is still logged in automatically each time the system is reset. Cannot reset back to forcing manual login!

Expected Results:  
Login should be able to be reset to default manual login
Comment 1 Gabriel C 2016-10-19 12:04:04 UTC
Auto login does not work for SDDM is a GDM thing only in accountsservice.

Also I don't think we need this since sddm-kcm has *working* autologin..

1) remove that option from user-manager
or
2) hide it when DM !=  GDM ( I'm not so sure GDM works at all with a kde session )
Comment 2 Nate Graham 2020-01-21 16:16:42 UTC
*** Bug 413377 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2020-01-21 16:16:47 UTC
*** Bug 416449 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2020-01-21 16:17:09 UTC
*** Bug 403628 has been marked as a duplicate of this bug. ***
Comment 5 Filip Fila 2020-01-21 17:43:57 UTC
Sounds like there's two bugs here, regarding autologin settings not being saved:

user-manager still wants to write to sddm.conf and it's using sddm_kcm's function to do so, but this function no longer supports writing to sddm.conf

user-manager just needs to adjusted to write to /etc/sddm.conf.d/kde_setings.conf and the feature works again, it's a simple fix

to solve this properly though we also need to solve: https://bugs.kde.org/show_bug.cgi?id=414396

... since user-manager also can't read this new config file ie. it won't remember the autologin checkbox state

---

The other bug mentioned in the original report predates the one I just mentioned and sounds like user-manager's failure to erase an entry from the sddm config file when the autologin checkbox is unchecked.
Comment 6 kde545 2020-02-14 17:28:56 UTC
This bug is open since 2015 - please fix it!

Autologin settings broken

In the "Login Screen (SDDM) - System Settings Module", I go to Advanced and activate the checkbox "Automatically login in:" without changing "as user:" and "with session:".
- I confirm with OK and enter my password
- if I reopen the window "Login Screen (SDDM) - System Settings Module" again, the checkbox "Automatically login in:" is unchecked. Even after a restart that does log me in automatically, it is still unchecked.
- this confuses the user, creating uncertainty where he has set the option, about the "true" state of the option and how to deactivate it.
- to deactivate autologin, open "Login Screen (SDDM) - System Settings Module", check the checkbox, apply, uncheck the checkbox, apply again. Now the Login screen will ask for the password again.

It's the same with "Log in automatically" in the "User Manager - System Settings Module" - but that takes two password inputs to confirm (second one from SDDM) - and it does not even work at all.

Operating System: Manjaro Linux 
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.66.0
Comment 7 Patrick Silva 2020-02-14 17:34:46 UTC
(In reply to kde545 from comment #6)
> - if I reopen the window "Login Screen (SDDM) - System Settings Module"
> again, the checkbox "Automatically login in:" is unchecked. Even after a
> restart that does log me in automatically, it is still unchecked.
I noticed this behavior a few minutes ago while testing a patch
to SDDM kcm. :(

(In reply to kde545 from comment #6)
> - to deactivate autologin, open "Login Screen (SDDM) - System Settings
> Module", check the checkbox, apply, uncheck the checkbox, apply again. Now
> the Login screen will ask for the password again.
yes, I can confirm.

Operating System: Arch Linux 
KDE Plasma Version: 5.18.0
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1
Comment 8 Filip Fila 2020-02-14 17:40:38 UTC
(In reply to kde545 from comment #6)
> This bug is open since 2015 - please fix it!
> 
> Autologin settings broken
> 
> In the "Login Screen (SDDM) - System Settings Module", I go to Advanced and
> activate the checkbox "Automatically login in:" without changing "as user:"
> and "with session:".
> - I confirm with OK and enter my password
> - if I reopen the window "Login Screen (SDDM) - System Settings Module"
> again, the checkbox "Automatically login in:" is unchecked. Even after a
> restart that does log me in automatically, it is still unchecked.
> - this confuses the user, creating uncertainty where he has set the option,
> about the "true" state of the option and how to deactivate it.
> - to deactivate autologin, open "Login Screen (SDDM) - System Settings
> Module", check the checkbox, apply, uncheck the checkbox, apply again. Now
> the Login screen will ask for the password again.
> 
> It's the same with "Log in automatically" in the "User Manager - System
> Settings Module" - but that takes two password inputs to confirm (second one
> from SDDM) - and it does not even work at all.
> 
> Operating System: Manjaro Linux 
> KDE Plasma Version: 5.17.5
> KDE Frameworks Version: 5.66.0

Yes, that's the bug I already linked: https://bugs.kde.org/show_bug.cgi?id=414396

A fix for sddm-kcm: https://phabricator.kde.org/D27388
A fix for user-manager: https://phabricator.kde.org/D26813

Hopefully both will be fixed in 5.18.1.
Comment 9 kde545 2020-02-16 15:43:38 UTC
(In reply to Filip Fila from comment #8)
> Hopefully both will be fixed in 5.18.1.

Looking forward to it, thanks!
Comment 10 Filip Fila 2020-02-17 21:09:40 UTC
Git commit b2d0e463a4901329ce6a0ada4ec720ff9b5cc90f by Filip Fila.
Committed on 17/02/2020 at 21:09.
Pushed by filipf into branch 'Plasma/5.18'.

Have user-manager write to SDDM's new config file

Summary:
user-manager still wants to write to sddm.conf and it's using sddm_kcm's function to do so, but this function no longer supports writing to sddm.conf

That means auto-login settings are no longer getting saved anywhere.

This patch tweaks user-manager to write to /etc/sddm.conf.d/kde_setings.conf, making the feature work again.

Path specifying is removed on the user-manager side for writing, SDDM's auth helper does that now.
FIXED-IN: 5.18.1

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26813

M  +2    -5    src/lib/accountmodel.cpp

https://commits.kde.org/user-manager/b2d0e463a4901329ce6a0ada4ec720ff9b5cc90f
Comment 11 kde545 2020-03-14 18:08:09 UTC
It's working. Thank you!