how to disable monitors programaticly without them turning on input

i’m trying to make a software to automatically disable monitors when user puts on a headset to save a bit of power and i can’t find a way to disable monitors `kscreen-doctor --dpms off` doesn’t work for me since the screens gets re enabled when user interacts with the desktop (for example via wlx-overlay-s)
turning monitors off manually (physical button) works exactly as i want keeping everything in place while having the monitors off

Not tried myself but according to this Post something like
kscreen-doctor output.HDMI-A-1.disable
modified for your output(s), instead of --dpms off may work.
Just make sure to re enable your monitor(s), or at least one, before shutdown/reboot not that you end up with all your monitors disabled as default if that setting gets saved for some reason.

that doesn’t seem to save screen position and it doesn’t allow you disable all monitors (it would make remote access impossible if it worked anyways)

1 Like

DDC/CI works too but i don’t wanna require any hardware support