https://bugs.kde.org/show_bug.cgi?id=516729

            Bug ID: 516729
           Summary: Unable to disable autologin from the System Settings
                    app when that was previously enabled but no other
                    defaults were changed
    Classification: Plasma
           Product: plasma-login-manager
      Version First 6.6.1
       Reported In:
          Platform: CachyOS
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
  Target Milestone: ---

SUMMARY
Basically, the app is unable to write an empty /etc/plasmalogin.conf to disk.
In a new install, I can enable autologin so that file gets populated. If I want
to disable it right after, it says "Unable to save settings because the config
could not be opened.". However, if I set a non default wallpaper, or anything
else that writes stuff to that file, then it is able to remove the autologin
part.

Probably the problem is somewhere here:
https://github.com/KDE/plasma-login-manager/blame/f11d21584068bb191e6b978bdc9a63018d1ded29/src/frontend/kcm/kcm.cpp#L130-L134

Because for some reason which I don't understand all these settings are written
to a temporary file, then that temporary file gets read as a string and finally
injected in the final file. If the UI tries to write an empty temp file because
the user wants to remove the last non default options, then that code reads
nothing and errors out, so it doesn't give back an empty string to give to the
final file.

STEPS TO REPRODUCE
1.  Open settings and enable autologin, then save
2.  Immediately try to disable autologin, then save
3. Observe error

OBSERVED RESULT
"Unable to save settings because the config could not be opened."

EXPECTED RESULT
It should be able to write an empty configuration file

SOFTWARE/OS VERSIONS
Operating System: CachyOS Linux 
KDE Plasma Version: 6.6.1
KDE Frameworks Version: 6.23.0
Qt Version: 6.10.2
Kernel Version: 6.19.3-2-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen AI 9 HX 370 w/ Radeon 890M
Memory: 32 GiB of RAM (30.5 GiB usable)
Graphics Processor 1: AMD Radeon 890M Graphics
Graphics Processor 2: NVIDIA GeForce RTX 5070 Ti Laptop GPU/PCIe/SSE2

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to