light
Control screen backlight brightness
TLDR
Get the current backlight value in percent
Set the backlight value to 50 percent
Reduce 20 percent from the current backlight value
Add 20 percent to the current backlight value
SYNOPSIS
light [OPTIONS]
light -G
light -S VALUE
light -A VALUE
light -U VALUE
light -N
light -P
PARAMETERS
-G, --get
Retrieves and prints the current backlight brightness percentage.
-S VALUE, --set VALUE
Sets the backlight brightness to an absolute VALUE. VALUE is typically a percentage (0-100) or an absolute unit, depending on the device's max brightness.
-A VALUE, --add VALUE
Increases the backlight brightness by VALUE percentage.
-U VALUE, --sub VALUE
Decreases the backlight brightness by VALUE percentage.
-N, --up
Increases the backlight brightness by a small, default increment (usually 1%).
-P, --down
Decreases the backlight brightness by a small, default decrement (usually 1%).
-O DEVICE, --output DEVICE
Specifies the backlight device to control (e.g., intel_backlight, amdgpu_bl0). Use --list to see available devices.
-L, --list
Lists all available backlight devices found on the system.
-I, --int
When used with --get, outputs the brightness as an integer value, not a float.
-r, --restore
Restores the previously saved brightness level.
-s, --save
Saves the current brightness level, which can be restored later.
-V, --verbose
Enables verbose output, providing more details about light's operations.
-v, --version
Displays the version information for light.
-h, --help
Shows a help message with usage instructions and options.
DESCRIPTION
light is a simple yet powerful command-line utility for managing display backlight brightness on Linux systems. It operates by interacting with the sysfs backlight interface, which is a standard way for the Linux kernel to expose hardware controls.
Users can leverage light to query the current brightness level, set an absolute brightness percentage, or adjust the brightness incrementally (increase or decrease). It's an essential tool for those who prefer terminal-based control, for integration into custom scripts (e.g., for keyboard hotkeys), or in environments where graphical brightness controls are unavailable or not functioning as expected. It supports multiple backlight devices and can be configured to target a specific one, making it versatile across different hardware configurations.
CAVEATS
light typically requires elevated privileges (e.g., root) or specific udev rules to allow non-root users (e.g., members of the video group) to modify backlight settings via the sysfs interface. It may not work with all display drivers or hardware, particularly those that do not expose their brightness control through the standard sysfs backlight API (e.g., some proprietary GPU drivers). Conflict with desktop environment brightness controls can also occur.
PERMISSIONS
To modify backlight settings, light needs write access to files in /sys/class/backlight/
DEVICE SELECTION
While light often auto-detects the correct backlight device, systems with multiple displays or integrated/discrete graphics might have several entries under /sys/class/backlight/. If light doesn't control the desired screen by default, use the -L option to list available devices and then specify the correct one with the -O DEVICE option (e.g., light -O intel_backlight -S 50).
HISTORY
light is a relatively modern utility designed to provide a more robust and hardware-agnostic solution for backlight control compared to older X11-specific tools like xbacklight. Developed in C, its primary focus on the sysfs interface allows it to work seamlessly on various Linux systems regardless of the display server (X11 or Wayland). It has gained popularity due to its simplicity, efficiency, and direct interaction with the kernel's backlight controls, making it a staple for scripts and custom hotkey bindings in many Linux distributions.
SEE ALSO
xrandr(1), xbacklight(1), ddcutil(1)