User Tools

Site Tools


linux:notes:x86_energy_perf_policy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:notes:x86_energy_perf_policy [2024/10/29 22:16] – [AC] Sean Rhonelinux:notes:x86_energy_perf_policy [2025/01/21 05:11] (current) Sean Rhone
Line 1: Line 1:
-====== x86_energy_perf_policy ======+====== Information ======
  
-  watch --interval '0.5grep \'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
Line 14: Line 18:
  
   * [[linux:distros:fedora_workstation_gnome|Fedora Workstation]]   * [[linux:distros:fedora_workstation_gnome|Fedora Workstation]]
 +
 +===== TuneD =====
 +
 +  * Automatic power-management like ''tlp''
 +  * Required to remove ''tuned'' so it doesn't override below udev rule
 +
 +  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>
Line 29: Line 42:
 ===== 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>
Line 41: Line 54:
 ===== 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>
Line 54: Line 67:
 ===== 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'
  
C:/www/wiki/data/attic/linux/notes/x86_energy_perf_policy.1730254598.txt.gz · Last modified: by Sean Rhone