chiark / gitweb /
Fix elogind being non-reactive to laptop lid events.
authorSven Eden <yamakuzure@gmx.net>
Mon, 10 Sep 2018 17:50:04 +0000 (19:50 +0200)
committerSven Eden <yamakuzure@gmx.net>
Wed, 26 Sep 2018 06:14:09 +0000 (08:14 +0200)
Revert "logind: relax udev rules matching devices logind watches for"

This reverts commit 964a6d9fb555cc86528eb1cc1f6d044f85584842 and adds
the new ENV{} mechanism to 70-power-switch.rules, but leave out gpio.

Bug: https://github.com/elogind/elogind/issues/51

elogind doesn't respond to lid events with eudev-3.2.5

Closes: https://github.com/elogind/elogind/issues/51
Signed-off-by: Sven Eden <sven.eden@prydeworx.com>
src/login/70-power-switch.rules

index d69e65b3d52154d4b2280c9e436c295f94066698..f569ab50c64f581751ea61d35e799d3bf83216fa 100644 (file)
@@ -11,5 +11,10 @@ ACTION=="remove", GOTO="power_switch_end"
 
 SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT_SWITCH}=="1", TAG+="power-switch"
 SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT_KEY}=="1", TAG+="power-switch"
+SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch"
+SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch"
+SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="twl4030_pwrbutton", TAG+="power-switch"
+SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="tps65217_pwr_but", TAG+="power-switch"
+SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="* WMI hotkeys", TAG+="power-switch"
 
 LABEL="power_switch_end"