From: David SantamarĂ­a Rogado Date: Mon, 29 Dec 2025 16:29:37 +0000 (+0100) Subject: backlight: reduce clamp to 1% X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ed1e2ea17e0f29a23d7a3dd65af192def9b3214;p=thirdparty%2Fsystemd.git backlight: reduce clamp to 1% Actually GNOME sets a clamp of 1% and divides in 20 steps the brightness control. Using 5% clamp makes things like in a device with max value 640 to always be in the first brightness step in GNOME and we can't leave in the minimum. GNOME set steps of 640/20 = 32 with the zero step 640 * 1% = 6. When we restart the device with the lowest bright systemd sees 6 but sets 640 * 5% = 32, so we get the brightness in the first step. Tests in IPS and OLED panels have been done and 1% still seems a comprensive minimun usable value so use that to allow all environments to be able to set lower brightness values that won't be raised by systemd at boot. If your user enviroment allow to set excesive lower unusable values you should blame it or yourself if you directle changes it through sysfs but not systemd. --- diff --git a/NEWS b/NEWS index b5fba3cb999..3f9dbda1dbf 100644 --- a/NEWS +++ b/NEWS @@ -44,6 +44,14 @@ CHANGES WITH 260 in spe: SYSTEMD_COLORS=256, and SYSTEMD_COLORS=24bit respectively when output is to a non-dumb TTY, and like SYSTEMD_COLORS=no otherwise. + * Minimum backlight brightness clamp for restoring it at boot has been + lowered from 5% to 1%. This is a safe change allowing more chance to + user environments to set lower values that won't be set higher at boot + while still giving the chance to recover from blackouts because + excesive lower bright values by just rebooting. Notice that if your + enviroment allow you to set excesive low brightness values this has + nothing to do with systemd's brightness clamp. + CHANGES WITH 259: Announcements of Future Feature Removals and Incompatible Changes: diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c index 86994412dcf..0ef362813fb 100644 --- a/src/backlight/backlight.c +++ b/src/backlight/backlight.c @@ -385,7 +385,7 @@ static int shall_clamp(sd_device *device, unsigned *ret) { return r; if (r > 0) { property = "ID_BACKLIGHT_CLAMP"; - default_percent = 5; + default_percent = 1; } else { property = "ID_LEDS_CLAMP"; default_percent = 0;