Quantcast
Channel: PowerDevil activity
Viewing all articles
Browse latest Browse all 1684

Nicolas Fella accepted merge request !332: actions/dpms: Ignore turn-off trig...

$
0
0

Early Plasma 6.0 releases saw many people reporting unintentionalscreen turn-off when the screen locker activates/deactivates,and when the system wakes up from sleep. On X11, this was visibleto the user immediately, whereas on Wayland it spammed system logswith warnings of invalid -1 idle timeout registrations.

Ironically, this behavior would occur specifically when the DPMSaction (a.k.a. "When locked, turn screen off") was disabled.

The reason is that the DPMS object gets created either way, andsets up its screen locker activation change handler as well assuspend/resume handlers in the constructor. But timeout valuescan remain invalid until the action is loaded/enabled andtimeout values are populated from profile settings.Using invalid timeouts in these handlers caused this headache.

This bug was introduced by commit c58085b4, which fixed a bunch ofthings, bug also removed checks for invalid timeout values.Turns out we still need some kind of checks.

We now prevent bad timeout registrations by interpreting negativevalues in m_idleTimeoutWhenUnlocked as "idle timeout disabled".Checks for this value ensure that registerIdleTimeout() is onlycalled when the action is loaded, regardless of whether it'striggered by screen locker changing its activation status,resume after suspend, or any other event.

Alternatively, we could have also moved some signal connectionsinto loadAction() and disconnected them in onProfileUnload().Checking on every registration call seems more robust though

BUG: 481308BUG: 482077


Plus extra commit in the same file: Add new logs to make future debugging easier


Viewing all articles
Browse latest Browse all 1684

Trending Articles