Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xnumad/963fc5b26a8c46f81cd8574b4b679a64 to your computer and use it in GitHub Desktop.
Save xnumad/963fc5b26a8c46f81cd8574b4b679a64 to your computer and use it in GitHub Desktop.
Linux permanently set cpufreq scaling_governor

Problem

/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor contains "powersave" but the file scaling_available_governors in the same folder implies that a performance governor is available. Changing the contents of the first file will not persist reboots. Same applies for all (virtual) cpu cores named cpuX in /sys/devices/system/cpu/.

Solution

  1. Install the package cpufreqd (on Arch Linux via the AUR)

  2. Enable the service to start on boot

sudo systemctl enable cpufreqd OR sudo service cpufreqd enable

  1. Either restart now or start the service manually by replacing "enable" with "start" in the previous command.

  2. Verify if it has worked by looking into the contents of the scaling_governor file. It should now contain "performance".

Revert

If you want to revert all the changes

  1. remove the package cpufreqd

  2. either reboot or manually edit the scaling scaling_governor file for each cpuX folder under the path listed above

Feel free to comment!

@xnumad
Copy link
Author

xnumad commented Jul 10, 2019

Package seems to be abandonned https://aur.archlinux.org/packages/cpufreqd/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment