1

this is an issue I've been dealing with since I started using this laptop 2 weeks ago.

The Issue

My CPU frequency isn't scaling high enough to deal with load. I'll regularly be on video calls, be loading lot of tabs open in a browser, or working on some other CPU intensive and start to experience a lot of lag. All the cores will be high load (>50% util) but the CPU clock will stay ~1.8 GHz - ~2.5GHz.

For example, I just ran stress --cpu 8 for about 10 minutes and my clock speed held between 1.5 GHz - 2 GHz. I was monitoring the clock speed before I started the test and it was jumping from .9GHz to 3.7GHz without much load. The second I canceled the stress test I watched the frequency jump to 3GHz.

CPU Temp stays ~65C under load.

I'm using Conky to monitor all my CPU cores and CPU clock of core 1.

Hardware/Kernal Details:

  • Make: Thinkpad x1 carbon
  • CPU
$ lshw
...
*-cpu
          product: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
          vendor: Intel Corp.
          physical id: 1
          bus info: cpu@0
          size: 2972MHz
          capacity: 4900MHz
          width: 64 bits
          capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp x86-64 constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d arch_capabilities cpufreq

  • Kernal
$ uname -r
5.6.0-1052-oem

Output from turbostat under load with lag

$ sudo turbostat --Summary --quiet --show Busy%,Bzy_MHz,IRQ,PkgWatt,PkgTmp,RAMWatt,GFXWatt --interval 6

Busy% Bzy_MHz IRQ PkgTmp PkgWatt GFXWatt RAMWatt 55.37 1352 98119 57 10.97 2.37 3.75 53.43 1414 132465 56 11.17 2.36 3.55 49.71 1470 128673 56 11.42 2.45 3.56 50.21 1455 129684 56 11.31 2.43 3.60 41.15 2492 131557 62 20.13 3.82 3.78 39.81 2561 131130 64 20.70 3.85 3.76 41.53 2407 131378 66 19.57 4.31 3.81 41.78 2492 131734 64 20.28 3.91 3.83 41.48 2452 130806 68 19.88 4.14 3.85 47.94 1938 130603 62 16.43 3.46 3.82 68.25 1171 129429 61 10.26 2.19 3.96 64.86 1216 131459 61 10.35 2.21 3.86 56.14 1354 129995 60 10.97 2.35 3.72 54.51 1356 129416 60 10.99 2.40 3.66 63.16 1267 129485 59 10.71 2.33 3.87 58.73 1311 132553 59 10.91 2.38 3.83 61.86 1288 131903 59 10.73 2.27 3.81 55.82 1339 128049 58 10.96 2.42 3.76 62.74 1281 129955 59 10.71 2.32 3.80 57.96 1333 128945 58 10.97 2.41 3.79 61.43 1273 129570 58 10.72 2.38 3.86 62.81 1288 130978 58 10.78 2.32 3.90 62.85 1258 128470 58 10.66 2.34 3.89 55.01 1340 127076 58 10.96 2.41 3.77 57.68 1321 127928 58 10.95 2.44 3.80 57.93 1312 127952 57 10.90 2.41 3.80 54.89 1389 129539 58 11.23 2.45 3.74 60.54 1277 129562 57 10.73 2.35 3.89 61.12 1291 128635 57 10.89 2.37 3.91 60.87 1309 129185 57 10.86 2.33 3.83 58.57 1319 129387 57 10.97 2.40 3.85

Things I've tried

  • apt update && apt upgrade
  • cpupower frequency-set --governor performance

I am considering trying a kernel upgrade but wanted to ask here first.

EDIT 1: adding turbostat output with light load:

$ sudo turbostat --Summary --quiet --show Busy%,Bzy_MHz,IRQ,PkgWatt,PkgTmp,RAMWatt,GFXWatt --interval 6
Busy% Bzy_MHz IRQ PkgTmp PkgWatt GFXWatt RAMWatt
 4.27 4513    15448 61   15.52   0.03    0.81
 4.47 4514     9967 70   15.90   0.02    0.82
 3.23 4573    10277 88   14.04   0.02    0.78
 3.63 4573     9790 95   14.85   0.03    0.79
 2.86 4683     7478 88   14.30   0.03    0.79
 4.80 4469    10917 67   16.06   0.09    0.87
 8.90 4429    20269 59   25.62   0.68    1.61

