Skip to content

backends/drm: Undo fade-out effect upon unsuccessful DPMS Off

Jakob Petsovits requested to merge jpetso/kwin:work/jpetso/unfade into master

DrmOutput::setDrmDpmsMode() already takes care of reverting any pending output pipeline changes, but the aboutToTurnOff signal from setDpmsMode() needs an explicit wakeUp signal to cancel it out.


No bug reports immediately stick out for describing this. I can reproduce a black screen locker (woken up only with manual double Esc) like this [edit: on a Wayland dev session]:

  1. In Screen Locking, set "Lock screen automatically" to 1 minute (the lowest possible) and "Delay before password required" to "Require password immediately".
  2. In Power Management, set "When locked, turn off screen" also to 1 minute. Or lower if you want.
  3. Switch to a different session for another user, which denies your dev session access to DPMS changes for your outputs.
  4. From that session, watch your journalctl -f until you see the following lines (first one's red, making it easy to spot) after about a minute:
kwin_wayland[288736]: kwin_wayland_drm: Atomic modeset commit failed! Permission denied
kwin_wayland[288736]: kwin_wayland_drm: Setting dpms mode failed!
  1. Switch back to your dev session. Screen is black, backlight (if you have one) is still on, cursor can be spotted but nothing else. Controls are operational, you just don't see them because the fade-out from KscreenEffect is doing its thing.

The patch avoids the screen going black when switching back to my dev session after the DPMS change failed.

Edited by Jakob Petsovits

Merge request reports

Loading