Maximum CPU frequency stuck at low value
The problem was identical to that described on this blog - the BIOS was limiting my CPU frequency, or at least suggested that Linux limits it:
# cat /sys/devices/system/cpu/cpu0/cpufreq/bios_limit
2000000
To override that you need to type
# echo 1 > /sys/module/processor/parameters/ignore_ppc
# echo -n 2710000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
# cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
2710000
However, in my case the bios_limit
seems to be on regardless of whether I run on batteries, or AC. Overriding this limitation works as charm.
You may also need to update grub to force Ubuntu to ignore the bios limiting. This can be achieved by:
Opening the grub file:
sudo vim /etc/default/grub
Replace GRUB_CMDLINE_LINUX_DEFAULT line:
- GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
+ GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=disable processor.ignore_ppc=1"
Update grub:
sudo update-grub
Reboot
Don't know much about this side of things, but i think that cpufrequtils lets you do it by using
sudo apt-get install cpufrequtils
sudo cpufreq-set -r -g performance #-r for related (all) the cores
It can be a hardware issue too. If yours laptop is 3+ y.o, the thermal interface on CPU and GPU is dry and doesn't perform as it should.
I had the similar issue with my ThinkPad T520. After trying all recommendations I've found online, I've decided to check cooling system. After notebook disassembly, there were no any visual signs that something is very wrong, but, after the old thermal interface was replaced with fresh thermal greese — it solved the issue! Unit-tests execution on my project speed up from 45 min to 11 min.
One thing which confused me pretty much — when there were obvious big issues with CPU cooling, my laptop wasn't hot or even warm. Also, cooler rotated at standart speed.