2

I've recently updated to Ubuntu 22.04 LTS and saw there was power options. However, performance mode is not available.

I can't get the same performance and benchmark scores I get in Windows dual boot. I think this is the reason.

So I checked power governor and it says acpi-cpufreq. I checked my grub cfg, and it says intel_pstate=enable. I had the same problem with Ubuntu 20.04, thought maybe it's an issue with kernle, but even with new kernel, it's still not working.

[    0.062414] Kernel command line: BOOT_IMAGE=/vmlinuz-5.15.0-47-generic root=UUID=9103868b-6caf-4c46-95b9-05f6bb5b8e94 ro intel_pstate=enable quiet splash vt.handoff=7
[    0.453038] intel_pstate: CPU model not supported

$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver acpi-cpufreq

$ uname -r 5.15.0-47-generic

$ grep -i pstate /boot/config-$(uname -r) CONFIG_X86_INTEL_PSTATE=y

$ grep intel_pstate /boot/grub/grub.cfg linux /vmlinuz-5.15.0-47-generic root=UUID=xxxxx ro intel_pstate=enable quiet splash $vt_handoff

$ cat /sys/devices/system/cpu/cpufreq/boost 1

$ ls /sys/devices/system/cpu/intel_pstate/ no such file or directory

$ cpufreq-info ..snip.. analyzing CPU 15: driver: acpi-cpufreq CPUs which run at the same hardware frequency: 15 CPUs which need to have their frequency coordinated by software: 15 maximum transition latency: 10.0 us. hardware limits: 800 MHz - 2.30 GHz available frequency steps: 2.30 GHz, 2.30 GHz, 2.20 GHz, 2.10 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil current policy: frequency should be within 800 MHz and 2.30 GHz. The governor "ondemand" may decide which speed to use within this range. current CPU frequency is 997 MHz. cpufreq stats: 2.30 GHz:1,62%, 2.30 GHz:0,13%, 2.20 GHz:0,25%, 2.10 GHz:0,17%, 2.00 GHz:0,27%, 1.90 GHz:0,31%, 1.80 GHz:0,29%, 1.70 GHz:0,54%, 1.50 GHz:0,73%, 1.40 GHz:0,72%, 1.30 GHz:0,96%, 1.20 GHz:1,33%, 1.10 GHz:3,17%, 1000 MHz:6,38%, 900 MHz:18,62%, 800 MHz:64,50% (30660)

$ lscpu ..snip.. Model name: 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz CPU family: 6 Model: 141 ..snip.. Frequency boost: enabled CPU max MHz: 2301,0000 CPU min MHz: 800,0000 BogoMIPS: 4608.00 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mc a 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 tsc_known_freq pni pclmulqdq dtes6 4 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr p dcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline _timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefe tch cpuid_fault epb cat_l2 invpcid_single cdp_l2 ssbd i brs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriori ty ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep b mi2 erms invpcid rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni av x512bw avx512vl xsaveopt xsavec xgetbv1 xsaves split_lo ck_detect dtherm ida arat pln pts avx512vbmi umip pku o spke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx5 12_bitalg avx512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2intersect md_clear flush_l1d arch_capabiliti es

Also, when I Google the cpu model and intel_pstate, I can see some forum posts with the same cpu, and driver/governor(?) as intel_pstate, so it's probably supported.

I was wondering what steps I could take to further troubleshoot or fix this issue? Thanks!

p.s. my device is a laptop

Cagri
  • 787

1 Answers1

1

During boot you are getting the kernel message:

[    0.453038] intel_pstate: CPU model not supported

Because:

  1. HWP (HardWare Pstate) control, A.K.A. Intel Speed Shift Technology (not to be confused with Intel Speed Step), is disabled in the BIOS.
  2. There seems to be a bug in the source code for the intel_pstate CPU frequency scaling driver that does not allow use of the driver with HWP disabled for the Tiger Lake family of Intel processors, and possibly other families.

For a verification test on my 20.04.4 test server with a Intel(R) Core(TM) i5-10600K CPU @ 4.10GHz, or Comet Lake, processor I commented out the line that includes that family in the no HWP code path:

doug@s19:~/kernel/linux$ git diff
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 57cdb3679885..3cbc1abb9911 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -2414,7 +2414,7 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = {
        X86_MATCH(ATOM_GOLDMONT,        core_funcs),
        X86_MATCH(ATOM_GOLDMONT_PLUS,   core_funcs),
        X86_MATCH(SKYLAKE_X,            core_funcs),
-       X86_MATCH(COMETLAKE,            core_funcs),
+/*     X86_MATCH(COMETLAKE,            core_funcs), */
        X86_MATCH(ICELAKE_X,            core_funcs),
        {}
 };

For the unmodified kernel I got:

  • HWP set to auto or enabled in BIOS resulted in the intel_pstate CPU frequency scaling driver.
  • HWP set to disabled in the BIOS resulted in the intel_cpufreq CPU frequency scaling driver. (Note that the intel_cpufreq driver is just the intel_pstate driver in passive mode, which is the default now when HWP is not available. See also here.)

For the modified kernel I got:

  • HWP set to auto or enabled in BIOS resulted in the intel_pstate CPU frequency scaling driver.
  • HWP set to disabled in the BIOS resulted in the acpi_cpufreq CPU frequency scaling driver.

The list of processor families for the no HWP code branch seems rather incomplete. In the case of this question the model number is 141 or 0X8D or TIGERLAKE:

./arch/x86/include/asm/intel-family.h:#define INTEL_FAM6_TIGERLAKE              0x8D    /* Willow Cove */

So the suggested code patch would be:

doug@s19:~/kernel/linux$ doug@s19:~/kernel/linux$ git diff
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 57cdb3679885..fc3ebeb0bbe5 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -2416,6 +2416,7 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = {
        X86_MATCH(SKYLAKE_X,            core_funcs),
        X86_MATCH(COMETLAKE,            core_funcs),
        X86_MATCH(ICELAKE_X,            core_funcs),
+       X86_MATCH(TIGERLAKE,            core_funcs),
        {}
 };
 MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);

By the way, the performance CPU frequency scaling governor is available for the acpi-cpufreq CPU frequency scaling governor. Just do this:

echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

And then check it:

doug@s19:~/kernel/linux$ grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu10/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu11/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu2/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu4/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu5/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu6/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu7/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu8/cpufreq/scaling_governor:performance
/sys/devices/system/cpu/cpu9/cpufreq/scaling_governor:performance
Doug Smythies
  • 16,146