[Intel-gfx] PROBLEM: Native backlight regressed from logarithmic to linear scale
Hans de Goede
hdegoede at redhat.com
Tue Jul 29 11:46:13 CEST 2014
Hi,
On 07/22/2014 06:32 AM, Anders Kaseorg wrote:
> [1.] One line summary of the problem:
>
> Native backlight regressed from logarithmic to linear scale
>
> [2.] Full description of the problem/report:
>
> With the new default of video.use_native_backlight=0 (commit
> v3.16-rc1~30^2~2^3), my Thinkpad T510 backlight has become very difficult
> to control near the low end of the scale. The lowest setting now turns
> the backlight completely off, but the second-lowest setting is too bright.
> Meanwhile, the difference between the highest several settings is nearly
> imperceptible.
>
> This happened because /sys/class/backlight/acpi_video0/brightness (which
> has now disappeared) used a different scale than
> /sys/class/intel_backlight/brightness; the relationship between
> acpi_video0 and intel_backlight was not linear. I measured the exact
> relationship as follows:
>
> acpi intel
> 0 52
> 1 87
> 2 139
> 3 174
> 4 226
> 5 261
> 6 313
> 7 435
> 8 591
> 9 800
> 10 1078
> 11 1461
> 12 1914
> 13 2557
> 14 3358
> 15 4437
>
> The relationship is close to logarithmic; a good fit is intel =
> 60*(4/3)^acpi, or acpi = log_{4/3} (intel/60). It’s well known that
> perceived brightness varies logarithmically with physical luminance
> (Fechner’s law), so it’s no surprise that the acpi_video0 scale was more
> useful.
>
> Since the kernel no longer uses ACPI to do this translation, it should do
> the translation itself.
I've been thinking a bit about this, and I believe that the right answer
here is to do the linear to logarithmic mapping in user-space. The intel
backlight interface has a type of raw, clearly signalling to userspace that
it is a raw "untranslated" interface, as such any fanciness such as
creating a logarithmic scale should be done in userspace IMHO.
Regards,
Hans
More information about the Intel-gfx
mailing list