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 [options] command [command-specific arguments]

PARAMETERS

--display
    Selects the X display to use. Defaults to the value of the DISPLAY environment variable if set, or :0 if not.

--bus
    Specifies the I2C bus to use. Useful when multiple video cards or buses are present.

detect
    Detects connected monitors and displays their information.

capabilities
    Queries and displays the DDC/CI capabilities of the monitor.

getvcp
    Reads and displays the current value of the specified VCP feature.

setvcp
    Sets the value of the specified VCP feature.

dumpvcp
    Dumps the values of all supported VCP features of a monitor.

loadprefs
    Loads settings from a configuration file into the monitors.

--verbose
    Increases the verbosity of the output.

--help
    Displays help information.

--version
    Displays version information.

DESCRIPTION

ddcutil is a command-line utility for querying and controlling monitor settings on Linux. It leverages the DDC/CI (Display Data Channel Command Interface) protocol, allowing users to adjust brightness, contrast, color settings, input source, and other features of connected monitors via the system's video card.

DDC/CI communication typically occurs over the I2C bus, which is accessed through the video card's display interface (e.g., HDMI, DisplayPort, VGA). ddcutil abstracts this communication, providing a user-friendly interface to control monitor features. It is especially useful in environments where graphical monitor control utilities are unavailable or insufficient, such as headless servers or remote access scenarios. Furthermore, it allows for automation of monitor settings, enabling users to create scripts to adjust display parameters based on specific conditions or preferences. The command is capable of discovering connected monitors, reading current settings, and writing new values to supported VCP (Virtual Control Panel) features. Proper access rights and I2C bus configuration are necessary for ddcutil to function correctly.

CAVEATS

Requires proper I2C bus access permissions. Running ddcutil as root might be necessary but is generally discouraged for security reasons. Misconfiguration of VCP features can lead to unexpected monitor behavior. Not all monitors support the same set of VCP features.

VCP CODES

VCP (Virtual Control Panel) codes are hexadecimal identifiers that represent specific monitor features. Consult your monitor's manual or the VESA Monitor Control Command Set (MCCS) standard for a complete list of supported VCP codes.

CONFIGURATION FILES

ddcutil can load monitor settings from configuration files, allowing you to save and restore preferred display configurations. The format of these files is described in the ddcutil documentation.

EXAMPLES

Example: Setting brightness to 75:
ddcutil setvcp 10 75

Example: Getting the current input source:
ddcutil getvcp 60

HISTORY

ddcutil was developed to provide a command-line interface for controlling monitor settings on Linux systems where graphical tools were insufficient. It has evolved to support a wide range of monitors and VCP features, becoming a popular tool for system administrators, power users, and those seeking to automate monitor adjustments. Development is ongoing, with new features and monitor compatibility being added regularly.

SEE ALSO

i2cdetect(8), xrandr(1)

Copied to clipboard