Dell 9360 backlight adjuster
cut another syscall; avoid magic numbers
lib: avoid propagating types needlessly
lib: reduce number of syscalls


browse  log 



You can also use your local clone with git send-email.

#bl - dell 9360 backlight adjuster

This program solves two issues I was having with my 9360.

  1. xbacklight randomly stopped working.

  2. At low brightness levels, not all changes in brightness make a difference. The effective brightness is quantized. For example, changing from 101 to 120 makes no difference; the two can be treated as equivalent.

Thus the goal of brightness adjustment is not merely to change the level, but the brightness equivalence class.

The brightness equivalence class is computed by rounding down to the lowest brightness with the same effect. For example, 99, while it is nearest to 100, has the same effective brightness as 71. Thus 99 can be rounded down to 71.

Above 276, equivalence classes are not needed.

There is a third issue that probably will never be solved, which is that the brightness seems to have some hysteresis or nondeterminism at low levels with respect to input.