Two requests please:

  1. Can someone tell me how I can determine all the components that are a) installed and b) actively controlling CPU frequency on an installation?
  2. And separately, can someone tell me where the documentation for those components is?

[For context, the forum seems to be riddled with questions on the topic of "how do I set/control/limit the range of" cpu frequency, and many of them don't seem to get actual accepted answers. I have one such, so I will have to try to learn enough to work this out for myself. Unfortunately, the docs have so far mostly eluded me, and I have failed to find the "root" document, if such exists" that describes the overall concepts. So, I'm left with a system that seems to break the rules by clocking the CPU slower and slower (down to 240 MHz!) on a system that seems to be limited to 800 MHz - 2.4 GHz.]

EDIT follow up to Pilot6's comments/answer:

  1. It's an Intel CPU (Core Duo)
  2. The scaling driver is acpi (why would that be? what governs that decision--it's that way out of the box)
  3. I tried changing scaling_min_freq, and the system overwrote it (with a value that doesn't match what the BIOS uses for "IntelSpeedStep")
  4. it makes no difference whether speedstep is enabled in BIOS
  5. it runs much slower than min_freq, which makes your final comment about hardware issue particularly interesting.
  6. It slows down (per my other thread here: CPU clock speed slows way down Dell / Intel Core Duo (Lubuntu and others) ) when under long term load, but seemingly without getting too hot (~65C). It also takes forever to speed back up (but it does eventually).

TIA Toby

  • Are you using Ubuntu? Which release? What is the CPU? How did you find out that the CPU was working at 240 MHz?
    – Pilot6
    Jun 18 '20 at 13:11
  • 1
    The management is CPU specific.
    – Pilot6
    Jun 18 '20 at 13:36
  • 1
    Is some powersave option is enabled in BIOS?
    – Pilot6
    Jun 18 '20 at 13:38
  • 1
    Most likely Core Duo is too old for intel_pstate.
    – Pilot6
    Jun 18 '20 at 14:32
  • 1
    ah, so it chooses acpi instead... That makes sense. Jun 18 '20 at 14:37

CPU frequency is controlled by Linux kernel. Nothing else is installed in Ubuntu.

For desktop systems two scaling drivers are usually used: intel_pstate for relatively new Intel CPU's or acpi-cpufreq for AMD and other CPU's.

acpi-cpufreq can be used for Intel CPU's as well.

You can check which one your system is using by

cat /sys/devices/system/cpu/cpufreq/policy0/scaling_driver

For both drivers you can control maximum and minimum speeds by writing values to /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq and /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq.

intel_pstate and acpi-cpufreq have different scaling governors.

You can check and set them in /sys/devices/system/cpu/cpufreq/policy0/scaling_governor.

For multi-core CPU's there is a policy for each core. You can set policies separately.

If your CPU is running at speed below scaling_min_freq, it means that this is a hardware issue. Motherboard can also control frequencies.

  • 1
    intel_pstate in passive mode is another one, called intel_cpufreq. Agree 240 Mhz typically = Clock Modulation. Most likely cause: thermal, but also many OEM things via BIOS. Jun 18 '20 at 14:30
  • @Pilot6, thanks, comments and more info in main question Jun 18 '20 at 14:33
  • @DougSmythies Thanks for the input. It seems to be using acpi, but not responding to the controls thereof. How/why does the OS decide which to use? And how would I interact with thermal things (given it doesn't appear to be hot) and what other BIOS things (Intel SpeedStep is disabled in BIOS)? Jun 18 '20 at 14:36
  • @TobyEggitt : Suggest use Pilot6 answer and do this: first, show the list of available frequencies: grep . /sys/devices/system/cpu/cpufreq/policy*/scaling_available_frequencies. Second pick one, about 1/2 way between min and max, say XXXXXXX. Third do this as root (sudo su in a terminal): for file in /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq; do echo "XXXXXXX" > $file; done. Then does the slow donw not occur? If yes, increase frequency and repeat. If no lower frequency and repeat. Jun 18 '20 at 15:03
  • 1
    The it is BIOS who writes to these registers. There is nothing else that can be done from Ubuntu.
    – Pilot6
    Jun 18 '20 at 15:35

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.