1

This is basically a followup to CPU frquency scaling broken on upgrade from Ubuntu 20.04->20.10 (Intel CPU)

However, I'm not allowed to comment, and it was suggested to write a new question instead. Please read the original question for additional information from the other poster.

I'm experiencing the exact same issue after upgrading from kubuntu 20.10 to kubuntu 21.04: a completely different cpu frequency scaling behavior with the the CPU frequency often getting stuck at 400 MHz.

With kubuntu 20.10 my newly bought AsusVivoBook S14 S435 with i7-1165G7 was blazing fast. Upon demand frequencies would scale up to >4 GHz, then slowly stabilize at >2.8 GHz when using all 4 cores (=8 CPUs) at 100%, while the fan speed increases considerably. CPU core and "Composite" temperatures are around 90°C.

With kubuntu 21.04 only scales up to around 4 GHz for a very little time, then drops down to around 1 GHz and often even to 400 MHz while temperatures remain <60°C and the CPU fan remains at low RPMs. Sometimes the throttling goes on for a few seconds, sometimes it seems completely stuck at 400 MHz for minutes and longer (I usually just reboot when it gets stuck).

In both cases intel_pstate seems active with two governors to choose from (powersafe and performance), but when the frequency is stuck at low values it doesn't matter which one is active or what frequency I manually set.

I thought it must be a difference in kernel: 5.8 on kubuntu 20.10 and 5.11 on kubuntu 21.04. However, that's not the case: I've tried kernels 5.8 / 5.10 / 5.11 and 5.12 with kubuntu 21.04 and the behavior doesn't change.

I've temporarily fixed the fan to maximum RPMs to see if it changes anything. Temperatures were even lower, but throttling to 400 MHz continued.

I've also excluded that it might be a glitch in the BIOS: just about the time when I've upgraded to 21.04, I've also upgraded the BIOS from 3.01 to 3.02. Even after downgrading to 3.01 the behavior remained the same.

Finally I've started kubuntu 20.10 from an external hard drive to exclude any actual hardware issues -- and my computer was blazing fast again.

I've now re-installed kubuntu 20.10 and am happy. But at some point I'll have to upgrade since support for 20.10 will run out in a couple of months. But without knowing what is causing the throttling of the CPU that's not really an option.

Does anyone have any idea what can cause the throttling even though all relevant temperatures are low?

-------------------- EDIT ------------------

Doug Smythies requested to post turbostat information when the throttling occurs.

I have taken three sets of readings:

  1. With 20.10
  2. With 21.04 before throttling has occurred
  3. With 21.04 while throttling to 400 MHz was active

Differences between 1+2 (20.10 --> 21.04)

cpu0: MSR_PKG_POWER_LIMIT: 0x4381e0001f81e0 (UNlocked)
cpu0: PKG Limit #1: ENabled (60.000000 Watts, 32.000000 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (60.000000 Watts, 0.002441* sec, clamp ENabled)
Core    CPU Avg_MHz Busy%   Bzy_MHz TSC_MHz IRQ SMI POLL    C1_ACPI C2_ACPI C3_ACPI POLL%   C1_ACPI%    C2_ACPI%    C3_ACPI%    CPU%c1  CPU%c6  CPU%c7  CoreTmp PkgTmp  GFX%rc6 GFXMHz  Totl%C0 Any%C0  GFX%C0  CPUGFX% Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 CPU%LPI SYS%LPI PkgWatt CorWatt GFXWatt RAMWatt PKG_%   RAM_%
-   -   235 12.63   1857    2803    13152   0   6   18360   13073   6431    0.00    21.96   37.80   27.82   45.14   0.00    42.23   44  46  58.47   400 93.76   53.92   41.08   20.86   3.44    4.42    0.00    0.00    0.00    0.00    0.00    0.00    0.00    8.84    3.39    0.58    0.00    0.00    0.00
-->
cpu0: MSR_PKG_POWER_LIMIT: 0x4381e0001f80e0 (UNlocked)
cpu0: PKG Limit #1: ENabled (28.000000 Watts, 32.000000 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (60.000000 Watts, 0.002441* sec, clamp ENabled)
Core    CPU Avg_MHz Busy%   Bzy_MHz TSC_MHz IRQ SMI POLL    C1ACPI  C2ACPI  C3ACPI  POLL%   C1ACPI% C2ACPI% C3ACPI% CPU%c1  CPU%c6  CPU%c7  CoreTmp PkgTmp  GFX%rc6 GFXMHz  GFXAMHz Totl%C0 Any%C0  GFX%C0  CPUGFX% Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 CPU%LPI SYS%LPI PkgWatt CorWatt GFXWatt RAMWatt PKG_%   RAM_%
-   -   12  0.91    1300    2803    1195    0   0   209 507 1134    0.00    0.64    4.86    93.60   2.50    0.00    96.59   28  30  99.28   450 100 7.70    5.55    0.68    0.38    90.22   0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    4.00    0.26    0.14    0.00    0.00    0.00

