Power Management and Inhibition by Applications

Kai Uwe Broulik kde at privat.broulik.de
Wed Jan 23 07:52:26 GMT 2019


Hi,

> I had thought that would only inhibit the screensaver instead of automatic
> sleep.

KScreenLocker (previously KSMServer) that owns the 
org.freedesktop.ScreenSaver interface tells PowerDevil to keep the 
screen on when screensaver is inhibited. It makes no sense to prevent 
the screen from locking (ie. keep the desktop visible) but then allow 
the screen to turn off, having the same effect: hiding the desktop.

> I did a quick test and in case I inhibit through org.freedesktop.ScreenSaver
> interface, the battery applet does not indicate any inhibit whereas through
> org.freedesktop.PowerManagement.Inhibit indicates that an inhibition is valid.

It should and it does here. Note that PowerDevil only enforces 
inhibitions after five seconds to prevent short transient inhibitions 
(e.g. web browsers block suspend when playing audio which could also 
lead to short notification sounds prolonging the time until suspend)

> I wonder if I should not instead make usage of the Inhibit mechanism from
> logind coupled with powerdevil. I am not sure if this is desired.

It is and I would love that, I just haven't had the time to implement it.

Also I'm a bit tired of adding yet another inhibition interface (we 
already have like three or four of them) of the "but this time, I 
promise, it will be perfect!!" kind. Last time I checked logind didn't 
offer signals for when an inhibition was added/removed, so the "xyz is 
curently blocking PM" in Battery Monitor might not be possible anymore 
this way.

Cheers
Kai Uwe



More information about the Kde-frameworks-devel mailing list