LinuxCommandLibrary

ddcutil

Control monitor settings from the command line

TLDR

List all compatible displays

$ ddcutil detect
copy

Change the brightness (option 0x10) of display 1 to 50%
$ ddcutil [[-d|--display]] [1] setvcp [10] [50]
copy

Increase the contrast (option 0x12) of display 1 by 5%
$ ddcutil [[-d|--display]] [1] setvcp [12] [+] [5]
copy

Read the settings of display 1
$ ddcutil [[-d|--display]] [1] getvcp [ALL]
copy

SYNOPSIS

ddcutil [global-options] command [command-options] [arguments]
Example: ddcutil detect
Example: ddcutil setvcp brightness 50
Example: ddcutil --display 1 getvcp 0x10

PARAMETERS

--display N
    Selects which monitor to operate on (by its detected sequence number, starting from 1).

--bus ID
    Specifies the I2C bus ID to communicate with a monitor directly.

--enable-capabilities
    Augments the capabilities command output by showing associated VCP codes.

--sleep-multiplier FACTOR
    Adjusts inter-command delays for DDC/CI messages, useful for monitors with unreliable implementations.

detect
    Scans for and lists all DDC/CI capable monitors currently connected to the system.

getvcp CODE|NAME
    Reads and displays the current value of a specified VCP feature (e.g., getvcp brightness or getvcp 0x10).

setvcp CODE|NAME VALUE
    Sets a VCP feature to a specific VALUE (e.g., setvcp brightness 50).

capabilities
    Displays the full list of DDC/CI capabilities and supported VCP features of the selected monitor.

vcpinfo CODE|NAME
    Provides detailed information about a specific VCP feature, including its name, type, and possible values.

scs COMMAND
    Sends a Screen Control Standard command to the monitor (e.g., scs reset for a factory reset).

read-edid
    Reads and displays the monitor's Extended Display Identification Data (EDID).

save-state FILE
    Saves the current VCP settings of the selected monitor to a specified FILE.

load-state FILE
    Loads VCP settings from a specified FILE and applies them to the selected monitor.

DESCRIPTION

ddcutil is a powerful Linux command-line utility for querying and controlling monitor settings, such as brightness, contrast, input source, and color temperature, directly from the command line. It communicates with monitors using the DDC/CI (Display Data Channel Command Interface) protocol, which is an industry standard for communication between a computer and a display device over the video cable (VGA, DVI, HDMI, DisplayPort). This allows users to automate monitor configurations, integrate display management into scripts, or simply adjust settings without relying on physical monitor buttons or often limited GUI tools.

ddcutil supports a wide range of VCP (Virtual Control Panel) features, enabling fine-grained control over various display parameters. It can detect connected monitors, identify their capabilities, and apply specific settings by writing values to VCP features. Its robust error handling and diagnostic capabilities make it an invaluable tool for system administrators, power users, and anyone needing programmatic control over their display devices.

CAVEATS

DDC/CI Support: Not all monitors fully implement the DDC/CI standard or may have buggy implementations, leading to unexpected behavior or limited control over certain features.
Kernel Modules & Permissions: Requires the i2c-dev kernel module to be loaded. Access to /dev/i2c-* devices typically requires root privileges or properly configured udev rules.
Video Driver Issues: Certain proprietary video drivers or specific kernel versions may interfere with DDC/CI communication, potentially causing issues or preventing functionality.
Multiple Displays/GPUs: Identifying the correct I2C bus can be complex in systems with multiple monitors, integrated graphics, or multiple discrete GPUs.

GUI INTEGRATION

ddcutil serves as the foundational backend for several graphical user interfaces (GUIs), such as ddcui (a Qt-based GUI), which offer a more intuitive way to adjust monitor settings without direct command-line interaction.

AUTOMATION POTENTIAL

Its command-line nature makes ddcutil exceptionally well-suited for scripting. Users can automate tasks such as dynamically adjusting brightness based on ambient light, switching input sources, or synchronizing settings across multiple monitors as part of their daily workflow or system events.

HISTORY

ddcutil was developed to fill a critical gap in Linux display management, providing a robust and reliable command-line interface for DDC/CI communication that was often missing or poorly implemented in existing tools. Its creation aimed to enable programmatic control over monitor settings, addressing the need for automation and advanced configuration. The project has continuously focused on broad monitor compatibility, comprehensive VCP feature support, and robust error handling, establishing itself as the de facto utility for DDC/CI control on Linux.

SEE ALSO

xrandr(1), i2cdetect(8), lspci(8), hwinfo(8)

Copied to clipboard