You are not logged in.

#1 2020-04-25 19:52:33

ocelotsloth
Member
From: Arlington, Virginia
Registered: 2016-10-16
Posts: 4

How to sync two monitor's brightness with the ddcci kernel module?

What I'm trying to do.

My end goal is to be able to control the brightness of both of my external monitors using the brightness controls on my keyboard. I am running Cinnamon. I've managed to get Cinnamon's power manager to control one monitor, but not the other. I'm looking to get Cinnamon to control both monitors and also enable use of the keyboard buttons (which currently do not work).

What I've done so far.

Following the instructions in the Backlight#External_monitors page on the Wiki I have installed the ddcci kernel module using ddcci-driver-linux-dkms from the AUR.

I have two LG 27UK650-W monitors connected to an NVIDIA RTX2060 graphics card. I am running the version 440.82 of the proprietary nvidia driver.

Getting ddcci to work required following the steps suggested in issue 2, ddcci-driver-linux Nothing happens on Arch Linux, from the upstream issue tracker. In short, I performed the following steps:

  1. Load the ddcci module with

    sudo modprobe ddcci
  2. Run the following two commands to force ddcci to run discovery on the two monitors. For some reason it looks like version 440 of the nvidia driver does not mark these devices with I2C_CLASS_DDC like it should be (though in fairness I don't really know what that means).

    echo 'ddcci 0x37' | sudo tee /sys/bus/i2c/devices/i2c-6/new_device
    echo 'ddcci 0x37' | sudo tee /sys/bus/i2c/devices/i2c-7/new_device
  3. For me, the first discovery was successful. The second hung, and I had to cancel the tee command with Ctl+C and then run the following:

    sudo rmmod ddcci-backlight
    sudo rmmod ddcci
    sudo modprobe ddcci

    After reloading ddcci I was able to successfully send commands to the monitors using brightnessctl.

    ~
    ❯ brightnessctl -l             
    Available devices:
    Device 'ddcci6' of class 'backlight':
    	Current brightness: 100 (100%)
    	Max brightness: 100
    
    Device 'ddcci7' of class 'backlight':
    	Current brightness: 100 (100%)
    	Max brightness: 100

With ddcci working properly, I can use the power management settings window from Cinnamon to adjust the brightness of my primary display. I'm not surprised that that slider does not also adjust the brightness of my second monitor but would like to find a way to enable that behavior.

Where I think I need some help.

I think what I'm looking for is a way to either create a virtual ddcci device that controls both displays or otherwise bind the two monitors together so that when ddcci6 receives a command, it is automatically sent to ddcci7 as well.

Has anybody explored how to do this already?

Last edited by ocelotsloth (2020-04-25 19:58:12)

Offline

#2 2021-02-18 13:05:45

azb
Member
Registered: 2013-02-03
Posts: 15

Re: How to sync two monitor's brightness with the ddcci kernel module?

Hia, instead of using brightnessctl and the likes, take a gander at brillo: https://gitlab.com/cameronnemo/brillo

It allows controlling multiple devices in one go, eg this to set value on all backlight devices:

    brillo -el -S 100

Offline

Board footer

Powered by FluxBB