Generally speaking, monitor backlights can’t be toggled on or off without acting on the overall DPMS status (i.e. the monitor’s overall power status). However if your monitor is controllable through DDC/CI, you can use that to set the DPMS status and brightness level. (You may need to enable DDC/CI in your monitor’s settings.)
The first thing to try, before DDC/CI, is setterm
; this allows the kernel’s own VT blanking to be configured (this will trigger DPMS):
To change modes immediately,
sudo setterm --powersave <mode>
where <mode>
can be on
, powerdown
, off
(and a couple of other values which aren’t as useful).
To change the blanking delay,
sudo setterm --blank=<n>
where <n>
is the delay in minutes (0 to disable, maximum 60).
To change the powerdown delay,
sudo setterm --powerdown=<n>
with the same values as --blank
.
A number of tools provide DDC/CI access from the Linux console. For example, using ddccontrol
:
Install the i2c-dev
module if necessary:
sudo modprobe i2c-dev
Probe your devices:
sudo ddccontrol -p
This will list devices it finds, and the available controls. Look for /dev/i2c-…
results, and the controls for “Power control” and “Brightness and Contrast”.
Change your power settings (using the control address and values listed above); to force your monitor to standby:
sudo ddccontrol -r 0xd6 -w 4 dev:/dev/i2c-9
(these values are appropriate for the monitor I’m using; they might not be for yours, and the device will in all likelihood be different).
Many of the controls available through your monitor’s buttons or on-screen menus should also be available through DDC/CI. In particular, you should be able to adjust brightness and contrast, change input sources (if your monitor has multiple inputs), adjust colours…
If you want to control your monitor’s brightness using /sys/class/backlight
, check out the ddcci-driver-linux
module (available as ddcci-dkms
in Debian and derivatives).
/sys/class/backlight
dir is empty.