Ubuntu CPU – Frequency Drops Under Load Without Thermal Issues

cpucpu-frequencyintelUbuntu

This problem is bothering me for some weeks now and I cannot seem to figure out what the real problem might be.

The problem is that the CPU frequency is dropping drastically when under load. By this I mean that the CPU frequency is around 400 MHz when just opening a web browser for example, and when there is no load the frequency is rising back up. (not to a very high one, but still it is not a static behavior). It is really driving me crazy.

Some further information that might help:

Hardware:

Lenovo thinkpad T15:

CPU: Intel I7-10510U

=> Base clock: 1.8GHz

=> Boost clock: 4.9GHz

Software:

Distro: Ubuntu 20.04.1 LTS

Kernel: 5.4.0-52-generic

⇒  cpupower frequency-info
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 400 MHz - 4.90 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 400 MHz and 4.90 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 1.24 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

# command to simulate a stress on the CPU
⇒  stress-ng --cpu 8 --timeout 15s
stress-ng: info:  [43652] dispatching hogs: 8 cpu
stress-ng: info:  [43652] successful run completed in 15.34s

# The result of the stress on the CPU
⇒  sudo turbostat --Summary --quiet  --show Busy%,Bzy_MHz,PkgTmp,PkgWatt,GFXWatt,IRQ --interval 6
Busy%   Bzy_MHz IRQ PkgTmp  PkgWatt GFXWatt
6.58    1862    11418   51  5.00    0.00
7.69    1813    14444   51  4.96    0.00
7.79    1817    16988   51  5.03    0.00
7.99    1724    14679   51  5.00    0.00
9.12    1542    14504   51  4.91    0.00
8.82    1662    13878   51  4.98    0.00
60.61   1060    19508   52  5.84    0.00 # Applied load around here
99.75   460     19984   51  4.59    0.00
98.06   654     21316   51  4.79    0.00
10.26   1181    16730   51  4.25    0.00 # load ended around here
5.90    1782    10315   50  4.74    0.00
6.60    1890    11701   50  5.10    0.00
6.00    1901    10736   50  5.13    0.00
6.74    1981    13477   51  5.23    0.00
7.43    1731    1500    50  4.92    0.00

⇒  cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 4294.55 ms.
  hardware limits: 400 MHz - 4.90 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 400 MHz and 4.90 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.26 GHz.
analyzing CPU 1:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 4294.55 ms.
  hardware limits: 400 MHz - 4.90 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 400 MHz and 4.90 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.48 GHz.
analyzing CPU 2:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 2
  CPUs which need to have their frequency coordinated by software: 2
  maximum transition latency: 4294.55 ms.
  hardware limits: 400 MHz - 4.90 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 400 MHz and 4.90 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 982 MHz.
analyzing CPU 3:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 3
  CPUs which need to have their frequency coordinated by software: 3
  maximum transition latency: 4294.55 ms.
  hardware limits: 400 MHz - 4.90 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 400 MHz and 4.90 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 983 MHz.
analyzing CPU 4:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 4
  CPUs which need to have their frequency coordinated by software: 4
  maximum transition latency: 4294.55 ms.
  hardware limits: 400 MHz - 4.90 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 400 MHz and 4.90 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.06 GHz.
analyzing CPU 5:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 5
  CPUs which need to have their frequency coordinated by software: 5
  maximum transition latency: 4294.55 ms.
  hardware limits: 400 MHz - 4.90 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 400 MHz and 4.90 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 872 MHz.
analyzing CPU 6:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 6
  CPUs which need to have their frequency coordinated by software: 6
  maximum transition latency: 4294.55 ms.
  hardware limits: 400 MHz - 4.90 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 400 MHz and 4.90 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 926 MHz.
analyzing CPU 7:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 7
  CPUs which need to have their frequency coordinated by software: 7
  maximum transition latency: 4294.55 ms.
  hardware limits: 400 MHz - 4.90 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 400 MHz and 4.90 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 850 MHz.

Things I've tried so far:

  • setting power governor to performance
  • setting the intel pstate driver frequency limits
  • using cpupower to set the frequency limits (Does this the same as changing the intel pstate driver values directly?)
  • Reinstalling ubuntu 20.04, had the same issue upon a clean install.

I was able once to get my system up and running like it should be: After rebooting from windows, the CPU went right up to the max CPU limit when running a fake load onto the system and kept working for the rest of the day. The system thermal throttled as expected, but never dropped below the 2 GHz as far as I could tell. However after rebooting the issue reappeared… I wasn't able to reproduce this behavior afterwards either…

If it was not clear already: the question is how to solve this so that I can use the full potential of my laptop and not wait every time I load a new window or open a new browser tab?

Thanks in advance!

EDIT:

  • add reinstall to things I tried

Best Answer

Probably your embedded controller is set to a conservative thermal setting. Note that these settings are persistent on the mainboard and not the hard disk. So if you are playing with Lenovos tools under windows, putting your notebook in a kind of "power economic & quiet" profile and then boot up ubuntu, the setting is still active.

To change this under Ubuntu, you need the right kernel module (in my case it's dell-smbios) and the smbios-thermal-ctl package to do something like this:

sudo smbios-thermal-ctl -i

 Print all the Available Thermal Information of your system: 
-------------------------------------------------------------------
Supported Thermal Modes: 
     Balanced
     Cool Bottom
     Quiet
     Performance

and then activate a more permissive profile, in my case (Dell) the best of both worlds seems to be Balanced.

sudo smbios-thermal-ctl --set-thermal-mode=Balanced

Another tool I can recommend is s-tui to diagnose such behavior.

Related Question