On 20-01-17 02:05, Kevin Kofler wrote:
Hans de Goede wrote:
> most tools simply write directly to /sys/class/backlight, but xbacklight
> relies on the xrandr property (and is the only tool do so AFAICT).
KDE's PowerDevil supports both and prefers XRandR where supported:
As you pointed out, the nice thing about the XRandR property is that it does
not require root access, whereas the sysfs interface requires going through
a KAuth/PolicyKit helper to get root (which PowerDevil sets up with a
default policy of "yes" so that all users can use it without a PolicyKit
password prompt). It is sad that most drivers did not bother implementing
Actually since the xserver no longer runs as root now a days, the
xf86-video-* drivers need to go through the same hoops, which
is why xorg-x11-drv-intel has: /usr/libexec/xf86-video-intel-backlight-helper
which it starts through pkexec ...
Note that systemd already has some backlight handling for save / restore
of backlight settings over a reboot. I believe the real solution here might
be to have a systemd-backlightd or some such, rather then have all DEs
invent their own wheel.