User Tools

Site Tools


Laptop Power Management


  • This expects a laptop with a battery
  • Unnecessary for desktops


  • The following commands can be ran to see if they work on specific hardware
watch -n 0.1 grep \'cpu MHz\' '/proc/cpuinfo'
sudo x86_energy_perf_policy --all 'performance' --turbo-enable '1' --force
sudo x86_energy_perf_policy --all 'power' --turbo-enable '0' --force


Fedora Workstation

  • kernel-tools provides x86_energy_perf_policy
sudo dnf install 'kernel-tools'


  • linux-tools-common provides x86_energy_perf_policy, and linux-tools-generic provides the module for it to actually work
  • :!: TODO: This for whatever reason doesn't actually install the latest kernel tools for the running kernel or some nonsense
linux-tools-common linux-tools-generic



  • Change the backlight sysfs as-needed (see backlight notes) or remove altogether
sudo mkdir -p '/etc/udev/scripts.d' && sudo -e '/etc/udev/scripts.d/' && sudo chmod +x '/etc/udev/scripts.d/'
# AC
echo "$(cat '/sys/class/backlight/'*'/max_brightness')" | tee '/sys/class/backlight/'*'/brightness' > '/dev/null'
x86_energy_perf_policy --all 'balance-performance' --turbo-enable '1' --force
# End


  • Change the backlight sysfs as-needed (see Backlight notes) or remove altogether
sudo mkdir -p '/etc/udev/scripts.d' && sudo -e '/etc/udev/scripts.d/' && sudo chmod +x '/etc/udev/scripts.d/'
# Battery
echo '60600' | tee '/sys/class/backlight/'*'/brightness' > '/dev/null'
x86_energy_perf_policy --all 'balance-power' --turbo-enable '0' --force
# End

udev Rule

  • Requires the above AC and Battery scripts
sudo -e '/etc/udev/rules.d/99-power.rules' && sudo udevadm control --reload
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/etc/udev/scripts.d/"
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/etc/udev/scripts.d/"
/var/www/wiki/data/pages/notes/laptop_power_management.txt · Last modified: 2019/12/14 13:06 by Sean Rhone

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki