0

Turning off the monitor should be a really simple thing, but it isn't. I know that under Xserver, we have xset tool which allows us to turn off the screen via the following command:

$ xset dpms force off

But this doesn't work while logged in TTY.

I also know that there's setterm tool that can set some powersave options, for instance:

setterm --blank 5  --powersave powerdown --powerdown 0

So after 5mins since the last command typed into TTY console, the monitor will be powered off, but I need a command that can turn off it instantly. Something similar to xset. Is there something like that?

2

There is an article here on this forum talking about disabling a monitor. This article goes further and discusses vbetool option.

# vbetool dpms off

This command turns off the monitor regardless of X is running or not. So, this is almost the answer I'm looking for. Now, let me explain that almost.

  • Yes, it turns off the screen instantly, but there's a little problem with turning it on again because when I press a key on my keyboard, it doesn't work. I have to type vbetool dpms on blindly so I could turn the monitor on. Is there a way to turn it on when a key is pressed? – Mikhail Morfikov Nov 11 '15 at 20:55
  • @MikhailMorfikov As I recall, TTY supports scripts. You can write a script to monitor keyboard events, and when a key is depressed and the monitor is off, then the script would turn the monitor back on. That gets more into programming and StackOverflow type of thing and less tweaking the OS, though. – Sarah Weinberger Nov 11 '15 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.