Differences between 2+3 (21.04 (normal) --> 21.04 (throttled to 400 MHz))

cpu0: MSR_PKG_POWER_LIMIT: 0x4381e0001f80e0 (UNlocked)
cpu0: PKG Limit #1: ENabled (28.000000 Watts, 32.000000 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (60.000000 Watts, 0.002441* sec, clamp ENabled)
Core    CPU Avg_MHz Busy%   Bzy_MHz TSC_MHz IRQ SMI POLL    C1ACPI  C2ACPI  C3ACPI  POLL%   C1ACPI% C2ACPI% C3ACPI% CPU%c1  CPU%c6  CPU%c7  CoreTmp PkgTmp  GFX%rc6 GFXMHz  GFXAMHz Totl%C0 Any%C0  GFX%C0  CPUGFX% Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 CPU%LPI SYS%LPI PkgWatt CorWatt GFXWatt RAMWatt PKG_%   RAM_%
-   -   12  0.91    1300    2803    1195    0   0   209 507 1134    0.00    0.64    4.86    93.60   2.50    0.00    96.59   28  30  99.28   450 100 7.70    5.55    0.68    0.38    90.22   0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    4.00    0.26    0.14    0.00    0.00    0.00
-->
cpu0: MSR_PKG_POWER_LIMIT: 0x4381e000dd802f (UNlocked)
cpu0: PKG Limit #1: ENabled (5.875000 Watts, 28.000000 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (60.000000 Watts, 0.002441* sec, clamp ENabled)
Core    CPU Avg_MHz Busy%   Bzy_MHz TSC_MHz IRQ SMI POLL    C1ACPI  C2ACPI  C3ACPI  POLL%   C1ACPI% C2ACPI% C3ACPI% CPU%c1  CPU%c6  CPU%c7  CoreTmp PkgTmp  GFX%rc6 GFXMHz  GFXAMHz Totl%C0 Any%C0  GFX%C0  CPUGFX% Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 CPU%LPI SYS%LPI PkgWatt CorWatt GFXWatt RAMWatt PKG_%   RAM_%
-   -   399 99.77   400 2805    17154   0   0   0   0   0   0.00    0.00    0.00    0.00    0.23    0.00    0.00    38  40  86.78   100 100 400.80  100.20  13.29   13.29   0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    5.73    1.71    0.11    0.00    100.16  0.00

I've also printed read out all the settings in /var/sys/devices/cpu/ and compared them. From /sys/devices/system/cpu/cpu7/thermal_throttle/package_throttle_total_time_ms = 104652 it's confirmed that some kind of thermal throttling is going on that's different under 20.10.

  1. turbostat_2010.txt
