I have run:

sudo parallel cpufreq-set -c {} -u 2000MHz ::: 0 1 2 3

yet when I stress the CPU, cpufreq-info returns:

analyzing CPU 2:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 2
  CPUs which need to have their frequency coordinated by software: 2
  maximum transition latency: 4294.55 ms.
  hardware limits: 800 MHz - 2.90 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 800 MHz and 2.00 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 2.29 GHz.

2.29 GHz is higher than 2.00 GHz. And this behaviour is seen for all cores.

It is as if it ignores the frequency limit completely.

Why does that happen? Is there a way to avoid it happening?

$ uname -a
Linux travel 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ cat /proc/cpuinfo
processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 42
model name      : Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz
stepping        : 7
microcode       : 0x2f
cpu MHz         : 1792.712
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 2
apicid          : 3
initial apicid  : 3
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
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 rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts md_clear flush_l1d
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 4585.01
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

In order to set a specific frequency, the 'userspace' governor is required in cpufreq.

Please see the '2.3 Userspace' section in this documentation

  • I find the document slightly difficult to read, but it seems to point out that the information in the question shows that the appropriate governor is not available, which I understand would have to be "userspace" as you suggested, or "conservative". So perhaps better question then would be, why are they not available? – Mr. Donutz Jan 9 '20 at 9:10
  • They are not available simply because their support was not added into your kernel. CPU power management governors are usually built as kernel modules. Depending on the Linux distribution you are using, the process for adding the 'userspace' governor may differ slightly. One other important thing to verify is that you are not using the 'intel_pstate' performance scaling driver, as it will not allow you to manually specify a frequency even if you add the 'userspace' governor. If you are using it, it will need to be disabled via the kernel boot line. – Yevhen Stasiv Jan 9 '20 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.