Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#79846 - [linux] i9-13900HX reporting impossible CPU frequencies

Attached to Project: Arch Linux
Opened by Evert Vorster (evorster) - Tuesday, 03 October 2023, 23:44 GMT
Last edited by Toolybird (Toolybird) - Saturday, 07 October 2023, 00:44 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To No-one
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
All utilities in Linux report CPU frequencies for this CPU that is outside of the range that this CPU is capable of.

As an example, here is the output of lscpu:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 39 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Vendor ID: GenuineIntel
Model name: 13th Gen Intel(R) Core(TM) i9-13900HX
CPU family: 6
Model: 183
Thread(s) per core: 2
Core(s) per socket: 24
Socket(s): 1
Stepping: 1
CPU(s) scaling MHz: 49%
CPU max MHz: 2200.0000
CPU min MHz: 800.0000
BogoMIPS: 4840.00
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 b
ts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt ts
c_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1
avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect avx_vnni dtherm arat pln pts hwp hwp_notify hwp_act_window h
wp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize arch_lbr ibt flush_l1d arch_capabilities
Virtualization features:
Virtualization: VT-x
Caches (sum of all):
L1d: 896 KiB (24 instances)
L1i: 1.3 MiB (24 instances)
L2: 32 MiB (12 instances)
L3: 36 MiB (1 instance)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-31
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Enhanced / Automatic IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Srbds: Not affected
Tsx async abort: Not affected

---------------------------------------------------

There is a little more information on the CPU here:
https://www.notebookcheck.net/Intel-Core-i9-13900HX-Processor-Benchmarks-and-Specs.671451.0.html


I have a thread open with Intel themselves, but they don't seem too interested in what I am seeing:
https://community.intel.com/t5/Processors/Wildly-different-clock-speeds-reported-in-Windows-vs-Linux-for/m-p/1529153#M9023

If you require any more information from me, or have things that you would like me to test, I promise to be really responsive.
Because I can't see the proper CPU frequencies, I don't know whether this CPU is turbo boosting or not, and I don't even know if it is properly being utilized.

This task depends upon

Closed by  Toolybird (Toolybird)
Saturday, 07 October 2023, 00:44 GMT
Reason for closing:  Upstream
Additional comments about closing:  Please continue to follow up in the upstream ticket.
Comment by Toolybird (Toolybird) - Wednesday, 04 October 2023, 03:47 GMT
This report is lacking vital information about the kernel i.e. pkg version number, the flavor, "linux", "linux-lts", etc). If this worked on a previous kernel, it's an upstream kernel regression. General debugging advice [1].

Either way, it doesn't appear to be an Arch packaging issue which means you'll likely have better luck reporting this upstream directly to the kernel folks. Please refer to [2] (2nd para, first sentence in bold). Please let us know what you find out.

[1] https://wiki.archlinux.org/title/Kernel#Debugging_regressions
[2] https://wiki.archlinux.org/title/Bug_reporting_guidelines#Upstream_or_Arch%3F
Comment by Evert Vorster (evorster) - Wednesday, 04 October 2023, 08:33 GMT
Hi Toolybird.

Thanks for the links, I'll try my luck with the kernel maintainers directly.

This CPU was released only in quarter 1 of 2023, and I only got this laptop a month ago. From when I got it, the frequencies were reported wrong.
Being an Arch distro, the kernel is always up to date, and the kernel I currently have installed is: core/linux 6.5.5.arch1-1

Thanks again for the help, and have a great day!
Comment by AK (Andreaskem) - Wednesday, 04 October 2023, 10:11 GMT
Which one bothers you? The maximum frequency matches the maximum base frequency. The minimum frequency does not seem to be available anywhere but it should not matter anyway?

https://www.cpu-world.com/CPUs/Core_i9/Intel-Core%20i9%20i9-13900HX.html

Try `cpupower frequency-info`. There should be two entries that matter: `hardware limits` and `boost state support`:
For me, they are
hardware limits: 400 MHz - 4.60 GHz
...
boost state support:
Supported: yes
Active: yes
Comment by Evert Vorster (evorster) - Wednesday, 04 October 2023, 10:24 GMT
It bothers me that the manufacturer specifies max frequency as 5.6GHz, and the max frequencies reported are the base frequencies:

```
[evert@Evert ~]$ cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_max_freq | sort | uniq
1600000
2200000
```

Also, min frequency is outside of the range that this CPU supports:
```
[evert@Evert ~]$ cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_min_freq | sort | uniq
800000
```



analyzing CPU 10:
driver: intel_pstate
CPUs which run at the same hardware frequency: 10
CPUs which need to have their frequency coordinated by software: 10
maximum transition latency: Cannot determine or is not supported.
hardware limits: 800 MHz - 2.20 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 800 MHz and 2.20 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 800 MHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
Comment by AK (Andreaskem) - Wednesday, 04 October 2023, 11:38 GMT
A shot in the dark: Did you properly load the CPU microcode?
Comment by Evert Vorster (evorster) - Wednesday, 04 October 2023, 11:55 GMT
Hi AK.

Ah, I have been wondering about that. I have both amd-ucode and intel-ucode in my EFI boot environment before the vmlinuz.
I have not tried without them, it might be something to try. :P

In any case, the intel-ucode is the only one to have loaded, and it loaded early:

```
[evert@Evert ~]$ journalctl -k --grep=microcode
Oct 04 12:30:26 archlinux kernel: microcode: updated early: 0x115 -> 0x119, date = 2023-06-06
Oct 04 12:30:26 archlinux kernel: microcode: Microcode Update Driver: v2.2.
```
Comment by Evert Vorster (evorster) - Wednesday, 04 October 2023, 12:41 GMT
I'm all for stabbing things in the dark at this point. :D

Small correction on my previous statement, I was only loading the intel-ucode.

I tried without the intel-ucode, and could not see any difference in reported CPU speeds, ie: still not as expected.
Comment by Evert Vorster (evorster) - Wednesday, 04 October 2023, 14:11 GMT
I did file a bug report with the kernel bug tracker: https://bugzilla.kernel.org/show_bug.cgi?id=217976

Loading...