Last active
March 13, 2023 19:13
-
-
Save yuri1969/b1ec6fbfb48a5b501805e861fbfa9701 to your computer and use it in GitHub Desktop.
udev A/C supply vs battery rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # AC plugged in | |
| SUBSYSTEM=="power_supply", KERNEL=="AC", ATTR{online}=="1", RUN+="/bin/sh -c 'echo \'performance\' | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor'" | |
| # AC plugged out | |
| SUBSYSTEM=="power_supply", KERNEL=="AC", ATTR{online}=="0", RUN+="/bin/sh -c 'echo \'powersave\' | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment