From 627c4ac2af477826e26d799abe790d5c3b0f5aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20BOULMIER?= Date: Sun, 7 Apr 2019 11:04:55 -0400 Subject: [PATCH] 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 --- cmake/02-opts.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/02-opts.cmake b/cmake/02-opts.cmake index 6b271e24..8fa9a863 100644 --- a/cmake/02-opts.cmake +++ b/cmake/02-opts.cmake @@ -73,7 +73,7 @@ set(SETTING_PATH_ADAPTER "/sys/class/power_supply/%adapter%" CACHE STRING "Path to adapter") set(SETTING_PATH_BACKLIGHT_MAX "/sys/class/backlight/%card%/max_brightness" 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") set(SETTING_PATH_BATTERY "/sys/class/power_supply/%battery%" CACHE STRING "Path to battery")