fix(brightness): reading brightness in actual_brightness (#1689)

As the kernel documentation said:
https://www.kernel.org/doc/Documentation/ABI/stable/sysfs-class-backlight

    This file will also show the brightness level stored in the driver, which may not be the actual brightness (see actual_brightness).

Therefore the brightness value should be read in the actual_brightness file.

Fix #1180
This commit is contained in:
Jérôme BOULMIER 2019-04-07 11:04:55 -04:00 committed by Patrick Ziegler
parent 7d0c6300f6
commit 627c4ac2af

View File

@ -73,7 +73,7 @@ set(SETTING_PATH_ADAPTER "/sys/class/power_supply/%adapter%"
CACHE STRING "Path to adapter") CACHE STRING "Path to adapter")
set(SETTING_PATH_BACKLIGHT_MAX "/sys/class/backlight/%card%/max_brightness" set(SETTING_PATH_BACKLIGHT_MAX "/sys/class/backlight/%card%/max_brightness"
CACHE STRING "Path to file containing the maximum backlight value") CACHE STRING "Path to file containing the maximum backlight value")
set(SETTING_PATH_BACKLIGHT_VAL "/sys/class/backlight/%card%/brightness" set(SETTING_PATH_BACKLIGHT_VAL "/sys/class/backlight/%card%/actual_brightness"
CACHE STRING "Path to file containing the current backlight value") CACHE STRING "Path to file containing the current backlight value")
set(SETTING_PATH_BATTERY "/sys/class/power_supply/%battery%" set(SETTING_PATH_BATTERY "/sys/class/power_supply/%battery%"
CACHE STRING "Path to battery") CACHE STRING "Path to battery")