[Intel-gfx] [PATCH] intel: Add a helper for setting backlight without root rights
Chris Wilson
chris at chris-wilson.co.uk
Sat Feb 15 16:47:56 CET 2014
On Sat, Feb 15, 2014 at 11:53:30AM +0000, Chris Wilson wrote:
> From: Hans de Goede <hdegoede at redhat.com>
>
> Once the xserver stops running as root on kms capabable systems, we will need
> some other way to access the backlight.
>
> The approach taken in this patch leaves most of the heavy lifting (wrt
> doing everything suid root safe) to pkexec, as is done in ie
> gnome-settings-daemon, which controls the backlight directly on ati and
> nouveau cards.
>
> This commit adds src/backlight.h and src/backlight.c as a place to share common
> backlight code, in the future most of the duplicate backlight code inside
> src/sna/sna_display.c and src/uxa/intel_display.c should be moved there.
Spent some more time bikeshedding, satisfying myself that it all should
be working properly, e.g. (echo 15 ; sleep 2; echo 4; sleep 1; echo -e
"20\n10"; sleep 1; echo -n 1; sleep 1; echo 5) | pkexec /usr/libexec/xf86-video-intel-backlight-helper
works and so decided that it was just pkexec not behaving as expected
during Xorg launch.
Overall is was nice improvement, thanks a lot.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list