[SOLVED] CPU frequency decreases under load, rises when idle

Archived topics about LMDE 1 and LMDE 2
Locked
terdon

[SOLVED] CPU frequency decreases under load, rises when idle

Post by terdon »

Hello all, I have a strange problem. As it says in the title, my cpu frequency will decrease when the system is under load. The problem seems to be that the BIOS reports different max cpu freqs depending on whether the system is under load. The details given below show the "performance" governor but I get similar behaviour with userspace and ondemand. In all cases, I cannot override the BIOS limit if that is set to the low value (see below).

I get the same problem using either 3.0.0-1-amd64 or 3.2.0-2-amd64 kernels. I have just updated my BIOS and saw no difference. I have tried disabling dynamic frequency by disabling Intel SpeedStep Technology in the BIOS. I got a similar situation. In this case, the CPU was reporting a constant frequency of 2.67 GHz but minor tasks (eg firefox, conky, emacs) would occupy >20% of CPU and the CPU usage would quickly reach 99%. I mean that before running "stress" or similar, firefox was sitting happily at ~6% CPU, As soon as I started stressing the system, firefox shot up to ~20% despite the CPU freq apparently not changing. This seems to imply that the CPU freq is misreported and disabling Intel SpeedStep does not stop the decrease in freq, just stops the system from reporting it.

So, either using dynamic frequency or not, my system becomes unusable when even under minor processor loads. Does anyone have any ideas how to fix this? I seem to recall there are known regressions in the 3.0-3.2 kernels that could affect CPU frequency control. Anybody know if that is true? Should I just wait for 3.3?

System Specs:
Dell M4500
Intel Core i7 M 620 @ 2.67GHz
4GB RAM
LMDE, 3.2.0-2-amd64
BIOS: Dell Inc. A10 11/30/2011


Details when using "performace" governor:
1. System idle:
cpufreq-info output (for one processor):

Code: Select all

cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 1.20 GHz - 2.67 GHz
  available frequency steps: 2.67 GHz, 2.67 GHz, 2.53 GHz, 2.40 GHz, 2.27 GHz, 2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz, 1.47 GHz, 1.33 GHz, 1.20 GHz
  available cpufreq governors: userspace, conservative, powersave, ondemand, performance
  current policy: frequency should be within 1.20 GHz and 2.27 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 2.27 GHz.
  cpufreq stats: 2.67 GHz:64.78%, 2.67 GHz:0.81%, 2.53 GHz:1.03%, 2.40 GHz:0.45%, 2.27 GHz:1.38%, 2.13 GHz:1.25%, 2.00 GHz:0.66%, 1.87 GHz:0.48%, 1.73 GHz:0.43%, 1.60 GHz:1.20%, 1.47 GHz:0.80%, 1.33 GHz:0.77%, 1.20 GHz:25.95%  (450)

cat /sys/devices/system/cpu/cpu0/cpufreq/bios_limit

Code: Select all

2667000
2. System under load
In this example, I am running stress but anything can trigger this. Even pasting large amounts of data into a terminal(!):

Code: Select all

stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 10s
Relevant lines of cpufreq-info output:

Code: Select all

 cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0 1 2 3
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 1.20 GHz - 2.67 GHz
  available frequency steps: 2.67 GHz, 2.67 GHz, 2.53 GHz, 2.40 GHz, 2.27 GHz, 2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz, 1.47 GHz, 1.33 GHz, 1.20 GHz
  available cpufreq governors: userspace, conservative, powersave, ondemand, performance
  current policy: frequency should be within 1.20 GHz and 1.20 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 1.20 GHz.
  cpufreq stats: 2.67 GHz:60.05%, 2.67 GHz:0.75%, 2.53 GHz:2.21%, 2.40 GHz:0.98%, 2.27 GHz:2.46%, 2.13 GHz:1.18%, 2.00 GHz:0.64%, 1.87 GHz:0.47%, 1.73 GHz:0.42%, 1.60 GHz:1.14%, 1.47 GHz:0.77%, 1.33 GHz:0.73%, 1.20 GHz:28.19%  (462)
cat /sys/devices/system/cpu/cpu0/cpufreq/bios_limit

Code: Select all

1199000
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
I_can_see_the_light

Re: CPU frequency decreases under load, rises when idle

Post by I_can_see_the_light »

I was going to suggest that you tried using the "ondemand" governor, but then I saw that you already tried that. I really don't know what to say... There are a couple of other cpu frequency scaling applications in the repo, perhaps one of those might help?
terdon

Re: CPU frequency decreases under load, rises when idle

Post by terdon »

Yes, I've tried just about everything I could think of except the obvious: I raised the laptop off the surface of the desk, thereby increasing airflow. Problem solved!

Grrr...so what was happening is that the CPU would overheat and the BIOS would cick in and lower the frequency. Nothing to do with any kernel level processes after all. The annoying thing is that the laptop is not that dirty. I opened it and it seems relatively ok. I may have to replace the conductive paste on the CPU though. $#%&@!, Marking as solved...
I_can_see_the_light

Re: CPU frequency decreases under load, rises when idle

Post by I_can_see_the_light »

terdon wrote:Yes, I've tried just about everything I could think of except the obvious: I raised the laptop off the surface of the desk, thereby increasing airflow. Problem solved!

Grrr...so what was happening is that the CPU would overheat and the BIOS would cick in and lower the frequency. Nothing to do with any kernel level processes after all. The annoying thing is that the laptop is not that dirty. I opened it and it seems relatively ok. I may have to replace the conductive paste on the CPU though. $#%&@!, Marking as solved...
Strange that it should overheat just by standing on the desk though...
terdon

Re: [SOLVED] CPU frequency decreases under load, rises when

Post by terdon »

I agree. However, my desk is not really a proper desk, just a plank of wood. It is quite flexible, maybe the fan exit is blocked because of that flexibility?

And in any case, it only heats up when being used. Idle(ish) is ok. I have no problems running a few firefox tabs terminal and emacs windows. If I try a video or run a script or something it hangs.

Good news is that the laptop was bought by my lab and is still covered by the guarantee. I opened this thread to see if anyone could come up with a software solution :)
I_can_see_the_light

Re: [SOLVED] CPU frequency decreases under load, rises when

Post by I_can_see_the_light »

terdon wrote:I agree. However, my desk is not really a proper desk, just a plank of wood. It is quite flexible, maybe the fan exit is blocked because of that flexibility?
Yeah that's possible. If the edge is a little rough I assume the airflow would suffer, so your solution sounds good. :)
terdon

Re: [SOLVED] CPU frequency decreases under load, rises when

Post by terdon »

You could try it if you have a similar problem. Then you might see the light shining under your laptop.

Sorry, couldn't resist, I'm a sucker for bad jokes :)
I_can_see_the_light

Re: [SOLVED] CPU frequency decreases under load, rises when

Post by I_can_see_the_light »

Bad jokes are underestimated :D

But as a matter of fact, I did buy a laptop stand last summer to make the laptop run cooler. I later found out that adding the parameter pcie_aspm=force to /etc/default/grub did wonders not only to battery life, but also lowered the fan noise and reduced the heat.

EDIT: 100 posts! :mrgreen: :mrgreen:
terdon

Re: [SOLVED] CPU frequency decreases under load, rises when

Post by terdon »

He, kudos on your posts.

I already had pcie_aspm=force and i915.i915_enable_rc6=1 in grub. May have helped a little for my battery/fan isues but I am not sure.
Locked

Return to “LMDE Archive”