Bug 486986 - Powerdevil incorrectly turns off unlocked screen using timeout for locked screen
Summary: Powerdevil incorrectly turns off unlocked screen using timeout for locked screen
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Power management & brightness (other bugs)
Version First Reported In: 6.2.4
Platform: Solus Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-13 20:46 UTC by TraceyC
Modified: 2025-06-18 20:48 UTC (History)
2 users (show)

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


Attachments
AC Power settings (86.98 KB, image/png)
2024-05-13 20:46 UTC, TraceyC
Details
On Battery settings (87.04 KB, image/png)
2024-05-13 20:46 UTC, TraceyC
Details
Advanced Power Settings (46.37 KB, image/png)
2024-05-13 20:47 UTC, TraceyC
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TraceyC 2024-05-13 20:46:26 UTC
Created attachment 169461 [details]
AC Power settings

SUMMARY

When the system is unlocked, the screen is being turned off according to the setting for "When locked, turn off screen: x sec". This happens for On AC Power and On Battery profiles.

STEPS TO REPRODUCE
1. In Energy Savings, go to On AC Power.  Make sure settings for Dim and Turn off Screen are higher than one minute, at least. Make sure "After a period of inactivity" is set to Do nothing.
2. Set "When locked, turn off screen" to something very low (I used 10 sec)
3. Do not lock the screen, wait for that number of seconds.

OBSERVED RESULT

All displays are turned off after the count in"When locked, turn off screen"

EXPECTED RESULT

The displays are not turned off, since the system is not locked

SOFTWARE/OS VERSIONS
Operating System: Solus 4.5
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.6.3
Kernel Version: 6.8.9-289.current (64-bit)
Graphics Platform: Wayland
Processors: 16 × 11th Gen Intel® Core™ i7-11800H @ 2.30GHz
Memory: 62.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: Dell Inc.
Product Name: XPS 17 9710

WORKAROUND

It can become a nuisance if your displays are constantly turning off without the system being locked, if you pause interacting for a minute or less. In this case, set that setting to a higher value.

ADDITIONAL INFORMATION

I confirmed that changing the "When locked, turn off screen" settings on the On Battery tab affected the behavior when the laptop was on battery.

The kernel correctly reports AC as online and the battery as charging

```
❯ upower -i /org/freedesktop/UPower/devices/line_power_AC
  native-path:          AC
  power supply:         yes
  updated:              Mon 13 May 2024 01:28:29 PM CDT (6618 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    warning-level:       none
    online:              yes
    icon-name:          'ac-adapter-symbolic'

❯ upower -i /org/freedesktop/UPower/devices/battery_hidpp_battery_0
  native-path:          hidpp_battery_0
  model:                G502 LIGHTSPEED Wireless Gaming Mouse
  serial:               5c-5c-4a-e6
  power supply:         no
  updated:              Mon 13 May 2024 03:19:17 PM CDT (14 seconds ago)
  has history:          yes
  has statistics:       yes
  keyboard
    present:             yes
    rechargeable:        yes
    state:               charging
    warning-level:       none
    percentage:          14%
    icon-name:          'battery-caution-charging-symbolic'
```
Comment 1 TraceyC 2024-05-13 20:46:59 UTC
Created attachment 169462 [details]
On Battery settings
Comment 2 TraceyC 2024-05-13 20:47:23 UTC
Created attachment 169463 [details]
Advanced Power Settings
Comment 3 Nate Graham 2025-06-12 18:29:17 UTC
Are you still seeing this on current git master?
Comment 4 TraceyC 2025-06-18 20:48:14 UTC
The original problem is no longer reproducible, but the timers are differently bugged now. Let me know if this should go in a separate report. IMO this looks like perhaps a result of trying to fix the first bug broke things in other ways.

1. The setting for turning off the screen when locked is always used, even if there's a shorter setting for turning off the screen when the system is idle but not locked 
2. If the screen turn off time is the same for locked and unlocked, the timer to turn off the screen resets when the display is locked, even if the system is idle the whole time 
3. If the turn off time is equal to the dim time, the timer is *not* reset and activates relative to idle time


Details:

Note: Energy Savings is now called Power Management

1. In Power Management, go to On AC Power.  Dim set to 2 minutes and Turn off Screen set to 5 minutes (also for when locked). "After a period of inactivity" is set to Do nothing.
2. Set screen to lock after 1 minute of inactivity and require password after 5 seconds

1:00 - screen locked
2:00 -  screen dimmed
6:00 - screen turned off - This looks wrong, it's one minute later than I would expect (5 min idle time). It looks like the timer got reset after the session locked. If this is intentional, it's not explained in the UI anywhere. Given the next result, this looks unintentional.

Changed screen turn off time to 2m (same as dim), for both locked and unlocked

1:00 - screen locked
2:00 -  screen turned off - 1 minute after locking, in keeping with the setting

With Screen lock 1 min, Dim 1 min, Turn off Screen 2 min (also for when locked):
1 min - screen locked & dimmed
3:00 -  screen turned off - 2 minutes after locking rather than after idle

With Screen lock 1 min, Dim 1 min, Turn off Screen 5 min (20 sec for when locked):
1:00 - screen locked & dimmed
1:20 -  screen turned off  - ok

With Screen lock 1 min, Dim 1 min, Turn off Screen 2 min (5 min for when locked):
1 min - screen locked & dimmed
2 min -  screen did not off as expected  - not ok
6 min - screen turned off per locked setting 5 min after lock

With Screen lock never, Dim 1 min, Turn off Screen 2 min (5 min for when locked):
1 min - screen dimmed
2 min -  screen turned off as expected