EDIT 2: The laptop was sitting closed on the desktop driving 2 monitors. It was reworked and is now on a raised stand that allows much better. It also only had 1 external monitor for the lest few days. No throttling issues. Second monitor has now been added again. I will report back if the issue returns:

Busy% Bzy_MHz IRQ PkgTmp PkgWatt GFXWatt RAMWatt
13.33 2847  87808     62   15.33    1.12    2.44
14.58 2830  88613     61   15.60    1.15    2.45
22.07 2252  90592     58   13.34    2.07    2.75
22.01 2229  91650     58   13.24    2.24    2.77
Chart96
  • 161
  • 5
  • While your temperature seems O.K., you might be hitting the power limit. I would toss Conky and watch with this command in a terminal while you do everything else: sudo turbostat --Summary --quiet --show Busy%,Bzy_MHz,IRQ,PkgWatt,PkgTmp,RAMWatt,GFXWatt --interval 6. If you do not have turbostat, I think is is in the linux tools common package, but am not sure. If you do not know your processor power limit, then delete the --quiet stanza and turbostat will tell you. (It is 15 watts by default) – Doug Smythies Mar 29 '21 at 19:12
  • If your issue is indeed power limiting, then based on your temperature readings you have some margin to increase the limit. – Doug Smythies Mar 29 '21 at 19:16
  • I noticed my frequency was petty high right now so here is the output of the command you gave me. I'll respond with the output again when I see it throttling.
    $ sudo turbostat --Summary --quiet --show Busy%,Bzy_MHz,IRQ,PkgWatt,PkgTmp,RAMWatt,GFXWatt --interval 6
    Busy% Bzy_MHz IRQ PkgTmp PkgWatt GFXWatt RAMWatt
    4.27 4513 15448 61 15.52 0.03 0.81
    4.47 4514 9967 70 15.90 0.02 0.82
    3.23 4573 10277 88 14.04 0.02 0.78
    3.63 4573 9790 95 14.85 0.03 0.79
    2.86 4683 7478 88 14.30 0.03 0.79
    4.80 4469 10917 67 16.06 0.09 0.87
    8.90 4429 20269 59 25.62 0.68 1.61
    
    – Chart96 Mar 29 '21 at 20:40
  • Extremely high temperatures for the given load. Package watts seems high for the load also. – Doug Smythies Mar 29 '21 at 20:49
  • which version of turbostat? I think you might need 20.09.30. – Doug Smythies Mar 29 '21 at 20:55
  • Turbostat version 20.03.20, that's what is in apt. – Chart96 Apr 02 '21 at 13:28
  • My laptop was sitting closed on the desktop driving 2 monitors. I reworked my desk setup since I posted this. It is now in a raised stand that allows airflow underneath. I went the last few days with only 1 external monitor as well.

    No throttling issues the last few days. Last night I setup my second monitor again. I will report back if the issue returns.

    Here is another turbostat output with medium utilization.

    Busy% Bzy_MHz IRQ PkgTmp PkgWatt GFXWatt RAMWatt
    13.33 2847 87808 62 15.33 1.12 2.44
    14.58 2830 88613 61 15.60 1.15 2.45
    
    

    PS: not sure why I can't format here

    – Chart96 Apr 02 '21 at 13:33
  • O.K. that makes sense, and your turbostat data looks much more reasonable now. Please edit your question with this stuff in future, as it really isn't readable as a comment. – Doug Smythies Apr 02 '21 at 13:45
  • Hmm, the issue still exists. I added another turbostat output ot the original post while under load with lag. – Chart96 Apr 05 '21 at 19:52
  • I suspect your power budget is being exceeded. Post the spew from when turbostat starts up without the --quiet option. If you are running cpupower, it might be involved, but I do not know for sure because I don't use it. You should be able to also watch various settings during lag events like grep . /sys/devices/system/cpu/intel_pstate/* and grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_m* and maybe some others. – Doug Smythies Apr 06 '21 at 00:17
  • With all due caution, you might be able to increase your power budget a little. I would suggest method 2 from the answer here. Do so at your own risk. By the way, higher CPU load at lower CPU frequencies is actually desirable, and will dissipate less energy. – Doug Smythies Apr 06 '21 at 00:41
  • See this, which seems very similar. Please post the startup spew from turbostat without the --quiet option while the system is throttling. – Doug Smythies Apr 07 '21 at 18:56
  • Please also provide the results for sudo rdmsr 0x64f (MSR_CORE_PERF_LIMIT_REASONS) during throttling, as I don't think turbostat does so. – Doug Smythies Apr 08 '21 at 14:38

