Bug 478531

Summary: Energy Saving and Screen Locking disagree on lock screen time
Product: [Applications] systemsettings Reporter: Jean-Francois Roy <jf>
Component: kcm_powerdevilAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: jpetso, kde, natalie_clarius, nate
Priority: NOR Keywords: qt6, usability
Version First Reported In: 5.90.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.0
Sentry Crash Report:
Attachments: Screen Locking
Energy Saving

Description Jean-Francois Roy 2023-12-15 03:45:45 UTC
Created attachment 164173 [details]
Screen Locking

SUMMARY

The Screen Locking settings module disagrees with the Energy Saving module for the system's idle time after which the screen will be locked. This is very confusing.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.90.0
KDE Frameworks Version: 5.246.0
Qt Version: 6.6.1
Kernel Version: 6.6.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 7950X3D 16-Core Processor
Memory: 62.5 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4090/PCIe/SSE2
Manufacturer: ASUS
Comment 1 Jean-Francois Roy 2023-12-15 03:46:08 UTC
Created attachment 164174 [details]
Energy Saving
Comment 2 Nate Graham 2023-12-15 23:07:26 UTC
IMO probably "Lock screen" shouldn't even be an option in this combobox, since it's in the "suspend session" section and screen locking isn't a type of session-suspending.
Comment 3 Jakob Petsovits 2023-12-16 06:01:32 UTC
(In reply to Nate Graham from comment #2)
> IMO probably "Lock screen" shouldn't even be an option in this combobox,
> since it's in the "suspend session" section and screen locking isn't a type
> of session-suspending.

That makes sense to me. Taking it out from the idle-timeout combobox is easy. We'll want a KConfig migration to switch the value to "No Action" if this option was previously selected.

I think it still makes sense to keep the Lock Screen option in the other two comboboxes, for power button and lid-close actions, even if it's not a perfect match with the new "Suspend Session" section name. (The conceptual mismatch is of course my fault thanks to the UI revamp. Initially power button and lid-close actions were in a separate section "Button events handling" which made for a better fit theoretically. But also gnarly visual overload.)
Comment 4 Jakob Petsovits 2023-12-16 06:15:12 UTC
(In reply to Jakob Petsovits from comment #3)
> Taking it out from the idle-timeout combobox is easy. We'll want
> a KConfig migration to switch the value to "No Action" if this option
> was previously selected.

What I actually wanted to ask: When migrating Energy Savings "Lock screen" to "No Action", will we need to modify any settings from the Screen Locking settings module? I'm thinking we probably don't need to migrate the timeout because there's a clash and either of them could be the one that the user prefers. But perhaps we should try migrating checkbox and timeout if the user has disabled locking when idle in Screen Locking? (By default, Screen Locking enables that checkbox.)
Comment 5 Bug Janitor Service 2024-01-08 03:36:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/305
Comment 6 Jakob Petsovits 2024-01-10 05:49:56 UTC
Git commit fe7de121adf424643c08cda0cfaebc5fec05a112 by Jakob Petsovits.
Committed on 09/01/2024 at 23:24.
Pushed by jpetso into branch 'master'.

Remove the "Lock screen" option from "After a period of inactivity"

This is already configurable in the Screen Locking KCM and
having a separate second setting for the same thing is confusing.

One deleted line in the KCM, the rest is all migration code.
The migration takes care of:

* Any users that haven't yet migrated from Plasma 5.
* Plasma 6 Alpha & Beta users who run RC1 or RC2 at least once.

Users who jump from Plasma 6 Alpha or Beta straight to 6.0 or above
will have to manually change `AutoSuspendAction=32` in their
powerdevilrc to `AutoSuspendAction=0`.

M  +6    -0    autotests/migrateconfig/CMakeLists.txt
A  +50   -0    autotests/migrateconfig/test4_initial_powermanagementprofilesrc
A  +2    -0    autotests/migrateconfig/test4_migrated_powerdevilrc
M  +32   -1    daemon/powerdevilmigrateconfig.cpp
M  +0    -1    kcmodule/profiles/ProfilesConfigKCM.cpp

https://invent.kde.org/plasma/powerdevil/-/commit/fe7de121adf424643c08cda0cfaebc5fec05a112