backlight_helper_get_best_backlight()

Harald Judt h.judt at gmx.at
Sat Apr 23 22:42:30 CEST 2016


Hi Jack,

Am 22.04.2016 um 22:11 schrieb Jack Bates:
> On 22/04/16 11:05 AM, Harald Judt wrote:
>> Am 22.04.2016 um 19:44 schrieb Jack Bates:
>>> On 21/04/16 11:33 PM, Harald Judt wrote:
>>>> Am 22.04.2016 um 02:56 schrieb Jack Bates:
>>>>> Would you consider a patch to replace the list in
>>>>> backlight_helper_get_best_backlight()
>>>>> http://git.xfce.org/xfce/xfce4-power-manager/tree/src/xfpm-backlight-helper.c#n384
>>>>>
>>>>>
>>>>
>>>> Yes we could do that if you provide one. However...
>>>>
>>>>> with the same logic as here:
>>>>> https://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/power/gsd-backlight-linux.c#n61
>>>>>
>>>>>
>>>>>
>>>>> i.e. grab the first interface of type "firmware" and fall back on the
>>>>> first interface of type "platform" and finally "raw".
>>>>
>>>> This seems to me like just another priority list. Can you
>>>> tell/guarantee
>>>> that this would be better than the current implementation?
>>>>
>>>> Isn't this just replacing the current implementation with another
>>>> arbitrary solution using a priority list?
>>>
>>> This is the commit that replaced the whitelist with the kernel-supplied
>>> backlight type in the GNOME source, and the rationale:
>>> https://git.gnome.org/browse/gnome-settings-daemon/commit/plugins/power/gsd-backlight-helper.c?id=fff09fe17eecb9314962d119a5c5b4e865f2570d
>>>
>>> I'd be happy to cook up and provide a patch for Xfce.
>>
>> This is possible starting with kernel 2.6.37. That means this is
>> probably linux only, and I know we have *bsd users too, because someone
>> provided a patch a while ago. I have asked in IRC #xfce-dev whether this
>> would work for these "other" systems, so let's wait for the feedback. Or
>> maybe someone else who reads this can tell?
> 
> Sounds good, thanks for looking to get feedback.
> Is the existing whitelist portable?

The FreeBSD code does not use backlight_helper_get_best_backlight() and
thus does not need this whitelist. So feel free to cook up the patch.
Please create a new bug for xfce4-power-manager at bugzilla.xfce.org and
attach the patch there for review.

Regards,
Harald

-- 
`Experience is the best teacher.'

PGP Key ID: 0xBA3AC516
Fingerprint: 569E 0ADA 440A 8B11 D1A2 AB47 8238 0256 BA3A C516


More information about the Xfce mailing list