#999627 unable to modify display backlight settings as a non-root user

Package:
light
Source:
light
Description:
control display backlight controllers and LEDs
Submitter:
Alexander Necheff
Date:
2021-11-13 23:27:03 UTC
Severity:
normal
#999627#5
Date:
2021-11-13 23:06:26 UTC
From:
To:
Executing light commands that would modify the backlight brightness, for
example setting the brightness to 10%:
~$ light -S 10
do not work when run as a non-root user, even if that user is a member of
the "video" group. The upstream author suggests "video" membership is the
intended mechanism to grant non-root users the necessary privilege to
modify backlight settings. su'ing to root and then executing the same
commands successfully modifies the backlight brightness.

Looking at the upstream git repo there is a udev rule included as part of
the source distribution:
https://github.com/haikarainen/light/blob/master/90-backlight.rules
Manually copying these rules into /etc/udev/rules.d/ allowed my
unpriviledged user to modify the backlight brightness on the condition that
I was a member of the "video" group.
This seems more attractive than manually making /usr/bin/light SUID.

Currently running Bullseye 11.1, kernel 5.14.9-2~bpo11+1, glibc
2.31-13+deb11u2.
For hardware, I'm using a Framework laptop which appears to use
/sys/class/backlight/intel_backlight/ for getting and setting backlight
options.

#999627#10
Date:
2021-11-13 23:25:39 UTC
From:
To:
Also note that upstream bug 106 (
https://github.com/haikarainen/light/issues/106) claims that the udev rule
"ACTION" should be "change" rather than "add".
I am not proficient with udev rules but I did not observe a problem leaving
the "ACTION" as "add" either on the backports kernel or the regular stable
kernel.
Perhaps someone else can speak to the significance of "add" vs "change" in
the "ACTION" match clause of the udev rules.
that