I'd like to blank or power off the display immediately from a terminal command, then have it wake up when I move the touchpad or press a key. Is there a suitable xset command for this, and what is the difference between using the screen saver and DPMS?
3 Answers
The command depends on the graphical display system. `xset dpms force off` works with X11, but it may not work under Wayland because desktop environments handle display power management differently. Some Wayland environments provide their own command or shortcut, while others may not expose an equivalent terminal command.
Use `xset dpms force off`. This immediately tells the monitor to enter its off state, and normal keyboard or mouse activity should wake it again. You can save it as an alias if you use it frequently.
`xset s` and `xset dpms` do different things. `xset s activate` activates the X screen saver, which may only blank the display or show a pattern. It does not necessarily power down the monitor. For an immediate display power-off, `xset dpms force off` is the more appropriate command.

I tested `xset s activate`, but the screen returned to normal immediately. I’m using `xset dpms force off` as an alias instead, and that works well.