I try to create a keyboard short cut with set custom short cut to turn off monitor but is not working. The line sh -c "xset dpms force off" not working. There is something I can do?
Are you on XOrg or Wayland? This is a command for use in XOrg, not Wayland.
To switch to Xorg logout and at loginscreen click on your username then a cog wheal appears at the bottom right corner, there you can switch between Xorg and Wayland.
Hi,
It worked.
Now the problem is that the monitor turns back on in a fraction of a second.
What can I do now?
You can try to add a time delay:
sh -c "sleep 2 && xset dpms force off"
or
sh -c "sleep 2; xset dpms force off"
the first line did work.
Thanks.
Ciao
2 Likes
You can play with the value. Sleep 2 means it waits 2 seconds. You can test if it also works when you replace that value 2 with 0.5 or 1.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
