xbacklight
Adjust display backlight brightness
TLDR
Get the current screen brightness as a percentage
Set the screen brightness to 40%
Increase current brightness by 25%
Decrease current brightness by 75%
Increase backlight to 100%, over 60 seconds (value given in ms), using 60 steps
SYNOPSIS
xbacklight [-display display] [-help] [-version] [-get] [-set percentage] [-inc percentage] [-dec percentage] [-time milliseconds]
PARAMETERS
-display display
Specifies the X display to connect to. If not specified, uses the DISPLAY environment variable.
-help
Displays a help message and exits.
-version
Displays the version number and exits.
-get
Gets the current backlight brightness as a percentage. Outputs the percentage to standard output.
-set percentage
Sets the backlight brightness to the specified percentage (0-100). e.g. -set 50 will set the brightness to 50%.
-inc percentage
Increases the backlight brightness by the specified percentage. e.g. -inc 10 will increase the brightness by 10%.
-dec percentage
Decreases the backlight brightness by the specified percentage. e.g. -dec 10 will decrease the brightness by 10%.
-time milliseconds
specifies the fade time in milliseconds for the set, inc and dec parameter
DESCRIPTION
The xbacklight command is a simple utility for controlling the backlight brightness of monitors connected to an X server. It primarily uses the X Backlight extension. This extension allows software to manipulate the brightness of supported backlights. It is a command-line tool designed to be easily scriptable, making it suitable for integration into desktop environments or custom scripts for adjusting brightness on demand or in response to system events.
xbacklight reads and modifies brightness values directly, without providing a graphical user interface. This makes it well-suited to systems where a graphical interface is unavailable or not desired. It calculates and sets the brightness value as a percentage of the maximum available brightness.
CAVEATS
Requires the X Backlight extension to be supported by the X server and the monitor driver. May not work correctly on all systems or with all drivers. Some systems manage backlight through different mechanisms, such as ACPI, which xbacklight cannot control.
EXIT STATUS
xbacklight returns 0 on success, and a non-zero value on failure.
HISTORY
xbacklight emerged as a simple and direct solution for manipulating backlight brightness within the X Window System. It was created to provide a command-line interface for brightness control, complementing graphical tools and providing flexibility in scripting and automation.
Its development focused on utilizing the X Backlight extension, a standard protocol intended to provide a consistent way for applications to control backlight brightness across different hardware and drivers. The tool gained popularity due to its ease of use and its ability to integrate into various desktop environments and custom configurations.
SEE ALSO
xrandr(1)