[Intel-gfx] What to do with xf86-video-intel backlight control when running Xorg as non root

Hans de Goede hdegoede at redhat.com
Fri Feb 14 00:48:08 PST 2014


Hi,

On 02/13/2014 09:24 PM, Mark Kettenis wrote:
>> Date: Thu, 13 Feb 2014 20:37:47 +0100
>> From: Hans de Goede <hdegoede at redhat.com>

<snip>

>> Right, that is what I was thinking too, so the question then becomes how
>> hard you will scream at me if I add something like this to xf86-video-intel
>> linux specific backlight code:
>>
>>     if (geteuid() == 0) {
>>         /* Old write directly to /sys/class/backlight/... code */
>>     {
>>     else {
>>         /* The & is to avoid the xserver blocking */
>>         snprintf(command, sizeof(command), "pkexec %s/libexec/xf86-video-intel-backlight-helper %s %d&",
>>                  PREFIX, sna_output->backlight_iface, level);
>>         r = system(command);
>>         if (r) {
>>             /* complain */
>>         }
>>     }
>>
>> If you won't scream too much, and more importantly, if you will accept such
>> a patch (including code for the helper), then I'll try to cook up something
>> like this tomorrow.
> 
> I don't really care as long as this is #ifdef __linux__, but yeah,
> that's fairly gross.  Does the Linux community really think it is a
> good idea that the xserver starts to depend on policykit.

It does not look like policykit will be going away anytime soon.

Also note that this is intended as an interim solution until we sort out the
backlight mess in a better way, see the "Fixing the kernels backlight API"
thread on xorg-devel.

Regards,

Hans


More information about the xorg-devel mailing list