I would like a way to turn my screens on and off via KDE connect such that mouse input does not wake them so I can have tasks run/listen to music overnight. So far I have tried
xset dmps force off
Which turns the screens off but wakes on mouse/keyboard input (I assume, it’s always back on with a crashed plasmashell in the morning. When plasmashell is crashed it only turns off for a few seconds before turning back on)
xrandr --output $(xrandr | grep ' connected' | cut -d' ' -f1) --off
Which does not work on multiple monitors at once and, if used on individual monitors, breaks display configuration
This is obviously not a huge issue but it feels like there should be an easy fix
You can use the vbetool utility to turn off the display, see if that works better for your case. First, install it from repositories:
pamac install vbetool
Run the following command to turn off the display.
sudo vbetool dpms off
To regain control of the console by pressing Enter key, use the following command:
sudo sh -c 'vbetool dpms off; read ans; vbetool dpms on'
So, that way it will react only on Enter and not the any input event…
Or you can be using xset with this command:
xset -display :0.0 dpms force off
and to turn back on the display with this command:
$ xset -display :0.0 dpms force on
Well, when you use the KDE Connect with the Remote input protocol, i think is actually using the default virtual pointer, via input events, the same one that the mouse is using … hence you can’t disable it, because input events also control the keyboard; and disabling input events would lock you out from accessing the system.
Thank you for the response! Sadly neither of these work for me:
The first does not work as KDE connect does not (and should not) have permission to run commands with sudo. (It also doesn’t seem to work at all even when run directly for some reason, but that doesn’t really matter.)
The second still wakes with mouse input and immediately breaks plasmashell on wake
I would like to use the “Run command” utility to turn the screens on and off not remote input, so I don’t mind disabling input events if there is an easy and reversible way to do it.
Probably you could make use of this