https://bugs.kde.org/show_bug.cgi?id=482077
Jakob Petsovits <jpe...@petsovits.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED Latest Commit| |https://invent.kde.org/plas | |ma/powerdevil/-/commit/be2b | |83615d879549ecf9a47b66dc668 | |87419a2dc --- Comment #61 from Jakob Petsovits <jpe...@petsovits.com> --- Git commit be2b83615d879549ecf9a47b66dc66887419a2dc by Jakob Petsovits. Committed on 12/03/2024 at 03:47. Pushed by nicolasfella into branch 'master'. actions/dpms: Ignore turn-off triggers when action is disabled Early Plasma 6.0 releases saw many people reporting unintentional screen turn-off when the screen locker activates/deactivates, and when the system wakes up from sleep. On X11, this was visible to the user immediately, whereas on Wayland it spammed system logs with warnings of invalid -1 idle timeout registrations. Ironically, this behavior would occur specifically when the DPMS action (a.k.a. "When locked, turn screen off") was disabled. The reason is that the DPMS object gets created either way, and sets up its screen locker activation change handler as well as suspend/resume handlers in the constructor. But timeout values can remain invalid until the action is loaded/enabled and timeout 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 of things, 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 negative values in m_idleTimeoutWhenUnlocked as "idle timeout disabled". Checks for this value ensure that registerIdleTimeout() is only called when the action is loaded, regardless of whether it's triggered by screen locker changing its activation status, resume after suspend, or any other event. Alternatively, we could have also moved some signal connections into loadAction() and disconnected them in onProfileUnload(). Checking on every registration call seems more robust though. Related: bug 481308 M +24 -10 daemon/actions/bundled/dpms.cpp M +1 -0 daemon/actions/bundled/dpms.h https://invent.kde.org/plasma/powerdevil/-/commit/be2b83615d879549ecf9a47b66dc66887419a2dc -- You are receiving this mail because: You are watching all bug changes.