In this tip we will see how to use the terminal under Ubuntu to turn on / off your monitor. But before this, let's see if we have DPMS (Display Power Management Signaling) enabled or not under Ubuntu by checking its status with this command:

xset -q

If enabled, you will get these outputs:

DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 0
  DPMS is Enabled
  Monitor is On

If it is not the case, you can enable it with this command:

xset +dpms

To switch off your monitor (enter into sleep mode / standby), run this command:

xset dpms force off

You can move your mouse or press any key to exit sleep mode. The command for turning on the monitor is the following:

xset dpms force on

You can use these two commands in a bash script and use it later in a cron to turn monitor on/off at specified period of time (morning, night, etc.).

Post a Comment