chiark / gitweb /
backlight: do nothing if max_brightness is 0
authorThomas Bächler <thomas@archlinux.org>
Thu, 27 Mar 2014 22:41:59 +0000 (23:41 +0100)
committerTom Gundersen <teg@jklm.no>
Fri, 4 Apr 2014 13:14:12 +0000 (15:14 +0200)
commit3cadce7d33e263ec7a6a83c00c11144930258b22
tree4ad54bab7aa85eb7ac365fd4fe655477e610dff9
parent51e430a5b053dde2abc4bbd5d702ff2b900f10c2
backlight: do nothing if max_brightness is 0

On virtually any newer Asus mainboard, the eeepc-wmi driver is loaded.
It exposes a backlight device despite the lack of any physical backlight
devices. This fake backlight device has max_brightness set to 0. Since
the introduction of the clamp_brightness function, systemd-backlight
tries to write '1' to brightness and fails.

This patch changes systemd-backlight to exit gracefully when
max_brightness is 0 before performing any action. This affects
both the load and save actions.
src/backlight/backlight.c