I'm new to Ubuntu and want to disable the turbo boost. I tried with cpufreq
but i cant get it to work. is there any other way to do it.
In windows it was as easy as changing the CPU speed from 100 to 99.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityIf your system is using the intel_pstate frequency scaling driver:
$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver
intel_pstate
intel_pstate
intel_pstate
intel_pstate
intel_pstate
intel_pstate
intel_pstate
intel_pstate
Then you can inquire as to the turbo enabled or disabled status:
$ cat /sys/devices/system/cpu/intel_pstate/no_turbo
0
Where 0 means turbo is enabled and 1 means it is disabled. And you can change it by writting (as sudo) to the same location.
$ echo "1" | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo
1
I never remember the location or how to do the `tee' thing properly, so I prefer scripts to be run as sudo:
$ cat set_cpu_turbo_off
#! /bin/bash
echo "1" > /sys/devices/system/cpu/intel_pstate/no_turbo
$ cat set_cpu_turbo_on
#! /bin/bash
echo "0" > /sys/devices/system/cpu/intel_pstate/no_turbo
sudo echo "0" | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo
Nov 22, 2016 at 17:13
set_cpu_turbo_off
script to run during startup.
Jan 15, 2017 at 14:50
sudo echo "1" | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo 1 tee: /sys/devices/system/cpu/intel_pstate/no_turbo: Operation not permitted
sudo wrmsr --all 0x1a0 0x4000850089
does the trick.
To read the current state of the Turbo Boost, we need to install the msr-tools
sudo apt-get install msr-tools
To know if the Turbo Boost feature is disabled, run:
rdmsr -pi 0x1a0 -f 38:38
1=disabled
0=enabled
Replace i with your cores number
NOte: If you get the following error:
rdmsr:open: No such file or directory
then load the “msr” module by the following command:
sudo modprobe msr
To disable the Turbo Boost feature, one can set the entire 0x1a0 MSR register to 0x4000850089, as in here:
wrmsr -pC 0x1a0 0x4000850089
Where C refers to a particular core number
ou can get those number by running
cat /proc/cpuinfo | grep processor
then once you know your numbers you have to run the command above for each core. in your case numbers would be 0 & 1 so you have to do
wrmsr -p0 0x1a0 0x4000850089
wrmsr -p1 0x1a0 0x4000850089
From http://notepad2.blogspot.com/2014/11/a-script-to-turn-off-intel-cpu-turbo.html
A script to disable/enable turbo boost
The following script can be used to turn off/on turbo boost:
#!/bin/bash
if [[ -z $(which rdmsr) ]]; then
echo "msr-tools is not installed. Run 'sudo apt-get install msr-tools' to install it." >&2
exit 1
fi
if [[ ! -z $1 && $1 != "enable" && $1 != "disable" ]]; then
echo "Invalid argument: $1" >&2
echo ""
echo "Usage: $(basename $0) [disable|enable]"
exit 1
fi
cores=$(cat /proc/cpuinfo | grep processor | awk '{print $3}')
for core in $cores; do
if [[ $1 == "disable" ]]; then
sudo wrmsr -p${core} 0x1a0 0x4000850089
fi
if [[ $1 == "enable" ]]; then
sudo wrmsr -p${core} 0x1a0 0x850089
fi
state=$(sudo rdmsr -p${core} 0x1a0 -f 38:38)
if [[ $state -eq 1 ]]; then
echo "core ${core}: disabled"
else
echo "core ${core}: enabled"
fi
done
save this to a file called turbo-boost.sh
Usage: You can copy the above script and save it into a file named turbo-boost then set it to be executable:
sudo chmod +x turbo-boost.sh
you can then use it to disable/enable turbo boost:
./turbo-boost.sh disable
./turbo-boost.sh enable
$ rdmsr -pi 0x1a0 -f 38:38
gives me just a list of options to use with the command. e.g.: Usage: rdmsr [options] regno --help -h Print this help --version -V Print current version ....
Is the above syntax outdated/ not applicable in a general way?
Dec 19, 2019 at 9:58
wrmsr: open: No such file or directory rdmsr: open: No such file or directory core 0: enabled wrmsr: open: No such file or directory rdmsr: open: No such file or directory core 1: enabled
Mar 31, 2020 at 18:54
You can try setting /sys/devices/system/cpu/cpufreq/boost
value to 0.
echo "0" | sudo tee /sys/devices/system/cpu/cpufreq/boost
In my case this works:
echo "0" | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo
cpupower
.