41

I have a Macbook Pro Retina with the following hardware:

Model Name: MacBook Pro
Model Identifier:   MacBookPro11,1
Processor Name: Intel Core i5
Processor Speed:    2.4 GHz
Number of Processors:   1
Total Number of Cores:  2
L2 Cache (per Core):    256 KB
L3 Cache:   3 MB
Memory: 8 GB
Boot ROM Version:   MBP111.0138.B15

I recently updated to OS X El Capitan; I have had the same problem occur to me twice now and it's getting me mildly concerned.

I randomly have CPU usage spikes from kernel_task, the highest of which I have seen was 660% CPU. This is frankly an unacceptable and unnatural setting for my CPU (I typically have a total usage of about 2-3%). The highest I've screenshot is this:

enter image description here

The first time, I did not record what I had open. The next time, however, I was ready, and this is the exact list of what I had open:

  • Two YouTube video pages (using the processes Safari Networking with a max of about 44% CPU, typically stabilized at 8-10% and https://www.youtube.com, which got to around 51% CPU max, typically around 10-12%)
  • Messenger. Doubtful that this had an effect, but, hey, you never know.
  • Skype. This dude was running at a consistent 50% CPU usage.

It is worth noting that I had to close both YouTube windows to actually gain enough control of my computer to open Activity Monitor. None of the aforementioned processes were spiking, just kernel_task.

Also worth noting is my fans - the fans were on maximum, blowing cold air. Even though kernel_task was spinning at 660% CPU, there was no actual heat being produced, as far as I could see.

It's at this point where I force shut down the computer - I had about .5 frames per second (1 frame every 2 seconds, was looking at the clock) and was getting nowhere when it came to even attempting to fix it.

If there is a bug related to this that I have missed, or some wacky thing with OS X in general that I'm missing, please let me know, as this is extremely frustrating and more than a little disturbing.

13 Answers 13

35

You have classic symptoms that thermal issues are causing kernel task to preemptively use up CPU to prevent overheating. If you haven't reset the SMC, try that one time. If the System Management Controller is actually stuck, the response to changing thermal measurements might lag or leave blowers on higher than they should be.

The answers above all point to things you can do to measure swap, processes, etc... but focus on thermal sensors (hardware issue) or external temperature (environment) which you can cool artificially to remove the slow down that's designed to manage heat.

If you can't measure the case temperature accurately with an infrared thermometer, try software like https://bjango.com/mac/istatmenus/ to check on the individual temp sensors and correlate them with the "spikes in CPU usage" by kernel_task. Also, resetting the SMC one time might be worth your while. If it's stuck, the response to changing thermal measurements might lag or leave blowers on higher than they should be.

7
  • That doesn't seem to be the problem, though - the fans were blowing perfectly cool air out of the vents. Also, when testing with a Ubuntu 15.04 external boot, there were no spikes in fan usage or thermal readings. Are you suggesting that a) the thermometers are miscalculating or that b) there is a fault with fan responsiveness? Or something else entirely? Commented Oct 6, 2015 at 22:14
  • @VTCAKAVSMoACE Yes - the cold air reinforces that the sensors are faulty in my estimation. It's possible the SMC is messed up, so try resetting that once.
    – bmike
    Commented Oct 6, 2015 at 22:19
  • I have reset the SMC and verified it (the LED changed, so, it definitely happened). If kernel_task goes all out of whack again within the next two days, I will let you know. Otherwise, I'll mark this as the answer. Commented Oct 6, 2015 at 22:27
  • 2
    I can say with almost full certainty that resetting the SMC worked. I've pushed my computer to far limits of CPU to generate heat and it was totally fine, as well as normal usage. I'm gonna make a final edit to make this more accessible and easier to find and mark this as an answer. Commented Oct 8, 2015 at 16:52
  • Resetting SMC worked for me.
    – Julian A.
    Commented Sep 27, 2016 at 21:13
5

High temperature in a part of the chassis from charging together with peripherals plugged in can cause this issue, at least on a 2017 MBP. Simply moving the charging cable from the left to the right ports can be enough to cool the hotspot and resolve the problem. On a machine with MagSafe charging try unplugging peripherals from the left ports until the battery is full.

CPU usage has nothing to do with this, as a hot CPU is throttled by reducing its clockspeed not by scheduling no-op load.

See https://apple.stackexchange.com/a/363933/27135 for proof.

4

Take a look at your fans ! For my Macbook Pro ( 2015 ) it wasn't a software problem. The Mac was completely unusable. I opened the Macbook dusted the fans with a toothbrush. I also cleaned the heatsink. After removing the heatsink, I found that the thermal paste was dry. I cleaned the old thermal paste and put some new paste, with care. Result: no more problems with kernel_task. The fans went from a steady speed of 6000 RPM to 2000 RPM (total silence).

1
  • I had the same problem. The service center brushed the fans and used a blower to blow out residue dust. Commented May 29 at 8:27
3

I have the same problem with my 2018 Macbook Pro, with maxed-out specs - I think the higher-powered MacBooks are too physically thin to be able to keep cool when using the using the CPU heavily!

In order to keep the temperature down, when the cores get too hot, kernel_task starts blocking other processes by taking up lots of idle time, in order to reduce the load on the CPU and bring the temperature down.

This has been confirmed by the source code to MacOS: in https://opensource.apple.com/source/xnu/xnu-4570.71.2/osfmk/kern/thread.h.auto.html, you can see the line:

#define TH_OPT_GLOBAL_FORCED_IDLE   0x0100  /* Thread performs forced idle for thermal control */`.

A solution, apart from not using the CPU too much for too long, e.g. with too many browser tabs (something I am guilty of almost daily), is to try to keep the machine cool, e.g. with a cooling pad for a MacBook, and I've found Macs Fan Control (free) quite effective at keeping my MacBook cool by running the fans at a higher speed than the OS would normally, including the option to run the fans at full blast.

Overall I think this is a design fault - recent MacBooks are too thin and have poor ventilation, and can't handle being heavily used for sustained periods of time - the behaviour of kernel_task is designed to stop the laptop cooking itself, but at the expense of the performance which made it so hot in the first place. Sadly, aside from buying a new machine (perhaps not a MacBook, next time!), all we can do is try not use it too heavily for too long and keep it cool.

1
2

My experience supports the theory that excessive CPU usage causes kernel_task to run high. In my case, it often happens when I have too many browser windows open or YouTube videos playing.

Closing windows or apps usually solves the problem.

Other ways to cool things down:

  • Higher fan speed. I use Macs Fan Control from CrystalIdea to manually raise my baseline fan speed to a constant 2500 rpm, or 3000 rpm if needed.

  • Using a cooling pad for your laptop.

  • Air conditioning! The outside temperature affects the computer's temperature as well.

EDIT: I previously said "overheating" instead of "excessive CPU usage." It's more accurate to say "predicted overheating based on current CPU and fan speed," since the Mac temperature control system takes those into account as well.

3
  • 1
    My computer was not hot when kernel_task was taking up massive CPU percentages, as mentioned in the question. :P It was actually blowing cold air. Commented May 31, 2016 at 20:35
  • The temperature control system on Macs takes into account predicted overheating as well, based on current CPU usage. It launches preemptive strikes, so to speak.
    – jkdev
    Commented May 31, 2016 at 20:37
  • I'll edit my answer to change "overheating" to "excessive CPU usage."
    – jkdev
    Commented May 31, 2016 at 20:38
1

I spend multiple days before finding out the solution that worked for me. Just try using a different charging cable. Your Macbook is plenty capable of working with multiple monitors, but frayed/internally damaged cables can cause strangely cause the kernel to enter into an infinite loop.

1
  • Interesting. I wouldn’t have thought cables could cause this, but worth mentioning. Thanks!
    – bmike
    Commented Aug 2, 2020 at 16:11
0

Here's something you can try:

  1. Reboot (you may have already done so)
  2. Reinstall OS X from the Recovery HD
  3. Delete caches by doing these commands in the Terminal rm -rf ~/Library/Caches
  4. Delete all Safari caches (since it seems as if Safari may be the cause)

Edit: it appears as if the answer by bmike is much more accurate.

7
  • I just installed it the other day. Will just removing the caches theoretically work? (no edits have been made to anything that El Capitan put in) Commented Oct 6, 2015 at 22:04
  • Wait, sorry. I realize what you mean now. I'll remove the caches. This problem is not persistent, just occasionally (twice in three days) occurring, to clarify. Commented Oct 6, 2015 at 22:07
  • 2
    None of these are root causes of kernel_task spiking. Deleting caches will actually make things worse as the system does CPU cycles to rebuild the cached data.
    – bmike
    Commented Oct 6, 2015 at 22:09
  • Yeah - I peeked in the Caches folder and I can definitely suggest not deleting that. That could really tear up some important things if you're not careful. Please note that in this answer. Commented Oct 6, 2015 at 22:11
  • @VTCAKAVSMoACE deleting caches will not mess anything up. Commented Oct 6, 2015 at 22:16
0

In my experience, kernel_task well-exceeding 100% cpu on my laptop can be resolved by reseting my power block. However, I live on a boat and have an occasionally inconsistent AC source. (Another symptom of this failure mode is the laptop indicates it's plugged in, but not charging.)

If the power supply finds unreliable AC, it stops charging the laptop. To solve this, unplug both ends of the power supply for a few seconds, then plug it back in. That (in my case) causes the laptop to start charging again, and kernel_task stops eating CPU and the fans stop spinning so much.

Best to catch it before the laptop (seemingly quickly) runs its battery down.

0

I just fixed the incredibly annoying kernel_task consumming 500% of my cpu's!

The problem has to do with hardware.

It doesn't get more bare metal than that, I opened the back cover, I have a mid 2015 Macbook Pro, I work remotely and I have a high dependency on Browser Based tools, so chrome is a CPU HOG, one part of the solution is to disable all those extensions that you do not use, that would ease a bit.

However the bulk of my finding had to do with dirty fans, I would say, without being an expert (I've done Laptop maintenance for the past 25 years...), that these machines are precision instruments, at the size of the fans vs the power they need to cool, everything needs to be well, unclogged.

I'm sure they have built in some room for it, but my reasoning tells me that there is somewhere in the OS some logic that accounts for the speed of the fans vs the airflow they provide.

So not enough airflow triggers the fans to work harder. After that it is all downhill, or should I say more uphill???.

In my experience that would be a second line of defence.

Clog the CPU to avoid a blast in Threads, keep it busy until it cools down, the computer as smart as it is, it cannot tell that there is clogged dirt preventing the airflow. What it did the trick for me are two things, the first one is PATIENCE, things are to say the least brittle, so take your time (took me 20 minutes for the whole process). And you do not want to end up with a short circuit cable because you pulled to hard, or missing bolts (not that anything like that has ever happened to me). Then the second part is a tool like this? I know you should have something like this at home, or you can get one online or in the pharmacy: An eyebrow brush

It is sturdy enough but gentle right on the spot to allow you to brush out all that dirt, then you can combine with a can of compressed air or just gently blow over it.

We as engineers tend to well over engineer. The fix was simple for me. I've done it in the past with 4 or 5 machines with same successful results. I am sharing my answer as it might shed some light over those inexplicable peaks.

So happy brushing, Regards

EN

0

In my case I had to turn off MacsFanControl in which I had both fans set to 2500 RPM. Once I turned the app off the fans started to spin faster, Mac cooled down and kernel_task stopped stealing CPU from other processes.

It's weird cause I though that MFC only sets minimum RPM and nothing prevents fans to spin faster. Maybe a bug? I used Catalina 10.15.3, upgraded to 10.15.6 and newest MacsFanControl but still the issue persisted.

So this issue can be related to thermal problems with your Mac:

  • either you have something preventing fans to spin faster (like my case)
  • or you have clogged vents and your Mac is getting too hot
0

I spent more than 5 hours dealing with this problem and nothing I found online worked. Activity Monitor showd kernel_task taking up 1400% of my CPU. If it happens to you, try running $ kextstat | grep -v com.apple and then try to get rid of everything which pops up there.

In my case, the culprit was HAXM (com.intel.kext.intelhaxm). It’s supposed to provide better performance for android emulators (I installed it as soon as I got my macbook because Android Studio advised me to do so). However, after uninstalling it my emulators kept running ok, and I haven’t had this weird issue again.

0

I tried to find a solution, but i could not find a final solution up to now. But I stumbled across this video on YouTube and this man examined this issue and documented his results

His key findings were:

  • use 60 Hz or better refresh rate on an external monitor
  • better: Use Display Port
  • Use Clam shell mode (close the lid)
  • Which ports you use for charging and the monitor does not really matter. There might be little effects on that.
  • Resolution of the monitor is not critical, even at 4K

The result when I changed the external monitor refresh rate to 60 Hz was that suddenly the IntelliJ Process was able to get far more CPU than before and that helped me a lot. The fans are still running at high speed and sometimes the kernel_task rises to 300% - but only for a short time and the MacBook does not freeze completely anymore.

0

I have a MacBook 16" 2019 and after 6 months it started getting too hot and kernel_task eating much CPU.

After some tests I found out it was the external display (if it makes a difference, I'm using a regular HDMI monitor with a USB-C-HDMI adapter) - it worked for 6 months and now (even if I switch the HDMI adapter) it's overheating and hanging cpu.

I tried many different solutions including removing power adapter, changing port sides, etc. None worked.

You must log in to answer this question.

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