This page is part of my digital garden.

This page might be unfinished or have typos. These pages are meant as part of a public living notebook to be edited over time. For more, visit the page explaining the concept of a digital garden.

DDC/CI Monitor Control

DDC/CI is an i2c protocol for controlling your monitors’ brightness, contrast, color, and input selection.

It’s good to understand DDC because Desktops running Windows/MacOS/etc. will not support changing brightness for your monitor by default which makes for an annoying (possibly painful) experience by working in a dark/bright room and a monitor that isn’t configured correctly.

It’s also useful for dual computer setups sharing a keyboard/mouse/monitor, because it can be used to tell the monitor to switch inputs without requiring touching the monitor. Some have created custom apps which monitor the USB devices connected via a USB switch and telling DDC to switch to the correct input.

Windows Link to heading

The best way to control your monitors in Windows is using TwinkleTray installed using a release uploaded to Github (instead of from the Windows Store).

It is possible to use the Twinkle Tray.exe directly to send DDC/CI commands the app itself doesn’t want to support like to change the input for the display.

I use the following as the target in a shortcut on my desktop to switch my monitor over to the USB-C input so I can use my Mac.

"C:\Users\chris\AppData\Local\Programs\twinkle-tray\Twinkle Tray.exe" --MonitorID="{DISPLAY_NAME}" --VCP="0x60:16"

Sometimes TwinkleTray will get confused or loose the DDC/CI status for the monitor and simply clicking “Refresh Displays” in the tray menu should fix things and make any shortcuts doing things like this work again. It often happens after sleep or if the display has been idle for too long.

MacOS Link to heading

Use the BetterDisplay app instead of Monitor Control. The developer of this app was a huge contributor to Monitor Control, and while Monitor Control is great the killer feature for me is that BetterDisplay gives you a more advanced menu in the Menu Bar that can let you switch the input of your screen. You can also setup a Key Bind that lets you switch inputs entirely via the keyboard.

Linux Link to heading

You have several options in Linux and they all start with making sure the i2c-dev kernel module is enabled so apps can talk to your monitor. You may also want to update udev rules to allow users of a certain group to access specific i2c devices without sudo.

There is ddccontrol but it appears unmaintained and the supposedly correct tool to use is ddcutil. There are extensions for Gnome 3 to control ddcutil from the system tray, but you could also just create some bash scripts/functions as well to set things via the terminal.

NixOS Link to heading

To install in NixOS add ddcutil, ddcui, and gnomeExtensions.brightness-control-using-ddcutil to your system packages.

Then also configure udev rules for the ddc group to use it without sudo

services.udev.extraRules = ''KERNEL=="i2c-[0-9]*", GROUP="ddc", MODE="0660", PROGRAM="${pkgs.ddcutil}/bin/ddcutil --bus=%n getvcp 0x10"'';

Make sure to create a ddc group and add it to the users you want to control the monitor brightness. For example:

  users.groups.ddc = { };
  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.cmp = {
    isNormalUser = true;
    extraGroups = [ "wheel" "networkmanager" "ddc" ];
  };

Interesting Projects Link to heading

@haimgel on GitHub describes how he wrote two programs, one for mac and one for windows, which watches for his USB Switch and uses DDC/CI to switch the inputs as needed: https://haim.dev/posts/2020-07-28-dual-monitor-kvm/ [github]

Last updated on