Both sides previous revisionPrevious revisionNext revision | Previous revision |
linux:notes:x86_energy_perf_policy [2025/04/25 21:45] – Sean Rhone | linux:notes:x86_energy_perf_policy [2025/08/25 23:55] (current) – Sean Rhone |
---|
* [[linux;distros;opensuse_tumbleweed_gnome|openSUSE Tumbleweed (GNOME)]] | * [[linux;distros;opensuse_tumbleweed_gnome|openSUSE Tumbleweed (GNOME)]] |
| |
sudo zypper install 'cpupower' | sudo zypper remove --clean-deps 'tuned' |
| |
===== Check ===== | sudo zypper addlock 'tuned' |
| |
watch --interval '0.5' grep \'cpu MHz\' '/proc/cpuinfo' | sudo zypper install 'cpupower' |
| |
sudo x86_energy_perf_policy | |
| |
===== Max Perf ===== | |
| |
**** | |
| |
sudo x86_energy_perf_policy --all 'performance' --turbo-enable '1' --force | sudo x86_energy_perf_policy --all 'performance' --turbo-enable '1' --force |
===== AC ===== | ===== AC ===== |
| |
sudo mkdir -p '/etc/udev/scripts.d' && sudo -e '/etc/udev/scripts.d/ac-power.sh' && sudo restorecon -F -I '/etc/udev/scripts.d/ac-power.sh' && sudo chmod +x '/etc/udev/scripts.d/ac-power.sh' | sudo mkdir -p '/etc/udev/scripts.d' && sudo -e '/etc/udev/scripts.d/ac-power.sh' && sudo chmod +x '/etc/udev/scripts.d/ac-power.sh' |
| |
<code> | <code> |
#!/bin/bash | #!/bin/bash |
x86_energy_perf_policy --all 'performance' --turbo-enable '1' --force</code> | |
| '/usr/bin/x86_energy_perf_policy' --all 'performance' --turbo-enable '1' --force |
| |
| # End</code> |
| |
===== Battery ===== | ===== Battery ===== |
| |
sudo mkdir -p '/etc/udev/scripts.d' && sudo -e '/etc/udev/scripts.d/battery-power.sh' && sudo restorecon -F -I '/etc/udev/scripts.d/battery-power.sh' && sudo chmod +x '/etc/udev/scripts.d/battery-power.sh' | sudo mkdir -p '/etc/udev/scripts.d' && sudo -e '/etc/udev/scripts.d/battery-power.sh' && sudo chmod +x '/etc/udev/scripts.d/battery-power.sh' |
| |
<code> | <code> |
#!/bin/bash | #!/bin/bash |
x86_energy_perf_policy --all 'balance-power' --turbo-enable '0' --force</code> | |
| '/usr/bin/x86_energy_perf_policy' --all 'balance-power' --turbo-enable '0' --force |
| |
| # End</code> |
| |
===== udev Rule ===== | ===== udev Rule ===== |
| |
sudo -e '/etc/udev/rules.d/99-power.rules' && sudo restorecon -F -I '/etc/udev/rules.d/99-power.rules' && sudo udevadm control --reload | sudo -e '/etc/udev/rules.d/99-power.rules' && sudo udevadm control --reload |
| |
<code> | <code> |
| # AC |
ACTION=="add|change", SUBSYSTEM=="power_supply", ATTRS{type}=="Mains", ATTRS{online}=="1", RUN+="/etc/udev/scripts.d/ac-power.sh" | ACTION=="add|change", SUBSYSTEM=="power_supply", ATTRS{type}=="Mains", ATTRS{online}=="1", RUN+="/etc/udev/scripts.d/ac-power.sh" |
ACTION=="add|change", SUBSYSTEM=="power_supply", ATTRS{type}=="Mains", ATTRS{online}=="0", RUN+="/etc/udev/scripts.d/battery-power.sh"</code> | |
| # Battery |
| ACTION=="add|change", SUBSYSTEM=="power_supply", ATTRS{type}=="Mains", ATTRS{online}=="0", RUN+="/etc/udev/scripts.d/battery-power.sh" |
| |
| # End</code> |
| |
===== Check ===== | ===== Check ===== |