chiark / gitweb /
logind: Listen to WMI hotkeys to catch SW_DOCK state/events
authorMartin Pitt <martin.pitt@ubuntu.com>
Tue, 1 Sep 2015 08:51:15 +0000 (10:51 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:19:06 +0000 (10:19 +0100)
On Dell and HP laptops the dock state/events (SW_DOCK) come from the "{Dell,HP}
WMI hotkeys" input devices. Tag them as power-switch so that login actually
considers them. Use a general match in case this affects other vendors, too.

Thanks to Andreas Schultz for debugging this!

https://launchpad.net/bugs/1450009

src/login/70-power-switch.rules

index 71f9fe6c72ee09ce359ee0331bae4ac311558389..36d2a3eb40632458485f7ec5a30ce52327218615 100644 (file)
@@ -11,6 +11,7 @@ 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"
 SUBSYSTEM=="input", KERNEL=="event*", \
   SUBSYSTEMS=="platform", DRIVERS=="gpio-keys", ATTRS{keys}=="116", TAG+="power-switch"