Bug 209085 - Linux Kernel 5.8 fails to get correct CPU Frequency for 8xIntel Core i7-8705G CPU @ 3.10GHz
Summary: Linux Kernel 5.8 fails to get correct CPU Frequency for 8xIntel Core i7-8705G...
Status: RESOLVED IMPLEMENTED
Alias: None
Product: Drivers
Classification: Unclassified
Component: Hardware Monitoring (show other bugs)
Hardware: Intel Linux
: P1 high
Assignee: drivers_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-31 07:02 UTC by Sam Colegrove
Modified: 2021-01-23 03:52 UTC (History)
2 users (show)

See Also:
Kernel Version: 5.8
Subsystem:
Regression: No
Bisected commit-id:


Attachments
This is the complete listing of my /proc/cpuinfo file. (11.46 KB, text/plain)
2020-08-31 07:08 UTC, Sam Colegrove
Details

Description Sam Colegrove 2020-08-31 07:02:41 UTC
When I boot with Kernel 5.8 the output from cat /proc/cpuinfo is as follows:
cat /proc/cpuinfo | grep "MHz"
cpu MHz         : 800.173
cpu MHz         : 800.086
cpu MHz         : 800.042
cpu MHz         : 800.015
cpu MHz         : 799.960
cpu MHz         : 800.097
cpu MHz         : 800.191
cpu MHz         : 799.997

When I boot with the Kernel 5.4 on the same machine the output is correct, ie
cat /proc/cpuinfo | grep "MHz"
cpu MHz         : 3793.957
cpu MHz         : 3911.014
cpu MHz         : 4000.266
cpu MHz         : 3790.653
cpu MHz         : 3824.006
cpu MHz         : 3999.368
cpu MHz         : 3839.015
cpu MHz         : 3900.953

Naturally the speed is very slow with kernel 5.8.  The cpuinfo for one of the processors is:

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 158
model name	: Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz
stepping	: 9
microcode	: 0xd6
cpu MHz		: 800.003
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 0
cpu cores	: 4
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 22
wp		: yes
flags		: fpu 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 lm 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 pti ssbd ibrs ibpb stibp 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
vmx flags	: vnmi preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest ple pml ept_mode_based_exec
bugs		: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit srbds
bogomips	: 6199.99
clflush size	: 64
cache_alignment	: 64
address sizes	: 39 bits physical, 48 bits virtual
power management:

To me this indicates that the information collected by Kernel 5.8 is in a different and wrong location to that obtained by Kernel 5.4. 

I like all the extra features in the Kernel 5.8 however this problem makes it difficult on the Laptop that I am using which is the HP Spectre x360 15-ch004ng.  I also have an ASUS R501VM N56VM with the 5.8 Kernel and this works perfectly with no slowdown, ie in  this case the correct CPU frequency is used.
Comment 1 Sam Colegrove 2020-08-31 07:08:14 UTC
Created attachment 292251 [details]
This is the complete listing of my /proc/cpuinfo file.
Comment 2 Sam Colegrove 2020-09-02 10:21:31 UTC
Actually, the frequency with the 5.4 Kernel is also in error as the Intel(R) Core(TM) i7-8705G CPU is rated at 3.1GHz.
Comment 3 Sam Colegrove 2020-09-03 04:41:24 UTC
Looks like I made a big  error in rating my CPU.  I double checked at https://www.notebookcheck.net/HP-Spectre-x360-15-ch004ng.289806.0.html and found that it is rated between 3100 and 4100 MHz. So the system gave a value in this range when I inspected the /proc/cpuinfo in the Kubuntu 21.10 recovery mode.
Comment 4 Sam Colegrove 2020-11-27 00:13:58 UTC
There has been more discussion on this problem on the Kubuntu forum at https://www.kubuntuforums.net/showthread.php/77509-CPU-Frequency-800MHz-instead-of-3-1GHz-with-Kernel-5-8.

There has been no progress on solving this problem or acknowledgement that this problem exists.

I have downloaded openSUSE-Tumbleweed-DVD-x86_64-Snapshot20201124-Media.iso and hope in the coming weeks to find time to see if SUSE has the same problem with my HP Laptop.
Comment 5 Ruth 2021-01-22 07:16:18 UTC
I had the same problem, see also here: https://askubuntu.com/questions/1307773/in-ubuntu-20-10-cpu-clock-fixed-at-800mhz

My PC works with ubuntu 20.4, but not with later versions. I tried various kernels, all the same issue: CPU stuck at 800Mhz.

Even worse: with the beta version of ubuntu 20.4 my PC did go to higher CPU-clock but then suddenly turned itself off.
Comment 6 Sam Colegrove 2021-01-23 03:52:01 UTC
I now have Kernel 5.10 and even with 5.8 I observe the same behaviour, ie all 8 CPU frequencies are at 800MHz when there is no CPU load.

However, when I run a benchmarking tool like glmark2, the CPU's jump to values in the range 1.8 - 3.8 GHz and then drop back to the 800MHz range when there is no load.  Kernel 5.8 also increases the CPU frequency with load. As I see it, this behaviour helps to extend battery life of my Laptop.

So I no longer see this as a Kernel problem as the CPU frequency now adapts to the load.

Note You need to log in before you can comment on or make changes to this bug.