summaryrefslogtreecommitdiff
diff options
authorPierre Equoy <pierre.equoy@canonical.com>2022-04-15 15:57:58 +0800
committerPierre Equoy <pierre.equoy@canonical.com>2022-04-15 15:57:58 +0800
commit82e277eb3aa15778e14b87b09196561f267e80bd (patch)
tree46451f65efc81ee406e81c3a31632827eff7e4cc
parent3d0d75648a668a134337beee7d84be0ac8c352ae (diff)
Fix: powersaving job on Wayland
Instead of relying on a Xorg-related tool, activate GNOME's screensaver through busctl. This has the added benefit of being able to restart the screen after a few seconds, so one less manipulation for the tester. LP: #1969167
-rw-r--r--units/monitor/jobs.pxu10
1 files changed, 6 insertions, 4 deletions
diff --git a/units/monitor/jobs.pxu b/units/monitor/jobs.pxu
index 46ecb20..ec57b59 100644
--- a/units/monitor/jobs.pxu
+++ b/units/monitor/jobs.pxu
@@ -136,14 +136,16 @@ flags: also-after-suspend
id: monitor/{index}_powersaving_{product_slug}
plugin: user-interact-verify
category_id: com.canonical.plainbox::monitor
-command: xset dpms force off
+command:
+ busctl --user call org.gnome.Shell /org/gnome/ScreenSaver org.gnome.ScreenSaver SetActive b true
+ sleep 5
+ busctl --user call org.gnome.Shell /org/gnome/ScreenSaver org.gnome.ScreenSaver SetActive b false
_purpose:
This test will check your monitor power saving capabilities
_steps:
- 1. Click "Test" to try the power saving capabilities of your monitor
- 2. Press any key or move the mouse to recover
+ 1. Start the test to try the power saving capabilities of your monitor
_verification:
- Did the monitor go blank and turn on again?
+ Did the monitor go blank and turn on again after a few seconds?
unit: template
template-resource: graphics_card