Recently I had to work both in the evening, whent it’s dark outside, and daytime, when the sun shines in through the window. It got very annoying to adjust the brightness level in the menus of the 2 monitors…
Let me share my finding, ddcutil …
I have 2 pieces of BenQ GW2255 attached to a GTX 1060.
For it to work, I need the module i2c-dev loaded. I want it to be loaded automatically on boot, the easiest way seems to be create a file called /etc/modules-load.d/i2c-dev.conf
(its name could be anything, just end with .conf), and put into it:
i2c-dev
Of course I needed to install the ddcutil
apt install ddcutil
Right, ddcutil was succesfully installed, but
ddcutil detect
reported no display.
I checked, both my monitors have the option DDC/CI turned on.
I read, that nvidia cards may need additional settings. I discovered, that adding
options nvidia NVreg_RegistryDwords=RMUseSwI2c=0x01;RMI2cSpeed=100
to
/etc/modprobe.d/nvidia-kernel-common.conf
solves my problem.
After reboot, ddcutil nicely list my monitors:
#ddcutil detect
Display 1
I2C bus: /dev/i2c-8
EDID synopsis:
Mfg id: BNQ
Model: BenQ GW2255
Serial number: T5D03192019
Manufacture year: 2013
EDID version: 1.3
VCP version: 2.1
Display 2
I2C bus: /dev/i2c-10
EDID synopsis:
Mfg id: BNQ
Model: BenQ GW2255
Serial number: T5D03200019
Manufacture year: 2013
EDID version: 1.3
VCP version: 2.1
Using my regular user account still doesn’t work, I need to add my user to i2c group:
usermod <my_username> -aG i2c
Log out, then back in, and everything is fine…
I’ve put 2 scripts in /opt/
, one brgihtens, the other darkens:
/opt/brightnessup:
#!/bin/sh
if [ ! -f /tmp/brgght ]; then
touch /tmp/brgght
ddcutil -d 1 setvcp 10 + 10
ddcutil -d 2 setvcp 10 + 10
rm /tmp/brgght
fi
/opt/brightnessdown:
#!/bin/sh
if [ ! -f /tmp/brgght ]; then
touch /tmp/brgght
ddcutil -d 1 setvcp 10 - 10
ddcutil -d 2 setvcp 10 - 10
rm /tmp/brgght
fi
Of course I’ve set both to be executable.
After that I choosed 2 key combinations, which I 'll use for adjusting monitors brightness:
Fn-F8, Fn-F6
these were originally multimedia keys (next track/previous track) on my keyboard, which I never used.
Using MATE’s shortcut manager I added these keys, so that when I press it, the according script will be executed. Now I can adjust the brightness of my 2 monitors (both at the same time with only one keypress!!!) just like I could do it with a laptops display.
It’s just slower, monitor #1 actually changes brightness 1 sec. after the keypress, monitor #2 2 secs. after the keypress. So it’s slow, yes, but waaaay much faster and even more comfortable than setting that in the monitors menu system…
I spent an hour this morning to implement this, I did not regret
I like it so, it’s just another proof of flexibility of Linux.