rickysarraf / laptop-mode-tools

Power Savings tool for Linux
https://www.researchut.com/tags/laptop-mode-tools/
GNU General Public License v2.0
556 stars 47 forks source link

Power supply plug state change is not detected on Lenovo 700-15ISK #142

Closed paradox-ptr closed 5 years ago

paradox-ptr commented 5 years ago
ACTION=="change", SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_NAME}=="|AC|ACAD", RUN+="lmt-udev auto"

This rule from 99-laptop-mode.rules does not match my Power Supply:

UDEV  [1224.693133] change   /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:17/PNP0C09:00/ACPI0003:00/power_supply/ADP1 (power_supply)
ACTION=change
DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:17/PNP0C09:00/ACPI0003:00/power_supply/ADP1
POWER_SUPPLY_NAME=ADP1
POWER_SUPPLY_ONLINE=1
SEQNUM=2451
SUBSYSTEM=power_supply
USEC_INITIALIZED=22088585

Getting rid of ENV{POWER_SUPPLY_NAME} selector, of course, helps. So does changing the argument to "|AC|ACAD|ADP*"