50

Whenever kidle_inject starts running on my system the load shoots up. In general it only gets to a load of around this 5.23, 3.65, 2.54 but a lot of the time it jumps up past the 15 mark on each of them. At that point the system grinds to a halt and I have to power it off.

This only happens when the kidle_inject process starts. How can I disable this process so my machine can work and I can get some work done.

Example top:

top - 12:43:48 up  3:02,  3 users,  load average: 6.57, 5.53, 3.33
Tasks: 256 total,   3 running, 253 sleeping,   0 stopped,   0 zombie
%Cpu(s):  5.9 us, 16.6 sy,  0.0 ni, 74.7 id,  0.5 wa,  0.0 hi,  2.3 si,  0.0 st
KiB Mem:   8080252 total,  7937856 used,   142396 free,   258904 buffers
KiB Swap:        0 total,        0 used,        0 free.  4061336 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
13509 root     -51   0       0      0      0 S  54.7  0.0   3:29.47 kidle_inject/1
13511 root     -51   0       0      0      0 S  54.1  0.0   3:30.92 kidle_inject/3
13510 root     -51   0       0      0      0 S  48.8  0.0   3:11.60 kidle_inject/2
13508 root     -51   0       0      0      0 S  47.6  0.0   3:08.47 kidle_inject/0
Carolus
  • 598
  • 4
  • 18
Nalum
  • 1,371
  • 1
  • 12
  • 14

7 Answers7

70

It appears that this is a bug in the kernel.

From the comments on that bug report, running the command sudo rmmod intel_powerclamp seems to have stopped the kidle_inject processes and I haven't noticed any issues with doing so as of yet.

Hopefully this will be fixed soon. If I do notice anything I will update this answer.

Update

The rmmod command needs to be run every time you boot the machine. I have not noticed anything bad happening since running this command.

Update 2

I have noticed since doing this that my CPU temp now tends to run much lower at around the ~72°

For making this set while booting use a command

echo "blacklist intel_powerclamp" > /etc/modprobe.d/disable-powerclamp.conf
podarok
  • 149
  • 6
Nalum
  • 1,371
  • 1
  • 12
  • 14
  • 18
    You don't have to run that command every time you boot. You can just blacklist it with `echo "blacklist intel_powerclamp" > /etc/modprobe.d/disable-powerclamp.conf` – Jesse Mar 15 '15 at 23:06
  • 3
    `Hopefully this will be fixed soon` Yeah, hopefully... come on, it's 2016, I think we're on kernel version 87 now? can we *please* move *past* the "haha lets overheat the computer for shits and giggles" thing? – cat May 04 '16 at 23:34
  • Love you man! You saved my ass today – Abhishek Gupta Jun 06 '16 at 11:47
  • 3
    This is not actually a bug, but a feature to prevent the processor from further overheating. I'd also suggest reading [this](https://askubuntu.com/a/482326/364819). –  Nov 20 '16 at 18:02
  • @ParanoidPanda `kidle_inject` is a feature, it kicking in when there is no need for it is a bug. In the case of my system it would kick in almost as soon as I logged into my OS account. I didn't have any extra apps in start up, only what ever Ubuntu has by default. I have since installed Debian and do not have this issue at all, I don't know the state of it in newer Ubuntu versions. – Nalum Mar 18 '17 at 21:56
  • @Nalum: And you are sure that there isn't another bug which is overheating your system and causing this to feature to activate? If not, then yes, that would be a bug. But one I believe to have been fixed in later versions of Ubuntu. Which version are you running? –  Mar 19 '17 at 13:37
  • As noted at the time 14.10, i then moved to Debian. Haven't had this issue with Debian. It is possible something else was triggering this that i was not aware of, but i wouldn't have expected anything to cause it to trigger as soon as i logged in. – Nalum Mar 19 '17 at 13:55
  • This is still a bug in 4.10.0-30, it seems... – cat Aug 10 '17 at 15:27
  • @AbhishekGupta wondering how a heating cpu is causing your ass burn, I can't imagine your laptop position :-D – Anand Rockzz Dec 14 '17 at 07:09
  • 1
    Instant improvement for me, Thank You. Running Kubuntu 18.04 on a clevo laptop. kernel 4.15.0-20. – kshepherd May 04 '18 at 14:35
  • 2
    @user364819 "believe to have been fixed in later versions of Ubuntu" Uh, no, think again. I'm running Ubuntu 18.04 on a new clevo laptop, in a somewhat frigid environment. This kicks in with 8 instances (best I can tell, one for each core) while the chip is barely warm (not even 35C; my own brain's running hotter without trouble). Granted, has been a few years, but last processor I knew the spec on, 100C wasn't even redline. – Matthew Najmon Jan 27 '19 at 14:26
