Bug 408398

Summary: Inhibit screensaver plugin should take into account critical battery level settings
Product: [Plasma] Powerdevil Reporter: Siddhartha <kde>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: bvbfan, kde, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.16.1

Description Siddhartha 2019-06-07 02:09:12 UTC
SUMMARY
Currently, I like to use the inhibit screensaver plugin to disable screen locking when kdeconnect is active. However, this also disables the laptop suspend, even in battery mode. What I ideally want is to enable this feature, but if battery reaches a critical level, the power management settings should take over and the laptop should get suspended.

STEPS TO REPRODUCE
1. Enable "Inhibit screensaver" plugin and connect phone to laptop. 
2. Laptop lock screen is disabled
3. Turn off AC power for laptop until "critical level" as defined in power management settings is reached.

OBSERVED RESULT
Laptop does not suspend, as configured in settings and keeps running until it runs out of battery and forcefully shuts down.

EXPECTED RESULT
At critical level, power management settings should override kdeconnect and configured action (suspend in my case) should be performed.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma
KDE Plasma Version: 5.15.5 
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.3

ADDITIONAL INFORMATION
I'm not 100% sure that this is due to the kdeconnect config, but I think the above is the current behavior. I do see the message "kdeconnect is currently inhibiting power management".
Comment 1 Kai Uwe Broulik 2019-06-07 08:17:00 UTC
I think that's more of a PowerDevil bug. The critical suspend timer should ignore inhibitions. Re-assigning.
Comment 2 Kai Uwe Broulik 2019-06-11 08:46:36 UTC
Git commit 82db1f446966a4a66324befbc60e6a0c0b7735f7 by Kai Uwe Broulik.
Committed on 11/06/2019 at 08:46.
Pushed by broulik into branch 'Plasma/5.16'.

Ignore power management inhibition in battery critical timeout
FIXED-IN: 5.16.1

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

M  +1    -0    daemon/powerdevilcore.cpp

https://commits.kde.org/powerdevil/82db1f446966a4a66324befbc60e6a0c0b7735f7
Comment 3 Anthony Fieroni 2019-06-19 04:51:13 UTC
I don't know that the problem but i don't get notifications for critical battery level nor suspend on battery level. Inhibit screensaver is deactivated in KDE Connect settings.
Comment 4 Anthony Fieroni 2019-06-19 05:37:10 UTC
I revert patch and recompile, notifications goes back. It's a problem.
Comment 5 Anthony Fieroni 2019-06-19 15:45:41 UTC
Apparently it's not the problem. If you start org_kde_powerdevil and the remaining battery percentage is lower than configured one in Low Level it shows notification but if not it just *forgot*. Same for Critical Level and its action.