Last active
September 8, 2020 08:49
-
-
Save xsnpdngv/1bb42e315f42f1b0276a2fb5f53f0ff1 to your computer and use it in GitHub Desktop.
Set CPU governor to powersave on Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| sudo apt-get install cpufrequtils | |
| echo 'GOVERNOR="powersave"' | sudo tee /etc/defaults/cpufrequtils | |
| sudo /etc/init.d/cpufrequtils restart | |
| cpufreq-info |
Error at the path...
Correct: /etc/default/cpufrequtils (default, without 's')
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To add indicator/setter GUI
In order to literally set CPU frequency userspace governor is required which is not available by default.
Your system is using
intel_pstatedriver. There are only two governors available when using this driver:powersaveandperformance.The userspace governor is only available with the older
acpi-cpufreqdriver (which will be automatically used if you disableintel_pstateat boot time; you then set thegovernor/frequencywithcpupower):disable the current driver: add
intel_pstate=disableto your kernel boot lineboot, then load the userspace module:
modprobe cpufreq_userspaceset the governor:
cpupower frequency-set --governor userspaceset the frequency:
cpupower --cpu all frequency-set --freq 800MHzTo temporarily add a boot parameter to a kernel:
Start your system and wait for the GRUB menu to show (if you don't see a GRUB menu, press and hold the left
Shiftkey right after starting the system). Now highlight the kernel you want to use, and press the e key. You should be able to see and edit the commands associated with the highlighted kernel. Go down to the line starting with linux and add your parameter e.g.,intel_pstate=disableto its end.Now press
Ctrl + xorF10to boot.To make this change permanent:
sudo vi /etc/default/grubFind the line starting with
GRUB_CMDLINE_LINUX_DEFAULTand append e.g.,intel_pstate=disableto its end. For example:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=disable"Finally, start a terminal and run:
sudo update-grubto update GRUB's configuration file.
On the next reboot, the kernel should be started with the boot parameter. To permanently remove it, simply remove the parameter from
GRUB_CMDLINE_LINUX_DEFAULTand runsudo update-grubagain.To verify your changes, you can see exactly what parameters your kernel booted with by executing
cat /proc/cmdline.Wiki Page