turbostat version 20.03.20 - Len Brown <lenb@kernel.org>
CPUID(0): GenuineIntel 0x1b CPUID levels; 0x80000008 xlevels; family:model:stepping 0x6:8c:1 (6:140:1)
CPUID(1): SSE3 MONITOR - EIST TM2 TSC MSR ACPI-TM HT TM
CPUID(6): APERF, TURBO, DTS, PTM, HWP, HWPnotify, HWPwindow, HWPepp, HWPpkg, EPB
cpu0: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT PREFETCH TURBO)
CPUID(7): No-SGX
CPUID(0x15): eax_crystal: 2 ebx_tsc: 146 ecx_crystal_hz: 38400000
TSC: 2803 MHz (38400000 Hz * 146 / 2 / 1000000)
CPUID(0x16): base_mhz: 2800 max_mhz: 4700 bus_mhz: 100
cpu0: MSR_MISC_PWR_MGMT: 0x00401cc0 (ENable-EIST_Coordination DISable-EPB DISable-OOB)
RAPL: 9362 sec. Joule Counter Range, at 28 Watts
cpu0: MSR_PLATFORM_INFO: 0x4043df0811c00
4 * 100.0 = 400.0 MHz max efficiency frequency
28 * 100.0 = 2800.0 MHz base frequency
cpu0: MSR_IA32_POWER_CTL: 0x0024005b (C1E auto-promotion: ENabled)
cpu0: MSR_TURBO_RATIO_LIMIT: 0x2929292929292f2f
41 * 100.0 = 4100.0 MHz max turbo 8 active cores
41 * 100.0 = 4100.0 MHz max turbo 7 active cores
41 * 100.0 = 4100.0 MHz max turbo 6 active cores
41 * 100.0 = 4100.0 MHz max turbo 5 active cores
41 * 100.0 = 4100.0 MHz max turbo 4 active cores
41 * 100.0 = 4100.0 MHz max turbo 3 active cores
47 * 100.0 = 4700.0 MHz max turbo 2 active cores
47 * 100.0 = 4700.0 MHz max turbo 1 active cores
cpu0: MSR_CONFIG_TDP_NOMINAL: 0x0000001c (base_ratio=28)
cpu0: MSR_CONFIG_TDP_LEVEL_1: 0x000c0060 (PKG_MIN_PWR_LVL1=0 PKG_MAX_PWR_LVL1=0 LVL1_RATIO=12 PKG_TDP_LVL1=96)
cpu0: MSR_CONFIG_TDP_LEVEL_2: 0x00110078 (PKG_MIN_PWR_LVL2=0 PKG_MAX_PWR_LVL2=0 LVL2_RATIO=17 PKG_TDP_LVL2=120)
cpu0: MSR_CONFIG_TDP_CONTROL: 0x00000000 ( lock=0)
cpu0: MSR_TURBO_ACTIVATION_RATIO: 0x0000001b (MAX_NON_TURBO_RATIO=27 lock=0)
cpu0: MSR_PKG_CST_CONFIG_CONTROL: 0x74008008 (UNdemote-C1, demote-C1, locked, pkg-cstate-limit=8 (unlimited))
current_driver: intel_idle
current_governor: menu
current_governor_ro: menu
cpu0: POLL: CPUIDLE CORE POLL IDLE
cpu0: C1_ACPI: ACPI FFH MWAIT 0x0
cpu0: C2_ACPI: ACPI FFH MWAIT 0x31
cpu0: C3_ACPI: ACPI FFH MWAIT 0x60
cpu0: cpufreq driver: intel_pstate
cpu0: cpufreq governor: powersave
cpufreq intel_pstate no_turbo: 0
cpu0: MSR_MISC_FEATURE_CONTROL: 0x00000000 (L2-Prefetch L2-Prefetch-pair L1-Prefetch L1-IP-Prefetch)
cpu0: MSR_PM_ENABLE: 0x00000001 (HWP)
cpu0: MSR_HWP_CAPABILITIES: 0x010d1c2f (high 47 guar 28 eff 13 low 1)
cpu0: MSR_HWP_REQUEST: 0x80002f04 (min 4 max 47 des 0 epp 0x80 window 0x0 pkg 0x0)
cpu0: MSR_HWP_REQUEST_PKG: 0x8000ff01 (min 1 max 255 des 0 epp 0x80 window 0x0)
cpu0: MSR_HWP_INTERRUPT: 0x00000000 (Dis_Guaranteed_Perf_Change, Dis_Excursion_Min)
cpu0: MSR_HWP_STATUS: 0x00000004 (No-Guaranteed_Perf_Change, No-Excursion_Min)
cpu0: MSR_IA32_ENERGY_PERF_BIAS: 0x00000006 (balanced)
cpu0: MSR_RAPL_POWER_UNIT: 0x000a0e03 (0.125000 Watts, 0.000061 Joules, 0.000977 sec.)
cpu0: MSR_PKG_POWER_INFO: 0x000000e0 (28 W TDP, RAPL 0 - 0 W, 0.000000 sec.)
cpu0: MSR_PKG_POWER_LIMIT: 0x4381e0001f81e0 (UNlocked)
cpu0: PKG Limit #1: ENabled (60.000000 Watts, 32.000000 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (60.000000 Watts, 0.002441* sec, clamp ENabled)
cpu0: MSR_DRAM_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: DRAM Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_PP0_POLICY: 0
cpu0: MSR_PP0_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: Cores Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_PP1_POLICY: 0
cpu0: MSR_PP1_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: GFX Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_IA32_TEMPERATURE_TARGET: 0x08640000 (100 C)
cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x88340808 (48 C)
cpu0: MSR_IA32_PACKAGE_THERM_INTERRUPT: 0x00000003 (100 C, 100 C)
cpu0: MSR_PKGC3_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu0: MSR_PKGC6_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu0: MSR_PKGC7_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu0: MSR_PKGC8_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu0: MSR_PKGC9_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu0: MSR_PKGC10_IRTL: 0x00000000 (NOTvalid, 0 ns)
Core    CPU Avg_MHz Busy%   Bzy_MHz TSC_MHz IRQ SMI POLL    C1_ACPI C2_ACPI C3_ACPI POLL%   C1_ACPI%    C2_ACPI%    C3_ACPI%    CPU%c1  CPU%c6  CPU%c7  CoreTmp PkgTmp  GFX%rc6 GFXMHz  Totl%C0 Any%C0  GFX%C0  CPUGFX% Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 CPU%LPI SYS%LPI PkgWatt CorWatt GFXWatt RAMWatt PKG_%   RAM_%
-   -   235 12.63   1857    2803    13152   0   6   18360   13073   6431    0.00    21.96   37.80   27.82   45.14   0.00    42.23   44  46  58.47   400 93.76   53.92   41.08   20.86   3.44    4.42    0.00    0.00    0.00    0.00    0.00    0.00    0.00    8.84    3.39    0.58    0.00    0.00    0.00
0   0   217 11.49   1887    2803    1262    0   0   2159    1573    807 0.00    20.51   38.33   29.90   45.59   0.00    42.93   44  46  58.48   400 93.76   53.92   41.09   20.86   3.44    4.42    0.00    0.00    0.00    0.00    0.00    0.00    0.00    8.84    3.40    0.58    0.00    0.00    0.00
0   4   238 13.10   1813    2803    1417    0   1   2387    1846    436 0.00    24.20   46.22   16.69   43.97
1   1   237 12.87   1845    2803    1096    0   1   2019    1520    855 0.00    19.06   34.97   33.32   43.20   0.00    43.93   44
1   5   225 12.33   1825    2803    1525    0   1   2373    1658    946 0.00    21.47   37.60   28.83   43.74
2   2   220 12.15   1813    2803    1405    0   0   2009    1578    1118    0.00    18.78   32.37   36.94   52.68   0.00    35.17   44
2   6   262 14.40   1820    2803    4007    0   1   3733    1861    410 0.00    34.54   42.29   9.03    50.44
3   3   234 12.27   1907    2803    1112    0   1   1943    1435    780 0.00    21.01   35.18   31.75   40.83   0.00    46.90   44
3   7   244 12.44   1959    2803    1328    0   1   1737    1602    1079    0.00    16.17   35.47   36.14   40.67
  1. turbostat_2104_normal.txt
turbostat version 20.09.30 - Len Brown <lenb@kernel.org>
CPUID(0): GenuineIntel 0x1b CPUID levels; 0x80000008 xlevels; family:model:stepping 0x6:8c:1 (6:140:1)
CPUID(1): SSE3 MONITOR - EIST TM2 TSC MSR ACPI-TM HT TM
CPUID(6): APERF, TURBO, DTS, PTM, HWP, HWPnotify, HWPwindow, HWPepp, HWPpkg, EPB
cpu1: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT PREFETCH TURBO)
CPUID(7): No-SGX
CPUID(0x15): eax_crystal: 2 ebx_tsc: 146 ecx_crystal_hz: 38400000
TSC: 2803 MHz (38400000 Hz * 146 / 2 / 1000000)
CPUID(0x16): base_mhz: 2800 max_mhz: 4700 bus_mhz: 100
cpu1: MSR_MISC_PWR_MGMT: 0x00401cc0 (ENable-EIST_Coordination DISable-EPB DISable-OOB)
RAPL: 9362 sec. Joule Counter Range, at 28 Watts
cpu1: MSR_PLATFORM_INFO: 0x4043df0811c00
4 * 100.0 = 400.0 MHz max efficiency frequency
28 * 100.0 = 2800.0 MHz base frequency
cpu1: MSR_IA32_POWER_CTL: 0x0024005b (C1E auto-promotion: ENabled)
cpu1: MSR_TURBO_RATIO_LIMIT: 0x2929292929292f2f
41 * 100.0 = 4100.0 MHz max turbo 8 active cores
41 * 100.0 = 4100.0 MHz max turbo 7 active cores
41 * 100.0 = 4100.0 MHz max turbo 6 active cores
41 * 100.0 = 4100.0 MHz max turbo 5 active cores
41 * 100.0 = 4100.0 MHz max turbo 4 active cores
41 * 100.0 = 4100.0 MHz max turbo 3 active cores
47 * 100.0 = 4700.0 MHz max turbo 2 active cores
47 * 100.0 = 4700.0 MHz max turbo 1 active cores
cpu1: MSR_CONFIG_TDP_NOMINAL: 0x0000001c (base_ratio=28)
cpu1: MSR_CONFIG_TDP_LEVEL_1: 0x000c0060 (PKG_MIN_PWR_LVL1=0 PKG_MAX_PWR_LVL1=0 LVL1_RATIO=12 PKG_TDP_LVL1=96)
cpu1: MSR_CONFIG_TDP_LEVEL_2: 0x00110078 (PKG_MIN_PWR_LVL2=0 PKG_MAX_PWR_LVL2=0 LVL2_RATIO=17 PKG_TDP_LVL2=120)
cpu1: MSR_CONFIG_TDP_CONTROL: 0x00000000 ( lock=0)
cpu1: MSR_TURBO_ACTIVATION_RATIO: 0x0000001b (MAX_NON_TURBO_RATIO=27 lock=0)
cpu1: MSR_PKG_CST_CONFIG_CONTROL: 0x74008008 (UNdemote-C1, demote-C1, locked, pkg-cstate-limit=8 (unlimited))
/dev/cpu_dma_latency: 2000000000 usec (default)
current_driver: intel_idle
current_governor: menu
current_governor_ro: menu
cpu1: POLL: CPUIDLE CORE POLL IDLE
cpu1: C1ACPI: ACPI FFH MWAIT 0x0
cpu1: C2ACPI: ACPI FFH MWAIT 0x31
cpu1: C3ACPI: ACPI FFH MWAIT 0x60
cpu1: cpufreq driver: intel_pstate
cpu1: cpufreq governor: powersave
cpufreq intel_pstate no_turbo: 0
cpu1: MSR_MISC_FEATURE_CONTROL: 0x00000000 (L2-Prefetch L2-Prefetch-pair L1-Prefetch L1-IP-Prefetch)
cpu0: MSR_PM_ENABLE: 0x00000001 (HWP)
cpu0: MSR_HWP_CAPABILITIES: 0x010d1c2f (high 47 guar 28 eff 13 low 1)
cpu0: MSR_HWP_REQUEST: 0x80002f04 (min 4 max 47 des 0 epp 0x80 window 0x0 pkg 0x0)
cpu0: MSR_HWP_REQUEST_PKG: 0x8000ff01 (min 1 max 255 des 0 epp 0x80 window 0x0)
cpu0: MSR_HWP_INTERRUPT: 0x00000000 (Dis_Guaranteed_Perf_Change, Dis_Excursion_Min)
cpu0: MSR_HWP_STATUS: 0x00000004 (No-Guaranteed_Perf_Change, No-Excursion_Min)
cpu0: EPB: 6 (balanced)
cpu0: MSR_RAPL_POWER_UNIT: 0x000a0e03 (0.125000 Watts, 0.000061 Joules, 0.000977 sec.)
cpu0: MSR_PKG_POWER_INFO: 0x000000e0 (28 W TDP, RAPL 0 - 0 W, 0.000000 sec.)
cpu0: MSR_PKG_POWER_LIMIT: 0x4381e0001f80e0 (UNlocked)
cpu0: PKG Limit #1: ENabled (28.000000 Watts, 32.000000 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (60.000000 Watts, 0.002441* sec, clamp ENabled)
cpu0: MSR_DRAM_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: DRAM Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_PP0_POLICY: 0
cpu0: MSR_PP0_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: Cores Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_PP1_POLICY: 0
cpu0: MSR_PP1_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: GFX Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu1: MSR_IA32_TEMPERATURE_TARGET: 0x08640000 (92 C) (100 default - 8 offset)
cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x883e0800 (30 C)
cpu0: MSR_IA32_PACKAGE_THERM_INTERRUPT: 0x00000003 (92 C, 92 C)
cpu1: MSR_PKGC3_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC6_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC7_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC8_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC9_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu1: MSR_PKGC10_IRTL: 0x00000000 (NOTvalid, 0 ns)
Core    CPU Avg_MHz Busy%   Bzy_MHz TSC_MHz IRQ SMI POLL    C1ACPI  C2ACPI  C3ACPI  POLL%   C1ACPI% C2ACPI% C3ACPI% CPU%c1  CPU%c6  CPU%c7  CoreTmp PkgTmp  GFX%rc6 GFXMHz  GFXAMHz Totl%C0 Any%C0  GFX%C0  CPUGFX% Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 CPU%LPI SYS%LPI PkgWatt CorWatt GFXWatt RAMWatt PKG_%   RAM_%
-   -   12  0.91    1300    2803    1195    0   0   209 507 1134    0.00    0.64    4.86    93.60   2.50    0.00    96.59   28  30  99.28   450 100 7.70    5.55    0.68    0.38    90.22   0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    4.00    0.26    0.14    0.00    0.00    0.00
0   0   12  0.92    1260    2803    117 0   0   27  74  175 0.00    0.41    5.34    93.35   2.70    0.00    96.38   27  30  99.28   450 100 7.70    5.55    0.68    0.38    90.22   0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    4.00    0.26    0.14    0.00    0.00    0.00
0   4   16  1.29    1245    2803    125 0   0   26  73  148 0.00    0.84    5.18    92.71   2.32
1   1   10  0.86    1210    2803    127 0   0   41  56  92  0.00    1.46    5.82    91.88   3.71    0.00    95.44   26
1   5   12  0.97    1233    2803    267 0   0   40  62  259 0.00    0.78    3.69    94.59   3.59
2   2   4   0.29    1270    2803    59  0   0   25  55  104 0.00    0.48    3.40    95.84   2.07    0.00    97.64   27
2   6   10  0.84    1242    2803    307 0   0   21  100 134 0.00    0.33    7.95    90.89   1.52
3   3   23  1.55    1511    2803    93  0   0   13  32  112 0.00    0.58    2.65    95.22   1.55    0.00    96.90   28
3   7   7   0.55    1270    2803    100 0   0   16  55  110 0.00    0.23    4.88    94.34   2.55
  1. turbostat_2104_400.txt
turbostat version 20.09.30 - Len Brown <lenb@kernel.org>
CPUID(0): GenuineIntel 0x1b CPUID levels; 0x80000008 xlevels; family:model:stepping 0x6:8c:1 (6:140:1)
CPUID(1): SSE3 MONITOR - EIST TM2 TSC MSR ACPI-TM HT TM
CPUID(6): APERF, TURBO, DTS, PTM, HWP, HWPnotify, HWPwindow, HWPepp, HWPpkg, EPB
cpu0: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT PREFETCH TURBO)
CPUID(7): No-SGX
CPUID(0x15): eax_crystal: 2 ebx_tsc: 146 ecx_crystal_hz: 38400000
TSC: 2803 MHz (38400000 Hz * 146 / 2 / 1000000)
CPUID(0x16): base_mhz: 2800 max_mhz: 4700 bus_mhz: 100
cpu0: MSR_MISC_PWR_MGMT: 0x00401cc0 (ENable-EIST_Coordination DISable-EPB DISable-OOB)
RAPL: 9362 sec. Joule Counter Range, at 28 Watts
cpu0: MSR_PLATFORM_INFO: 0x4043df0811c00
4 * 100.0 = 400.0 MHz max efficiency frequency
28 * 100.0 = 2800.0 MHz base frequency
cpu0: MSR_IA32_POWER_CTL: 0x0024005b (C1E auto-promotion: ENabled)
cpu0: MSR_TURBO_RATIO_LIMIT: 0x2929292929292f2f
41 * 100.0 = 4100.0 MHz max turbo 8 active cores
41 * 100.0 = 4100.0 MHz max turbo 7 active cores
41 * 100.0 = 4100.0 MHz max turbo 6 active cores
41 * 100.0 = 4100.0 MHz max turbo 5 active cores
41 * 100.0 = 4100.0 MHz max turbo 4 active cores
41 * 100.0 = 4100.0 MHz max turbo 3 active cores
47 * 100.0 = 4700.0 MHz max turbo 2 active cores
47 * 100.0 = 4700.0 MHz max turbo 1 active cores
cpu0: MSR_CONFIG_TDP_NOMINAL: 0x0000001c (base_ratio=28)
cpu0: MSR_CONFIG_TDP_LEVEL_1: 0x000c0060 (PKG_MIN_PWR_LVL1=0 PKG_MAX_PWR_LVL1=0 LVL1_RATIO=12 PKG_TDP_LVL1=96)
cpu0: MSR_CONFIG_TDP_LEVEL_2: 0x00110078 (PKG_MIN_PWR_LVL2=0 PKG_MAX_PWR_LVL2=0 LVL2_RATIO=17 PKG_TDP_LVL2=120)
cpu0: MSR_CONFIG_TDP_CONTROL: 0x00000000 ( lock=0)
cpu0: MSR_TURBO_ACTIVATION_RATIO: 0x0000001b (MAX_NON_TURBO_RATIO=27 lock=0)
cpu0: MSR_PKG_CST_CONFIG_CONTROL: 0x74008008 (UNdemote-C1, demote-C1, locked, pkg-cstate-limit=8 (unlimited))
/dev/cpu_dma_latency: 2000000000 usec (default)
current_driver: intel_idle
current_governor: menu
current_governor_ro: menu
cpu0: POLL: CPUIDLE CORE POLL IDLE
cpu0: C1ACPI: ACPI FFH MWAIT 0x0
cpu0: C2ACPI: ACPI FFH MWAIT 0x31
cpu0: C3ACPI: ACPI FFH MWAIT 0x60
cpu0: cpufreq driver: intel_pstate
cpu0: cpufreq governor: powersave
cpufreq intel_pstate no_turbo: 0
cpu0: MSR_MISC_FEATURE_CONTROL: 0x00000000 (L2-Prefetch L2-Prefetch-pair L1-Prefetch L1-IP-Prefetch)
cpu0: MSR_PM_ENABLE: 0x00000001 (HWP)
cpu0: MSR_HWP_CAPABILITIES: 0x010f1c2f (high 47 guar 28 eff 15 low 1)
cpu0: MSR_HWP_REQUEST: 0x80002f04 (min 4 max 47 des 0 epp 0x80 window 0x0 pkg 0x0)
cpu0: MSR_HWP_REQUEST_PKG: 0x8000ff01 (min 1 max 255 des 0 epp 0x80 window 0x0)
cpu0: MSR_HWP_INTERRUPT: 0x00000000 (Dis_Guaranteed_Perf_Change, Dis_Excursion_Min)
cpu0: MSR_HWP_STATUS: 0x00000004 (No-Guaranteed_Perf_Change, No-Excursion_Min)
cpu0: EPB: 6 (balanced)
cpu0: MSR_RAPL_POWER_UNIT: 0x000a0e03 (0.125000 Watts, 0.000061 Joules, 0.000977 sec.)
cpu0: MSR_PKG_POWER_INFO: 0x000000e0 (28 W TDP, RAPL 0 - 0 W, 0.000000 sec.)
cpu0: MSR_PKG_POWER_LIMIT: 0x4381e000dd802f (UNlocked)
cpu0: PKG Limit #1: ENabled (5.875000 Watts, 28.000000 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (60.000000 Watts, 0.002441* sec, clamp ENabled)
cpu0: MSR_DRAM_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: DRAM Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_PP0_POLICY: 0
cpu0: MSR_PP0_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: Cores Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_PP1_POLICY: 0
cpu0: MSR_PP1_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: GFX Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_IA32_TEMPERATURE_TARGET: 0x08640000 (92 C) (100 default - 8 offset)
cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x88350c00 (39 C)
cpu0: MSR_IA32_PACKAGE_THERM_INTERRUPT: 0x00000003 (92 C, 92 C)
cpu0: MSR_PKGC3_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu0: MSR_PKGC6_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu0: MSR_PKGC7_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu0: MSR_PKGC8_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu0: MSR_PKGC9_IRTL: 0x00000000 (NOTvalid, 0 ns)
cpu0: MSR_PKGC10_IRTL: 0x00000000 (NOTvalid, 0 ns)
Core    CPU Avg_MHz Busy%   Bzy_MHz TSC_MHz IRQ SMI POLL    C1ACPI  C2ACPI  C3ACPI  POLL%   C1ACPI% C2ACPI% C3ACPI% CPU%c1  CPU%c6  CPU%c7  CoreTmp PkgTmp  GFX%rc6 GFXMHz  GFXAMHz Totl%C0 Any%C0  GFX%C0  CPUGFX% Pkg%pc2 Pkg%pc3 Pkg%pc6 Pkg%pc7 Pkg%pc8 Pkg%pc9 Pk%pc10 CPU%LPI SYS%LPI PkgWatt CorWatt GFXWatt RAMWatt PKG_%   RAM_%
-   -   399 99.77   400 2805    17154   0   0   0   0   0   0.00    0.00    0.00    0.00    0.23    0.00    0.00    38  40  86.78   100 100 400.80  100.20  13.29   13.29   0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    5.73    1.71    0.11    0.00    100.16  0.00
0   0   399 99.77   400 2804    1556    0   0   0   0   0   0.00    0.00    0.00    0.00    0.23    0.00    0.00    38  40  86.66   100 100 400.44  100.11  13.27   13.27   0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    5.72    1.71    0.11    0.00    100.03  0.00
0   4   399 99.77   400 2804    1741    0   0   0   0   0   0.00    0.00    0.00    0.00    0.23
1   1   399 99.77   400 2804    1434    0   0   0   0   0   0.00    0.00    0.00    0.00    0.23    0.00    0.00    38
1   5   399 99.77   400 2804    2433    0   0   0   0   0   0.00    0.00    0.00    0.00    0.23
2   2   399 99.77   400 2804    1551    0   0   0   0   0   0.00    0.00    0.00    0.00    0.23    0.00    0.00    38
2   6   399 99.77   400 2804    2418    0   0   0   0   0   0.00    0.00    0.00    0.00    0.23
3   3   399 99.77   400 2804    2251    0   0   0   0   0   0.00    0.00    0.00    0.00    0.23    0.00    0.00    36
3   7   399 99.77   400 2804    3770    0   0   0   0   0   0.00    0.00    0.00    0.00    0.23

thermald entries in syslog on 20.10 (there's more -- I'm only posting where there are differences between 20.10 and 21.04)

May 16 18:21:19 hatarakibachi-i711 thermald[740]: Possibly some sensors in the PSVT are missing
May 16 18:21:19 hatarakibachi-i711 thermald[740]: Restart in non adaptive mode via systemd
May 16 18:21:19 hatarakibachi-i711 systemd[1]: thermald.service: Succeeded.
May 16 18:47:31 hatarakibachi-i711 kernel: [ 1580.856020] thermal thermal_zone5: failed to read out thermal zone (-61)

thermald entries in syslog on 21.04

May 16 17:57:42 jcs-external thermald[703]: Possibly some sensors in the PSVT are missing
May 16 17:57:42 jcs-external thermald[703]: Restart in non adaptive mode via systemd
May 16 17:57:42 jcs-external systemd[1]: thermald.service: Main process exited, code=exited, status=1/FAILURE
May 16 17:57:42 jcs-external systemd[1]: thermald.service: Failed with result 'exit-code'.
May 16 17:57:42 jcs-external systemd[1]: thermald.service: Scheduled restart job, restart counter is at 1.
May 16 17:57:42 jcs-external thermald[888]: 27 CPUID levels; family:model:stepping 0x6:8c:1 (6:140:1)
May 16 17:57:42 jcs-external thermald[888]: 27 CPUID levels; family:model:stepping 0x6:8c:1 (6:140:1)
May 16 17:57:42 jcs-external thermald[888]: Polling mode is enabled: 4
May 16 17:57:42 jcs-external thermald[888]: sensor id 9 : No temp sysfs for reading raw temp
May 16 17:57:42 jcs-external thermald[888]: message repeated 2 times: [ sensor id 9 : No temp sysfs for reading raw temp]
May 16 17:57:42 jcs-external thermald[888]: Config file /etc/thermald/thermal-conf.xml does not exist
May 16 17:57:42 jcs-external thermald[888]: message repeated 2 times: [ Config file /etc/thermald/thermal-conf.xml does not exist]

