Bug 440882 - Screen Energy Saving does not respect SimulateUserActivity in XWayland sessions
Summary: Screen Energy Saving does not respect SimulateUserActivity in XWayland sessions
Status: RESOLVED NOT A BUG
Alias: None
Product: kscreenlocker
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2021-08-12 00:02 UTC by Forest
Modified: 2022-05-19 17:34 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Forest 2021-08-12 00:02:47 UTC
SUMMARY

The org.freedesktop.ScreenSaver SimulateUserActivity dbus method is supposed to reset screen blanking timeouts. It works for both the screen locker and the Screen Energy Saving feature when used in X.Org desktop sessions. However, in XWayland sessions, it works only for the screen locker: The Screen Energy Saving feature ignores SimulateUserActivity on XWayland, and the screen therefore powers off when it should not.

STEPS TO REPRODUCE
1. Start a KDE Plasma 5 XWayland desktop session. (I used KUbuntu 21.04 in my test.)
2. In KDE Settings: Screen Energy Saving, enable the feature and set "Switch off after" to 1 minute. (Note: You might need real hardware, not a VM, for the option to appear.)
3. Start a shell script that runs the following command every few seconds:
   qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity
4. Sit back for a minute waiting for the energy saving mode to activate.

OBSERVED RESULT

The screen powers off, ignoring the SimulateUserActivity calls. 

EXPECTED RESULT

The screen should not power off. It should respect the SimulateUserActivity calls, just as it does in an X.Org session.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 21.04
KDE Plasma Version:  5.21.4
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Problem exists with XWayland sessions, but not X11 sessions.
Comment 1 Nate Graham 2021-08-12 16:05:32 UTC
But it works in a full wayland session?
Comment 2 Forest 2021-08-12 17:46:27 UTC
I don't know if it works in a full wayland session. I don't have a test environment for that.
Comment 3 Martino Fontana 2022-05-18 22:52:12 UTC
I gave it a quick test in a Wayland session, it works.
Comment 4 Nate Graham 2022-05-19 17:34:10 UTC
Thanks. That's the supported thing; running everything through XWayland on a Wayland session is not supported.