I do not really knows when it started, i just upgraded from 13.10 to 14.04 and was about to do something about graphics performances (unity felt sluggish). That situation already lasted for 6 months I was paying attention to troubled nvidia proprietary drivers in sli configuration... I was seriously pissed off on nvidia, unity and I was about to go for something non-unity related just go get smooth environment...

Then I discovered less then hour before I killed ubuntu/unity...

It is something related to intel_pstate...

I simply noticed, upon login performances are fantastics... Both cpu and gpu... Like a dream... Then after cca 10 seconds they drop and situation becomes ugly... I chased trough logs and found in syslog it seems to be related to this line:

Apr 28 21:29:41 b4da55 kernel: [ 83.861621] intel_powerclamp: Start idle injection to reduce power

After this line performances are gone. The session I'm having this one while writing this post is somewhat different... I was looking at Google to find how to tune or disable this idle injection (at least while I work on ac, not batteries) to get max performances but nothing... Then it happened on it's own, this line pop-up in syslog:

Apr 28 21:46:03 b4da55 kernel: [  362.386585] intel_powerclamp: Stop forced idle injection

I do not know what caused it... But now it works like a charm! It's so smooth... I can't believe... I guess it renders like over 100fps... I enabled wobbling window effect and having fun... htop is showing much lower cpu usage while i'm not doing anything...

Can someone tell me how I can control this idle injection?

  • 2
    @Ingo its purpose is to slow things down (and reduce your power consumption). There is documentation directly from Intel directly in the kernel. – ulidtko Dec 6 '14 at 14:18
  • 1
    @ulidtko This is exactly the problem. We know it slows down things on purpose, therefore, we want to turn it off, and the question was "how". – Ingo Dec 6 '14 at 18:20
  • @ulidtko see also askubuntu.com/questions/552539/… – Ingo Dec 6 '14 at 18:24

Warning: check your CPU temperature. On my system, idle injection starts only when things get hot. The OS protects the hardware from overheating.

See intel_powerclamp manual. It has "Usage and Interfaces" section which describes how to control it.

TL;DR sudo rmmod intel_powerclamp, but you've been warned.

More gentle means to control the thing exist.

First, locate the abstract "thermal device" corresponding to the power consumption control loop:

# grep -l intel_powerclamp /sys/class/thermal/cooling_device*/type

# cd /sys/class/thermal/cooling_device11

Now, the "slowdown" percentage of the control loop can be adjusted:

# echo 25 > cur_state

It's possible to set 0 there. Percentage above 50 is not allowed.

It'd be great if someone came up with an applet for controlling this contraption easily (i.e. if someone added the obviously needed general user controls), perhaps with rules (AC/battery, time of day, screen idle etc).

  • Bonus note: I've actually used intel_powerclamp to workaround a thermal issue in a laptop, whereby it abortively shut down from just a ~minute of running Minecraft. With the powerclamp enabled and adjusted, the laptop run Minecraft for hours no problem. Interestingly, the FPS looked more smooth with powerclamp than without. Finally: that laptop has a powerful i5 and passive-only cooling. So that's one anecdotal situation where intel_powerclamp is useful. – ulidtko Jun 5 at 8:01
  • 1
    tlp might be a helpful addition to your answer: askubuntu.com/questions/391474/stop-cpu-from-overheating/… – WinEunuuchs2Unix Jun 5 at 12:42

In the running system, you can get rid of intel_powerclamp:

sudo rmmod intel_powerclamp

To disable it permanently and suppress loading it altogether, in addition do:

cd /etc/modprobe.d
sudo su
echo install intel_powerclamp /bin/true  >intel_powerclamp.conf

Then, after a reboot, it wont come back.

Your Answer

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