LinuxCommandLibrary

brightnessctl

Control display brightness

TLDR

List devices with changeable brightness

$ brightnessctl [[-l|--list]]
copy

Print the current brightness of the default device
$ brightnessctl [[g|get]]
copy

Print the current brightness of a specific device (can be a wildcard)
$ brightnessctl [[g|get]] [[-d|--device]] '[device_name]'
copy

Set the brightness to a specified percentage
$ brightnessctl [[s|set]] [50]%
copy

Increase brightness by a specified percentage
$ brightnessctl [[s|set]] +[10]%
copy

Decrease brightness by a specified percentage
$ brightnessctl [[s|set]] [10]%-
copy

SYNOPSIS

brightnessctl [options] command [value]
brightnessctl [options] set value

PARAMETERS

-l, --list
    Lists all available backlight devices found on the system.

-d DEVICE, --device=DEVICE
    Specifies the backlight device to control. If omitted, the first detected device is typically used.

-p, --pretend
    Performs a dry run; calculates and shows the new brightness value without actually applying it.

-s, --save
    Saves the current brightness level for the active device to a configuration file upon exit, allowing it to be restored later.

-r, --restore
    Restores the brightness level saved from a previous session on startup, using the configuration file.

-q, --quiet
    Suppresses all command output except for errors.

-h, --help
    Displays a help message and exits.

-V, --version
    Displays version information and exits.

command
    One of the actions to perform: set, get, max, info, devices. Each command has a specific function for brightness control or query.

value
    Used primarily with the set command. Can be an absolute number (e.g., '1000'), a percentage (e.g., '50%'), or a relative change (e.g., '+10%', '-5%').

DESCRIPTION

brightnessctl is a command-line utility for managing screen brightness on Linux systems. It interacts directly with the kernel's backlight devices, providing a universal way to control brightness across different hardware. Unlike xrandr, which controls monitor output properties like gamma, brightnessctl directly adjusts the backlight intensity of the display, making it particularly useful for laptops and integrated screens. It allows users to query current brightness, set specific levels (absolute or percentage), and incrementally increase or decrease brightness, offering a flexible and scriptable solution for display brightness management. It's often preferred for its simplicity and direct interaction with kernel backlight interfaces.

CAVEATS

brightnessctl relies on the Linux kernel's backlight interface (typically found under /sys/class/backlight). Its functionality is dependent on proper kernel support and device drivers for the specific display hardware. On some systems, especially those with non-standard graphics or display configurations, it might not work as expected or might require specific driver configurations. It may also conflict with desktop environments that have their own brightness control mechanisms if not properly integrated. Running it often requires root privileges or being part of a group with appropriate permissions (e.g., the 'video' group) to access /sys/class/backlight entries.

COMMON USAGE EXAMPLES

brightnessctl set 50%
Sets the brightness of the default device to 50% of its maximum.

brightnessctl set +10%
Increases the current brightness level by 10% for the default device.

brightnessctl get
Displays the current brightness level for the default device.

brightnessctl max
Displays the maximum brightness level for the default device.

brightnessctl --list
Shows all detected backlight devices, useful for determining which device to target with --device.

HISTORY

brightnessctl emerged as a more reliable and universal solution for backlight control compared to older methods like xbacklight (which often relies on Xorg and specific drivers) or direct xrandr gamma adjustments. It leverages the standard sysfs backlight interface provided by the Linux kernel, making it hardware-agnostic as long as the kernel module for the display is present. Its development aimed to provide a simple, robust, and direct command-line interface for adjusting physical backlight intensity, crucial for laptop users and systems with integrated displays. It fills a niche for users seeking scriptable and system-level brightness control without relying on desktop environments.

SEE ALSO

xrandr(1), xbacklight(1), light(1), acpi_video(4)

Copied to clipboard