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.
This commit is contained in:
committed by
Yu Watanabe
parent
6d0e8271b4
commit
4ed1e2ea17
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user