37

The accepted answer is incomplete. According to the bug comments, the kidle_inject processes are spawned to throttle processor and protect it from further overheating.

Before "fixing" the bug, make sure your fan is clean and works correctly. I had this problem and found out that the vent was full of dust. After cleaning and reboot no kidle_inject was spawned anymore.

johnny
  • 471
  • 4
  • 2
  • Thank you for adding this note. I will also note that this was happening to my machine which was brand new. I have since setup debian on it and have had no issues and no need to apply this temporary fix. – Nalum Jun 16 '16 at 12:55
  • 2
    the expected aim of that process may very well be to protect the cpu from overheating, but how can it do that while taking 50% or more of the cpu load? that's the bug. I had to stop that process too, and replaced it when necessary with a cpu-throttle script –  Apr 03 '17 at 17:45
  • 1
    Good point, you're right that it doesn't directly protect the CPU. Maybe it will raise the user's attention though, since he will find that the computer is unusable and will do something about it. It would indeed be a better solution to underclock the CPU and notify user about its high temperatures. – johnny Dec 15 '17 at 18:13
  • I'm having this issue when the chip is downright cold. Clean fan (brand-new fan), frigid operating environment (have been concerned I might need to insulate it to protect other components, like the battery, but so far, system's not dropped cold enough to need it), and the system is still cripplingly slow, with these running on it. – Matthew Najmon Jan 27 '19 at 14:30
  • My today experience:Laptop became VERY slow. top: Kidle_inject 1150% (12 cores). Check CPU fan. Does NOT work but bottom of the laptop is hot like hell. Kidle_inject saved my processor. I was able to save my work, switch laptop off and clean fan(s). Everything came back to normal. THANKS (Kubuntu 19.04). – V-Mark Mar 08 '21 at 17:41
4

If you are running a macbook, make sure that you have macfanctld installed. If you don't, the fan will be fixed at around 2000 RPM out of the max 6000. This can be seen by the sensors command. In this situation powerclamp will kick in to save the CPUs rather early.

  • 1
    I would argue that the answer is not complete without this being included. – theYnot Jun 06 '17 at 10:16
  • 2021, with Ubuntu 20.04 on a Mac mini. `macfanctld` saved me from the irritation of high CPU usage of `kidle_inject` whenever I run Chrome. – biocyberman Sep 29 '21 at 13:10
1

I noticed this today as well. Oddly enough for the kind of CPU usage, the fan wasn't making any noise. Managed to reboot the machine and then looked at BIOS Fan speed. It showed that the fan had stopped (no RPM reading). So after a bit of a cleaning (quite literally - opening the laptop lid, cleaning a bit, the fan started working fine and things got alright. So might be the problem is with your CPU fan. So simply disabling the intel_powerclamp may not be a good idea.

gabhijit
  • 111
  • 1
1

I did the following steps which worked.

  1. Check if the module is loaded.

    lsmod |grep -i intel_powerclamp
    
  2. If the previous command shows that the module is loaded, perform the next lines.

  3. Add the following line in your crontab rules @reboot /sbin/rmmod intel_powerclamp or echo '/sbin/rmmod intel_powerclamp' >> /etc/bash.bashrc (it will affect all users) or echo 'blacklist intel_powerclamp' > /etc/modprobe.d/disable_mods.conf.

karel
  • 110,292
  • 102
  • 269
  • 299
Manuel Lazo
  • 181
  • 1
  • 3
0

A good cleaning around the laptop (HP EliteBook 8460p running Ubuntu 16.04 LTS) and a vacuuming of the air vents on both sides (along with moving the piles of random stuff that had accumulated there) fixed it for me.

1GLENCo
  • 1
  • 3
0

This is not a bug, it's a feature.

The CPU first heats. Then kidle-inject blocks each thread (that is 8 procs per 4 cores) around 50% of its time - NOT consuming power, not heating, but slowing down the system.

Solution: Vacuum the vent slids. Keep them open (e.g. do not work in bed with the bottom of the notebook "choked" by the cushions. Cool your apartment down (wait for the night to do CPU-intensive tasks).

Michael
  • 61
  • 1
  • 3