9

I spent hours searching for an answer in Internet. All I could find doesn't help. I have Intel i9-9980HK, running under Ubuntu 20.04, kernel 5.4.0-33.

The problem is that under the full load the CPU lowers the frequency to 2.7 GHZ, I guess in order to stay under low power budget. Whatever I try I can't make it run faster. It stays under 65C, quietly and slowly crunching numbers. For comparison the same machine under Windows runs from 3 to 4+ GHz under the full load.

What I tried:

  • Change the governor to performance. No effect.
  • Set /sys/devices/system/cpu/cpufreq/policyX/energy_performance_preference to performance. No effect.
  • sudo service thermald stop. No effect.
  • Increase /sys/devices/system/cpu/intel_pstate/turbo_pct. Access denied even for root.
  • Increase /sys/devices/system/cpu/cpufreq/policyX/scaling_min_freq. No effect.

I am lost. What does it want? Btw, /sys/devices/system/cpu/intel_pstate/status is active.

Update. I think I know the reason. When intel_pstate is active, it ignores all the settings (like governor, everything under /sys/devices/system/cpu/cpufreq). Tools like cpupower cannot control intel_pstate. So the question pretty much boils down to how control intel_pstate driver.

11
  • did you check BIOS for overclocking? also take a look at tlp-stat command...
    – Akhil
    Jun 19, 2020 at 3:57
  • Most settings in BIOS are locked, as usual for laptops. Settings in BIOS would have influenced Windows as well, right? In Windows I can easily adjust the performance. So the reason is not in BIOS settings. Besides, it's not overclocking, I cannot set the regular modes.
    – facetus
    Jun 19, 2020 at 6:43
  • I am using tlp service for this.give it a try. CPU_SCALING_GOVERNOR_ON_AC=performance
    – Akhil
    Jun 19, 2020 at 6:54
  • 1
    askubuntu.com/questions/1021748/…
    – Akhil
    Jun 19, 2020 at 7:04
  • Note that your processor's base frequency is 2.4 GHz. Anything over that is burst frequency. See here. So this higher power is only used when there is thermal headroom. Does it sound like it's working hard, does the CPU fan spin up to fully? What temp does it get to under Windows at max usage? Jun 19, 2020 at 7:05

2 Answers 2

7

The solution turned out to be to pass intel_pstate=passive to kernel. Then intel_pstate relinquishes control back to CPUFreq. The latter still uses intel_pstate to govern the CPU, but intel_pstate has no say in what to do. After that, you can finally set performance policies. Your laptop can be either completely quiet or you can make it very noisy, but powerful. When intel_pstate is active, the machine is neither quiet nor well performing, but rather always slow and noisy.

Two years later update

It turned out there is more to the story. The computer in question was a Gigabyte laptop. When I got a new laptop, also from Gigabyte, a trick with intel_pstate=passive didn't help. I started digging deeper and found out that (i) Gigabyte's firmware limits the performance if the laptop is running on anything but Windows. ACPI knows the OS it is running on via _OSI. Not only that, but you see, usually laptop manufacturers contribute to the Linux kernel and write a small driver, specific to the vendor, that helps to monitor the system and manage the performance. If you look in the kernel source code, you will find a lot of them in drivers/platform/x86, for Dell, HP, ASUS, Lenovo, Fujitsu... Well, (ii) Gigabyte has done nothing on this front. The first problem can be solved by passing acpi_os_name="Windows 2015" to the kernel. The performance will become better. However, to really make a Gigabyte laptop usable on Linux, somebody has to write a kernel driver for it. There is a user-space workaround, used in this project, that utilizes a debug feature of the kernel and writes value directly to the embedded controller registers. It's dangerous and requires undocumented information about the EC. What one should do instead is to call WMI's ACPI methods from the firmware.

1

As mentioned on the comment this question have a lot of information on how to change the CPU settings.

Why is it called "ondemand", but it sets other governors (for example with the intel_pstate driver it will set the powersave governor)? Because this tool pre-dates the intel_pstate driver, back to a time when, by far, the dominant frequency scaling driver was the acpi-cpufreq driver, and "ondemand" was the preferred Ubuntu default governor.

Intel Pstate: is a part of the CPU performance scaling subsystem in the Linux kernel (CPUFreq). It is a scaling driver for the Sandy Bridge and later generations of Intel processors. Note, however, that some of those processors may not be supported. To understand intel_pstate it is necessary to know how CPUFreq works in general, so this is the time to read CPU Performance Scaling if you have not done that yet.

You can add intel_pstate=disable in your kernel book parameter to disable it, more details here.

1
  • 1
    "this is the time to read CPU Performance Scaling if you have not done that yet" — I read all of this and tried everything suggested, except turning off intel_pstate.
    – facetus
    Jun 20, 2020 at 7:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .