How can I turn off the screen immediately from the terminal with xset?

0
0
Asked By MellowPine47 On

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

Answered By SilverMaple31 On

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.

Answered By CopperLark82 On

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.

Answered By QuietRaven6 On

`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.

MellowPine47 -

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.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.