From: Raphael Wimmer Date: Mon, 26 Mar 2018 23:31:10 +0200 Subject: Use int for brightness, not char brightd saves the current brightness in the variables 'char beforeFade' and 'char savedLevel'. On hardware where brightness values get higher than 127, the variable overflows (e.g. on an HP x360 1030 G2, the max value is 7500). This results in brightd 'restoring' the brightness to a value that is much too low. Changing both variables to 'int' solves the problem. Bug-Debian: https://bugs.debian.org/894164 --- brightd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/brightd.c b/brightd.c index e9958a6..fc8c83c 100644 --- a/brightd.c +++ b/brightd.c @@ -66,8 +66,8 @@ int darkBright = 0; int maxBright = 0; char isDark = 0; -char savedLevel = 0; -char beforeFade = 0; +int savedLevel = 0; +int beforeFade = 0; char pidfile[255];