[systemd-devel] [PATCH] backlight: Do not clamp brightness for LEDs
Denis Tikhomirov
dvtikhomirov at gmail.com
Wed Jun 4 14:25:15 PDT 2014
Systemd-backlight can not set keyboard backlight level to 0 due to
clamp_brightness.
I found report for this, https://bugs.freedesktop.org/show_bug.cgi?id=77092
, and it has patch attached. Josh Triplett <josh at joshtriplett.org> reviewed
that patch and said that it looks good, but he would rather check not for
"subsystem is not leds" but for "subsystem is backlight", so I made my
version of fix.
---
src/backlight/backlight.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
index 691472c..2762fde 100644
--- a/src/backlight/backlight.c
+++ b/src/backlight/backlight.c
@@ -381,7 +381,8 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}
- clamp_brightness(device, &value, max_brightness);
+ if (streq(ss, "backlight"))
+ clamp_brightness(device, &value, max_brightness);
r = udev_device_set_sysattr_value(device, "brightness",
value);
if (r < 0) {
--
1.9.3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140605/ac6240db/attachment.html>
More information about the systemd-devel
mailing list