forked from linrunner/TLP
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtlp.rules.in
14 lines (11 loc) · 806 Bytes
/
tlp.rules.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# tlp - udev rules
#
# Copyright (c) 2024 Thomas Koch <linrunner at gmx.net> and others.
# SPDX-License-Identifier: GPL-2.0-or-later
# handle change of power source ac/bat, ignore input device batteries
ACTION=="change", SUBSYSTEM=="power_supply", KERNEL!="hidpp_battery*", RUN+="@TLP_SBIN@/tlp auto"
# handle added usb devices (exclude subdevices via DRIVER=="USB")
ACTION=="add", SUBSYSTEM=="usb", DRIVER=="usb", ENV{DEVTYPE}=="usb_device", RUN+="@TLP_ULIB@/tlp-usb-udev usb %p"
# handle added usb disk devices (exclude partitions via ENV{DEVTYPE}=="disk")
ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="usb", RUN+="@TLP_ULIB@/tlp-usb-udev disk %p"
ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_USB_TYPE}=="disk", RUN+="@TLP_ULIB@/tlp-usb-udev disk %p"