A Rust Linux kernel module that exposes monitor brightness control through DDC/CI.
It provides a kernel‑space implementation of the DDC/CI protocol, allowing user‑space tools to adjust external monitor brightness using a stable, low‑latency interface.
It lets your desktop environment control your monitor’s built‑in brightness setting, the same one you normally adjust through the monitor’s on‑screen menu, and exposes it as a standard brightness slider in GNOME, KDE, etc.
Warning
This software is provided without any warranty under GPL‑2.0.
It performs direct DDC/CI communication with monitor firmware, and improper VCP handling, hardware non‑compliance, or unexpected I²C/DDC behavior may result in permanent device damage.
Use with caution and at your own risk.
- Kernel‑space DDC/CI communication
- Rust implementation (no C glue)
- Safe abstractions over I²C/DDC messaging
- Exposes a simple sysfs interface for brightness control
- Nix‑based reproducible build system
- Out‑of‑tree module compatible with modern Linux kernels
- Linux kernel with Rust support enabled
- Kernel headers matching your running kernel
- Nix (optional, but recommended for building)
- A monitor that supports DDC/CI brightness control
To build the kernel module using Nix:
nix build .#ddci-backlightThe resulting module will be located at:
result/lib/modules/<kernel-version>/extra/ddcci_backlight.koYou can consume this module from any external flake by adding it as an input: nix
{
inputs.ddci-backlight.url = "github:sofiedotcafe/ddci-backlight";
}{
boot = {
kernelPackages = pkgs.linuxPackages_latest;
extraModulePackages = [
(pkgs.ddci-backlight.override {
kernel = config.boot.kernelPackages;
})
];
kernelModules = [ "ddcci_backlight" ];
};
}Once loaded, the module exposes a sysfs interface:
/sys/class/backlight/ddcci-backlight/Common operations:
# Read brightness
cat /sys/class/backlight/ddcci-backlight/brightness
# Set brightness
echo 50 | sudo tee /sys/class/backlight/ddcci-backlight/brightnessFor development, build the project using Nix
nix build .#defaultThis project follows the Lix Code of Conduct/Community Standards.
This repository is distributed under the GNU General Public License v2 (GPLv2).
GPL-2.0-only © 2026
