ayufan-pine64 / linux-build

Pine64 Linux build scripts, tools and instructions (based on Longsleep work)
MIT License
154 stars 36 forks source link

udev rules to allow systemd-logind to monitor power-switch devices #59

Open nickbreen opened 6 years ago

nickbreen commented 6 years ago

Gist

Copied here for convenience.

# Match the special power key input/event
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="axp81x-supplyer", TAG+="power-switch"

# Match the touchpad and special/blue Fn-keys
# Also matches the normal keyboard but it fires no power-switch relevant events
ACTION=="add", SUBSYSTEM=="input", ATTRS{idVendor}=="258a", ATTRS{idProduct}=="000c", TAG+="power-switch"

# Match the lid/hall sensor
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="hall", TAG+="power-switch"