I think you possibly misunderstand what DPMS "off" means. Look at the table in Wikipedia, what DPMS actually does is to signal the power saving state by turning the horizontal sync and vertical sync signals (or the HDMI equivalent) off, and disabling the DAC in the graphics card, while the rest of the graphics card keeps running. So you are not turning everything completely off, you are entering the "deepest" power saving mode possible.
OTOH, using xrandr --off
really completely shuts off the output, and disables everything in the graphics card that is used to produce the output, as if the monitor was not connected to anything at all. And of course, if it is your only monitor, this doesn't work, as then there is no more graphics display to draw anything on. This is really for enabling and disabling additional second or third monitors.
So you don't want it "completely off", you want the deepest DPMS power saving state which happens to be called "off".
Your busctl
command tells Wayland to use PowerSaveMode
, i.e. DPMS. And Wayland doesn't seem to re-enable DPMS when it detects mouse or keyboard inputs, so it stays off.
In the same way, xset dpms
tells the X server to use DPMS. This is completely the same thing. The difference is that the X server re-enables DPMS when it detects inputs.
As to "why", it's how the developers decided how it should work. In X, xset dpms
works even when there is not extra screensaver, which is why the way to turn the screen on again was incorporated in the X server. For Wayland, the designers seem to have decided that you always need an extra screensaver program (whose job it is to communicate the wanted PowerSaveMode
to Wayland), so it leaves it to the screen saver to monitor inputs and turn the screen on again. That you are able to fake being a screensaver program using busctl
is more or less an accident.
It's not a bug, it's different design.
As I said, try grabbing the mouse and keyboard inputs with evtest --grab /dev/input/eventX
(use just evtest
to see which device is which. Careful, numbers don't need stay the same across boots, look at the udev symlinks) or the equivalent ioctl
if you are writing your own screensaver program. If you want to monitor the inputs for a specific combination, you need to do that anyway.
xrandr --output your_output_name --off
.xrandr
by itself to list outputs.xset dpms force off
is the right command, but the X server will switch the mode toon
again as soon as it detects input. I don't think you can disable that, you'll probably need to patch the X server, or grab all input sources withevtest --grab /dev/input/eventX
so they don't get read by the X server, or something like that.