summarylogtreecommitdiffstats
path: root/90-intel-lpmd.rules
blob: 2c6e5f8f60edeaf80e9b213ffe0b0ded31d5e55b (plain)
1
2
3
4
5
6
# Turn off intel_lpmd when running on power,
# and set to auto when running on battery.
# Rules thanks to 
# https://github.com/intel/intel-lpmd/issues/24#issuecomment-1973348960
ACTION=="change", SUBSYSTEM=="power_supply", KERNEL!="hidpp_battery*", ATTR{type}=="Mains", ATTR{online}=="0", RUN+="/usr/bin/intel_lpmd_control AUTO"
ACTION=="change", SUBSYSTEM=="power_supply", KERNEL!="hidpp_battery*", ATTR{type}=="Mains", ATTR{online}=="1", RUN+="/usr/bin/intel_lpmd_control OFF"