Controlling monitor brightness from the command line
Start by loading the module allowing the kernel to communicate with your monitors:
# modprobe i2c-dev
Verify that your monitor(s) are detected:
# sudo ddcutil detect
Query your monitor(s) for the index of the brightness setting:
# sudo ddcutil -d 1 capabilities |grep -i brightness Feature: 05 (Restore factory brightness/contrast defaults) Feature: 10 (Brightness)
We see here that the Brightness
index for monitor 1 (-d 1
) has index #10.
Let's query for the current setting:
# sudo ddcutil -d 1 getvcp 10 VCP code 0x10 (Brightness ): current value = 99, max value = 100
It's currently at 99, let's lower it slightly
# sudo ddcutil -d 1 setvcp 10 75