1 Answers1

1

Please know that processor energy consumption is highly non-linear in the upper CPU frequency range. My processor (i5-10600K) is similar enough to yours to provide a relevant example. I'll load only 1 CPU with the prime95 highest heat torture test, and sweep the maximum CPU frequency from minimum to maximum gradually over the test time:

doug@s19:~$ sudo /home/doug/temp-k-git/linux/tools/power/x86/turbostat/turbostat --Summary --quiet --show Busy%,Bzy_MHz,IRQ,PkgWatt,PkgTmp,RAMWatt,GFXWatt --interval 15
Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt GFXWatt RAMWatt
8.85    800     22017   35      2.21    0.00    0.89
8.83    890     21963   35      2.31    0.00    0.89
8.77    993     21810   35      2.48    0.00    0.89
8.81    1192    22103   35      2.83    0.00    0.89
8.84    1482    22287   35      3.70    0.00    0.89
8.93    1692    22300   35      4.32    0.00    0.89
8.94    1991    22429   36      5.31    0.00    0.89
9.07    2192    22207   37      6.23    0.00    0.89
9.12    2392    18979   37      6.97    0.00    0.89
9.12    2689    18247   39      8.40    0.00    0.89
9.18    2892    18159   40      9.57    0.00    0.89
9.17    3180    18277   41      11.77   0.00    0.89
9.10    3387    17853   42      13.21   0.00    0.89
9.15    3589    18162   43      15.15   0.00    0.89
9.20    3889    18248   47      19.15   0.00    0.89
9.05    4092    17910   50      22.42   0.00    0.89
9.21    4389    18033   54      28.01   0.00    0.89
9.06    4588    18081   59      33.60   0.00    0.89
9.20    4792    18095   63      39.60   0.00    0.89
9.14    4800    17791   64      39.65   0.00    0.89
9.26    4800    17620   64      40.09   0.00    0.89
9.02    4800    18045   64      40.03   0.00    0.89
9.15    4800    17974   64      40.11   0.00    0.89

Notice even with just one loaded CPU it ended up at 40 watts processor package power at the highest CPU frequency, well above what your processor is capable of. Even the temperature is rather high for a water cooled system. Why? Because of the highly focused heat source. It should be noted, that my radiator cooling fan hasn't even begun to spin up.

Now, lets try again, with 8 CPUs loaded, since that is what you have:

doug@s19:~$ sudo /home/doug/temp-k-git/linux/tools/power/x86/turbostat/turbostat --Summary --quiet --show Busy%,Bzy_MHz,IRQ,PkgWatt,PkgTmp,RAMWatt,GFXWatt --interval 15
Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt GFXWatt RAMWatt
66.63   800     130786  37      7.27    0.00    0.89
66.64   987     131850  37      8.44    0.00    0.89
66.62   1177    130848  37      10.16   0.00    0.89
66.59   1483    130346  39      13.60   0.00    0.89
66.58   1690    129868  39      15.96   0.00    0.89
66.57   1989    129622  41      19.91   0.00    0.89
66.56   2189    130280  41      22.92   0.00    0.89
66.56   2390    130588  42      25.86   0.00    0.89
66.55   2688    129897  44      31.89   0.00    0.89
66.54   2700    130524  44      32.41   0.00    0.89
66.55   2884    129650  46      36.63   0.00    0.89
66.54   3187    130104  48      44.98   0.00    0.89
66.54   3391    130259  50      51.37   0.00    0.89
66.54   3587    131023  52      58.51   0.00    0.89
66.54   3882    130983  57      73.29   0.00    0.89
66.54   4092    129813  60      85.79   0.00    0.89
66.53   4347    129923  66      103.83  0.00    0.89
66.53   4588    129581  73      126.47  0.00    0.89
66.35   4575    129285  73      125.49  0.00    0.89
66.44   4580    129205  73      124.91  0.00    0.89
66.43   4579    129734  74      124.90  0.00    0.89

Notice the huge power steps at high CPU frequency verses low frequency (even though the was frequency was swept manually, the timing was pretty close).

Also notice the default power limit for your processor was at around 1.7 GHz. the prime95 torture test is very brutal, typical use should get more before throttling.

Side Note: the example processor is power limit throttling for the last 3 samples.

Conclusion: Your processor is throttling appropriately to protect itself.

Doug Smythies
  • 15,448
  • 5
  • 44
  • 61