How to change external monitor brightness via DDC/IC?

Solution 1:

You find the necessary files here: https://packages.debian.org/unstable/ddccontrol

ddccontrol
libddccontrol
ddccontrol-db

which I had to install. Then I had to run the following commands:

sudo modprobe i2c-dev
sudo modprobe intelfb
sudo chmod a+rw /dev/i2c-*

Now I can change the brightness to a value (here 53) representing the backlight level of my external monitor without the On-Screen-Display with the command:

ddccontrol -p -r 0x10 -w 53

Now I still need to get my special brightness keys from my keyboard linked to the brightness command (with paying attention to the max. brightness level). Any idea how to do that?

Solution 2:

Building on @remi's answer, ddccontrol appears unmaintained and hasn't added configurations for any new monitors since 2006.

Fortunately, there is a newer tool: ddcutil, that is much more robust and actively developed. After installing one of the prebuilt packages or building from source, it can be used to query and set brightness (among myriad other settings):

# ddcutil capabilities | grep Brightness
Feature: 10 (Brightness)
# ddcutil getvcp 10
VCP code 0x10 (Brightness                    ): current value =    60, max value =   100
# ddcutil setvcp 10 70