21

I am using ubuntu 14.04 LTS on an i5-3250M, 6GB RAM Dell Inspiron laptop. I have been noticing all this time from my cpu usage monitor that there is high usage of my CPU (without using something really intensive) and it leads to overheating.

I checked from the system monitor, and at first it seemed like my graphics card was the problem (AMD Radeon 7670M - hybrid graphics with Intel HD 4000). Anyway, I installed fglrx-updates (the only one that actually kind of fixed the overheating problem - fglrx and xorg didn't help) and things ran a bit smoother.

I also installed intel p-state and thermald. Put it on powersave governor, but still no luck. Also installed tlp (no conflict between them).

Tried to see if the fault is from compiz or adobe-flash. No luck. Also, HTML5 uses a LOT of CPU after a bit and it lags everything on my comp.

After doing all of those, I was looking at the results from the $top command and the culprit seems to be kidle_inject. It uses like 50% of the cpu everytime. I couldn't help but notice that it seemed like it had four modules - kidle_inject/0 to kidle_inject/3.

So, what is this kidle_inject? I haven't been able to find something conclusive on the subject. It seems to be on when I use something that is resource intensive and it continues hogging my cpu for a minute or two after terminating usage.

How can I fix this so that my comp is usable at last? I am talking about a minimum temperature of 70C in low-performance use. I am heavily dependent on linux and I would like to keep using ubuntu (since I am used so much to it and I have grown fond of it).

-- I have to say that this is not my machine's fault. When it runs on Windows 7 it's running fantastic with low temperatures.

Fotis
  • 221

4 Answers4

18

Because you enabled Intel P-state (through intel_pstate=enable in GRUB_CMDLINE_LINUX_DEFAULT), you've also enabled the powerclamp driver. The powerclamp driver is working to try to keep the processor at a low-power state, so that power consumption is reduced, and not as much cooling is required.

To do this, it forces each thread on the CPU to be idle for some amount of time by injecting idle time. Typically, this amount is 50%. The 50% you see for each of the kidle_inject processes isn't actually causing the CPU to do work; rather, it's telling the CPU not to do work, thus reducing power consumption. Note that the overall CPU usage does not include kidle-inject.

As @ElderGeek noted, you can tell the driver to inject a less amount of idle time. However, I tried this, and was unsuccessful. It may be that the kernel doesn't support it yet; it may be that powerclamp is ignoring the request.

saiarcot895
  • 10,917
10

I think there must be some kind of bug here, since on my system, kidle_inject injects 50% in all CPUs, so that when I run a single threaded process, it only gets the remaining 50% of the CPU it runs on. rmmod intel_powerclamp fixes this.

Ketil
  • 101
4

If you take a look at the temperature and trip points in

/sys/class/thermal/thermal_zone0/temp

and

/sys/class/thermal/thermal_zone0/trip_point_0_temp

you may find (as I did and then found myself at this question), that your system is running so hot that it is managing temperature by injecting idle cycles as @elder-geek mentioned.

In my case it's the hottest day of the year so far and my fan has failed, but my laptop is surviving thanks to this feature.

3

The powerclamp driver is registered to the generic thermal layer as a cooling device. Currently, it’s not bound to any thermal zones.

Here's an example from one of my systems.

grep . /sys/class/thermal/cooling_device*/type

/sys/class/thermal/cooling_device0/type:Fan
/sys/class/thermal/cooling_device10/type:LCD
/sys/class/thermal/cooling_device1/type:Fan
/sys/class/thermal/cooling_device2/type:Fan
/sys/class/thermal/cooling_device3/type:Fan
/sys/class/thermal/cooling_device4/type:Fan
/sys/class/thermal/cooling_device5/type:Processor
/sys/class/thermal/cooling_device6/type:Processor
/sys/class/thermal/cooling_device7/type:Processor
/sys/class/thermal/cooling_device8/type:Processor
/sys/class/thermal/cooling_device9/type:intel_powerclamp

Example usage: - To inject 25% idle time:

sudo sh -c "echo 25 > /sys/class/thermal/cooling_device9/cur_state

source:https://www.kernel.org/doc/Documentation/thermal/intel_powerclamp.txt

Elder Geek
  • 36,752