Both sides previous revisionPrevious revisionNext revision | Previous revision |
linux:notes:x86_energy_perf_policy [2024/11/13 18:21] – [TuneD] Sean Rhone | linux:notes:x86_energy_perf_policy [2025/01/21 05:11] (current) – Sean Rhone |
---|
====== x86_energy_perf_policy ====== | ====== Information ====== |
| |
watch --interval '0.5' grep \'cpu MHz\' '/proc/cpuinfo' | * ''x86_energy_perf_policy'' |
| |
* Check | ===== Check ===== |
| |
| watch --interval '0.5' grep \'cpu MHz\' '/proc/cpuinfo' |
| |
sudo x86_energy_perf_policy | sudo x86_energy_perf_policy |
| |
* Max Performance | ===== Max Perf ===== |
| |
| **** |
| |
sudo x86_energy_perf_policy --all 'performance' --turbo-enable '1' --force | sudo x86_energy_perf_policy --all 'performance' --turbo-enable '1' --force |
| |
sudo dnf remove 'tuned' | sudo dnf remove 'tuned' |
| |
| sudo dnf install 'kernel-tools' |
| |
===== AC ===== | ===== AC ===== |
| |
sudo mkdir -p '/etc/udev/scripts.d' && sudo -e '/etc/udev/scripts.d/ac-power.sh' && sudo restorecon -F -I -v '/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 restorecon -F -I '/etc/udev/scripts.d/ac-power.sh' && sudo chmod +x '/etc/udev/scripts.d/ac-power.sh' |
| |
<code> | <code> |
| |
# End</code> | # End</code> |
| |
'/etc/udev/scripts.d/ac-power.sh' | |
| |
===== Battery ===== | ===== Battery ===== |
| |
sudo mkdir -p '/etc/udev/scripts.d' && sudo -e '/etc/udev/scripts.d/battery-power.sh' && sudo restorecon -F -I -v '/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 restorecon -F -I '/etc/udev/scripts.d/battery-power.sh' && sudo chmod +x '/etc/udev/scripts.d/battery-power.sh' |
| |
<code> | <code> |
| |
# End</code> | # End</code> |
| |
'/etc/udev/scripts.d/battery-power.sh' | |
| |
===== udev Rule ===== | ===== udev Rule ===== |
| |
sudo -e '/etc/udev/rules.d/99-power.rules' && sudo restorecon -F -I -v '/etc/udev/rules.d/99-power.rules' && sudo udevadm control --reload | sudo -e '/etc/udev/rules.d/99-power.rules' && sudo restorecon -F -I '/etc/udev/rules.d/99-power.rules' && sudo udevadm control --reload |
| |
<code> | <code> |
# AC | # AC |
SUBSYSTEM=="power_supply", ATTR{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" |
| |
# Battery | # Battery |
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/etc/udev/scripts.d/battery-power.sh" | ACTION=="add|change", SUBSYSTEM=="power_supply", ATTRS{type}=="Mains", ATTRS{online}=="0", RUN+="/etc/udev/scripts.d/battery-power.sh" |
| |
# End</code> | # End</code> |
===== Check ===== | ===== Check ===== |
| |
* If plugged-in, should report something like ''Write to unrecognized MSR 0x770 by x86_energy_perf'' 1-second/early boot | * Should report something like ''Write to unrecognized MSR 0x770 by x86_energy_perf'' early boot and on AC hot-plug |
| |
sudo dmesg | grep 'MSR' | sudo dmesg | grep 'MSR' |
| |
| watch --interval '0.5' grep \'cpu MHz\' '/proc/cpuinfo' |
| |