Shortcut to switch off monitor


I’m looking for a command to shut down my monitors.
I have a screensaver running, but I want to shut the monitors by key command. So all I need is the command and bind it to a key shortcut.

But what is the command?

/usr/bin/xset dpms force off  

only starts the screensave and does not shut off the monitors. What is the right command when using Manjaro & XFCE?

If your monitor is HDMI-0 for example:

xrandr --output HDMI-0 --off

See the Arch Wiki article for more info: xrandr - ArchWiki

Okay, but when I move the mouse it does not automatically go on again. So thats no solution.
Although it destroys my screen configuration: After the command, one off my two screens is off and all windows move to the screen which is still on.

You said “shut down”, not put them in standby. That command turns it completely off. You can turn it back on with a command like this:

Example with primary DP-3 with secondary HDMI-0 to the right:

xrandr --output HDMI-0 --mode 1920x1080 --right-of DP-3

I would recommend disabling the screensaver so when you lock the screen, the monitors automatically go in standby.

Screensavers don’t save your screen unless you have a CRT monitor from the 80’s. :wink:

1 Like

Sorry, I was too impresise.

I have a screensaver, because the monitors are in a public area, and the screensaver makes a good light. It starts after 15 minutes.

My use case is: When I know, I want to turn them off/standby because I leave for longer time, or anything else, I want to have a command to directly put them in standby without screensaver. Is there any way?

Do you mean lock the screen?


Lock-Screen is deactivtaed on this installation. I mean to bring the two connected monitors in standy by mode via command. And when moving the mouse or pressing a key, the monitors get on again.

works perfectly here

xset dpms force off

but it can only do one thing at a time…either screen saver or shutdown.

How about one key combo to ‘standy/off’ monitor and another to ‘on’ monitor?

Or you could try to toggle using the output from xset q | grep 'Monitor is'