From 1a0464230c08506c3fd715ff7cc56660df3a85ca Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 11 Oct 2013 09:45:32 +0200 Subject: Add support for saving/restoring keyboard backlights Piggy-backing on the display backlight code, this saves and restores keyboard backlights on supported devices. The detection code matches that of UPower: http://cgit.freedesktop.org/upower/tree/src/up-kbd-backlight.c#n173 https://bugs.freedesktop.org/show_bug.cgi?id=70367 [tomegun: also work for devices named "{smc,samsung,asus}::kbd_backlight"] --- rules/99-systemd.rules.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rules') diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in index bbb7d0c2c3..20edffb290 100644 --- a/rules/99-systemd.rules.in +++ b/rules/99-systemd.rules.in @@ -51,9 +51,11 @@ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??: ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="@rootlibexecdir@/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name" -# Pull in backlight save/restore for all firmware backlight devices +# Pull in backlight save/restore for all firmware backlight devices, +# and keyboard backlights ACTION=="add", SUBSYSTEM=="backlight", ATTR{type}=="firmware", TAG+="systemd", ENV{SYSTEMD_WANTS}+="systemd-backlight@$name.service" +ACTION=="add", SUBSYSTEM=="leds", KERNEL=="*kbd_backlight", TAG+="systemd", ENV{SYSTEMD_WANTS}+="systemd-backlight@$name.service" # Asynchronously mount file systems implemented by these modules as # soon as they are loaded. -- cgit v1.2.3-54-g00ecf