/etc/thermald/thermal-conf.xml is missing on both installations. When I start thermald by hand, on 20.10 it will complain about the missing configuration file.

ps aux |grep thermald gives no results on 20.10 (haven't tested 21.04 yet).

jcsjcs
  • 71
  • 4
  • I'm confused. Your referenced question is about 20.04 to 20.10, and it not working. But now you say 20.10 works fine and it is 20.10 to 21.04 that is giving grief. What did you do to fix your 20.10 installation? Is something still overwriting your governor and limits settings? The kernel itself wouldn't to that. Have a look at this question, as the investigation here would be the same. – Doug Smythies May 15 '21 at 15:33
  • Another person had seemingly identical trouble when changing from 20.04 to 20.10. I don't know if at some point further upgrades within 20.10 fixed it for that person as well, but I think it's an interesting parallel which might provide a clue toward what is happening. – jcsjcs May 15 '21 at 17:06
  • Oh sorry, I missed that it was a different person. – Doug Smythies May 15 '21 at 17:58
  • You can also try 18.04 and stick with that for a few years if it is better than 20.04. Perhaps it's implied but I didn't see it stated that 400 Mhz was sluggish or made the applications lag? – WinEunuuchs2Unix May 15 '21 at 20:42
  • @WinEunuuchs2Unix : The processor is to new for 18.04. Even to new for 20.04 without HWE stack (I learned the hard way, as my 10th gen is also). jcsjcs: Please get turbostat going and edit your question with the startup spew of information under conditions of throttling to 400 MHz. Use the above referenced question and my answer to see needed information. – Doug Smythies May 15 '21 at 22:19
  • @Doug Smythies: I've added the turbostats output. '@'WinEunuuchs2Unix: It's really sluggish when throttled to 400 MHz. – jcsjcs May 16 '21 at 17:37
  • It has a ridiculously low power limit 1 when throttled. Something is using TCC offset, which is messed up in that version of turbostat. While just fixed, it hasn't propagated down the food chain yet. – Doug Smythies May 16 '21 at 20:13
  • @Doug Smythies: I have one more lead: I can reproduce the same or very similar behavior (overall lower CPU frequencies and sometimes throttling to 400 MHz) by starting the thermald on 20.10: sudo thermald --no-daemon --loglevel=info I'll add relevant parts of the syslog in the original post. – jcsjcs May 16 '21 at 21:27
  • Ya, I rarely use thermald, and if I do, it is with my own, and very specific, config file. I find it to be broken more often than not. I was not aware that it messed with power limits though, or TCC offset. Try just disabling it. – Doug Smythies May 16 '21 at 23:51

1 Answers1

1

It turned out that thermald is causing the difference.

thermald is installed on kubuntu 20.10 and 21.04. However, on 20.10 thermald fails to start.

When I stop thermald on 21.04, throttling stops.

sudo systemctl stop thermald

However, at this point some settings have already been changed and thermald doesn't seem to restore those settings when stopping. So I've simply removed thermald completely.

sudo apt remove thermald

After a restart 21.04 is behaving almost identically to 20.10. The base frequency is a bit lower (1300 MHz instead of 1800 MHz), but the peak and long-term frequencies under load are the same.

Instead of uninstalling thermald, deactivating should have the same effect:

sudo systemctl disable thermald.service

jcsjcs
  • 71
  • 4