A simple utility for setting backlight brightness on some GNU/Linux systems using sysfs files.
This works like most system provided backlight brightness controls but allows for increased resolution when the brightness percentage nears zero.
The desktop-environment package provides a more comprehensive set of commands for controlling your desktop.
It does everything this package does and more. The only differences for controlling the backlight is that
desktop-environment uses the brightnessctl
shell command while backlight.el writes directly to sysfs,
and backlight.el has variable resolution adjustment.
M-x backlight
Then use <
or >
to adjust backlight brightness, C-g
when done.
M-x backlight-set-raw
prompts for a value to write directly to the device file.
By default, only root can change the brightness. A udev rule must be added to allow users in the video group to change the brightness. Read more here: https://wiki.archlinux.org/index.php/backlight#ACPI
Run the add_udev_rule.sh script to create the udev file and reload:
./add_udev_rule.sh
OR, create and reload manually:
create file: /etc/udev/rules.d/backlight.rules
with contents:
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="acpi_video0", GROUP="video", MODE="then"
run: sudo udevadm control --reload-rules && udevadm trigger