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/12/24 23:46] 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 13: Line 17:
 ====== Scripts ====== ====== Scripts ======
  
-  * [[linux:distros:ubuntu|Ubuntu]]+  * [[linux:distros:fedora_workstation_gnome|Fedora Workstation]]
  
-===== GNOME Power Management =====+===== TuneD =====
  
   * Automatic power-management like ''tlp''   * Automatic power-management like ''tlp''
-  * Required to remove so it doesn't override below udev rule+  * Required to remove ''tuned'' so it doesn't override below udev rule
  
-  sudo apt remove power-profiles-daemon gnome-power-manager+  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 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 33: Line 39:
  
 # 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 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 47: Line 51:
  
 # End</code> # End</code>
- 
-  '/etc/udev/scripts.d/battery-power.sh' 
  
 ===== udev Rule ===== ===== udev Rule =====
  
-  * TODO: Specify on main AC ((this sets battery rule with AC in but USB-C hub un-powered)) +  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 -'/etc/udev/rules.d/99-power.rules' && sudo udevadm control --reload+
  
 <code> <code>
 # AC # AC
-ACTION=="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"
  
 # Battery # Battery
-ACTION=="change", SUBSYSTEM=="power_supply", ATTRS{type}=="Battery", ATTRS{status}=="Discharging", 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 67: 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'
C:/www/wiki/data/attic/linux/notes/x86_energy_perf_policy.1735101989.txt.gz · Last modified: by Sean Rhone