[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

kwin wayland turn off screen (xset dpms force off)



Hi,

I'm looking for a way to "turn off screen" from command line, with wayland.
Obviously `xset dpms force off` won't work.

Ultimately or optimally, it would IMO be nice the "turn off screen" timer to be 
shortened when the screen is locked.

I've found "PowerDevilDPMSAction.cpp" is related to that (even the wayland 
case), but I haven't found how to make use of those actions through `qdbus`.

The following line does work, but it seems awkward, and after it is executed 
the terminal scrolls as if you were continuously pressing enter key (not 
always though):

qdbus org.kde.kglobalaccel /component/org_kde_powerdevil invokeShortcut "Turn 
Off Screen"

And yes, I could define a shortcut, but I don't know which to choose which 
would be convenient, wouldn't interfere with other shortcuts, and anyway, the 
correct shortcut should be the one I already use to lock the screen `Ctrl-Alt-
l`.

Knowing how to cause the screen to turn off from command line would be nice.

Also, the expected behavior would IMO the change the duration of the screen off 
timer when the screen is locked. Like setting the timer to 40 sec.

Thanks,
Chris



Reply to: