ybacklight
Control display backlight brightness
TLDR
Print current brightness and maximal brightness, shortened and separated by a slash
Specify the brightness
Increase the brightness by 42 big steps (4200 by default)
Decrease the brightness by 300
SYNOPSIS
ybacklight [OPTIONS] [VALUE]
PARAMETERS
get
Displays the current backlight brightness level.
set VALUE
Sets the backlight brightness to the specified VALUE. VALUE can be an absolute integer (e.g., 500) or a percentage (e.g., "50%").
inc VALUE
Increases the backlight brightness by the specified VALUE. VALUE can be an absolute integer or a percentage (e.g., "10%").
dec VALUE
Decreases the backlight brightness by the specified VALUE. VALUE can be an absolute integer or a percentage (e.g., "5%").
--device NAME
Specifies the backlight device to control (e.g., "intel_backlight", "amdgpu_bl0"). If omitted, it often attempts to find the primary or first available device in /sys/class/backlight.
--help
Displays a help message detailing usage and options.
--version
Displays version information for the utility.
DESCRIPTION
ybacklight is a lightweight command-line utility designed for managing display backlight brightness on Linux systems. It typically operates by interacting directly with the /sys/class/backlight filesystem interface, allowing users to query, set, increase, or decrease the screen's illumination level. Unlike some more complex tools, ybacklight aims for simplicity and direct control, often serving as a reliable alternative when other utilities like xbacklight (which depends on Xorg) or brightnessctl (which might have different dependencies) are not available or preferred. It's particularly useful for console environments, server setups, or minimal desktop installations where a simple, direct method for backlight adjustment is desired.
CAVEATS
ybacklight typically requires root privileges or appropriate sudoers configuration to write to files within /sys/class/backlight, which are necessary to change brightness settings.
It relies on the presence and proper functioning of the /sys/class/backlight interface, which might not be available or fully supported on all hardware or Linux distributions.
As ybacklight is often a user-contributed utility and not a standardized package, its exact options and behavior can vary slightly between different implementations found online.
PERMISSIONS
To modify backlight settings, ybacklight usually requires write access to the brightness file within a specific backlight device directory (e.g., /sys/class/backlight/intel_backlight/brightness). This commonly necessitates running the command with sudo or configuring udev rules to grant non-root users write permissions to these specific files.
DEVICE DISCOVERY
When no device is explicitly specified with --device, ybacklight typically scans the /sys/class/backlight/ directory to discover available backlight devices. If multiple devices are present (e.g., integrated display and an external monitor), some versions may default to the first found or require the user to specify the target device manually.
HISTORY
ybacklight is typically a user-contributed utility, often developed as a simple C program or shell script. Its emergence addresses the need for a straightforward backlight control method on Linux systems, especially those without Xorg (e.g., server consoles, minimal installs) or where other tools like brightnessctl are not preferred. Its development is often driven by individual system administrators or users seeking a lightweight and direct interface to the kernel's backlight control facilities.
SEE ALSO
xbacklight(1), brightnessctl(1), setpci(8), sysfs(5)