Update Feb 2019: Apple has an official explanation.
Update 2: other explanations are also possible, see further below.
I was working on my MacBook Pro today when the system became ultra sluggish. Activity Monitor showed the the process “kernel task” was consuming all four CPU cores, driving the fans full blast and making the laptop very hot. It was hard to get work done.
Air temperature was hot (about 85°), so that this macOS bug was making matters far worse by running all CPUs continuously. And it’s not like one can kill kernel task—that’s the protected core of macOS itself. I’ve seen this problem sporadically on other Macs; my belief is that it is an Apple bug, a longstanding one.
Rebooting did not solve the issues, it just started up again. I did some web searching and came up with no good answers other than a suggestion to reset the SMC controller. This I did not do.
Instead I shutdown the computer, then restarted it. The problem went away. So perhaps it is related to the SMC controller, and shutting down rejiggers something. A cold boot (shutdown and startup) might be different than a warm boot (restart) in what the system checks or does at startup. So shutting down makes some sense.
Update: it started happening again. I notice the laptop was very warm to the touch, with ambient air temperature of 90°F or so. It looks to be a bug in which the 2015 MacBook Pro cannot cool itself properly (even with fans going), and some low-level power and heat management module just goes bonkers running all 4 CPUs at 100%—rather self defeating.
Update 2: I’m seeing another issue also. For example, if the laptop is at 100% charge but fairly warm already, it rapidly loses 10% of its charge and becomes very hot in the process. It does this even if lightly used.
Explanation (thanks to Mike N below)
If kernel_task is using a large percentage of your Mac CPU
One of the functions of the kernel task process is to help manage the temperature of your CPU.
Activity Monitor might show that a system process named kernel_task is using a large percentage of your CPU, and during this time you might notice more fan activity.
One of the functions of kernel_task is to help manage CPU temperature by making the CPU less available to processes that are using it intensely. In other words, kernel_task responds to conditions that cause your CPU to become too hot, even if your Mac doesn't feel hot to you. It does not itself cause those conditions. When the CPU temperature decreases, kernel_task automatically reduces its activity.
Mike N writes:
I've seen this behavior on many, mainly mobile, Macs. It is not a bug, in itself, in Apple's view. It is a deliberate feature to compensate for their inexcusable obsession with form _over_ function. Going back at least to the Apple III.
They describe this "'works' as designed" frankly in If kernel_task is using a large percentage of your Mac CPU.
As a remedy (if you 'know'/enforce that your cooling is indeed adequate): https://blog.viktorpetersson.com/post/136535061619/how-to-fix-kerneltask-cpu-usage-on-el-capitan
Thunderbolt chips are just not that well integrated into Apple's designs. Just a small, passive, unconnected heatsink, far away from the heat pipes and fans. Given that the new MacBooks do not have another port that amounts to pitiful decisions. Most of their mobile systems have only barely enough cooling capacity.
Overpriced and underpowered. It is said that one shall not attribute malice were usually stupidity provides an explanation just as good. But why don't they learn then? This just has to planned obsolescence.
This thermal folly of theirs is for example currently killing MacBook Pros 2011 like summer flies. Not even but especially those that were serviced under the repair extension program for RadeonGate.
You probably know the heavily censored and despite that incredibly long thread at Apple's own forums. Just look at those desperate souls here: https://forums.macrumors.com/threads/force-2011-macbook-pro-8-2-with-failed-amd-gpu-to-always-use-intel-integrated-gpu-efi-variable-fix.2037591/
The situation you describe is actually a prime example of CoreRot. For the macOS is dark and full of errors.
MPG: at least there it is, plain to read.
Jarno Z writes:
It is with a very big surprise I read your article on that bug. I explain you why.
MBP 2015 as well, since three weeks ago I had the same bug with kernel working at 80% of the computing resources. I did everything on the basis. Reinstall the OS, change user, reinstalled the latest combo, reset SMC and so on. Nothing worked out.
I gave a thought about high room temperature. But was a false positive.
Then I had an idea. Maybe it is a connected peripheral. I detached everything. Symptoms away. Long story short. Thunderbolt. When something is connected to the thunderbolt, monitor or dock, whatever I have, at some point the CPU goes in protection, idling at 0.8 GHZ, and at that point the kernel task goes up to maximum. In reality then is the cpu stuck not the kernel going up, even though this is what appears.
MPG: when/if this happens again, I’ll unplug the display and see if the problem goes away. I’ll also check the Intel Power Gadget. In my case, the MBP was very warm to the touch everywhere, with ambient air temp of 90°F or so. Perhaps Thunderbolt is related and/or the root cause, but the issue needs reproducing to confirm Jarno’s suggestion. Thunderbolt is a relatively high power draw featur, and it could be that when things get too hot, the power management system takes the CPU down to minimal speed as a protective measure, rather than cutting off Thunderbolt.
Jeff R writes:
I have a 2011 MacBook Pro that suffered from the exact same CPU-using symptoms. Found your article (thank you!) and read the comment about peripherals causing the problem. After restarting, etc., I unplugged my USB mouse (that had been working fine for over a month) and the CPU usage went back to 90%+ idle. Plugged it back in, same exact over-usage. Unplugged, fine and dandy. Submitting this to help anyone else with this frustrating problem. Thanks again for your helpful article.
It turns out that the peripheral problem was exacerbated by a nearly dead (worthless) battery. The technically inclined among us may know that, but I didn’t. Guy who sold me the computer bought an off-market battery that won’t charge above 2%. So when I took the battery out and used it without the battery, the machine slows down across the board, but NONE of the CPU or peripheral shenanigans have appeared since. So, good note to your readers about a dead or dying battery cause it, even when plugged in.
MPG: I've also seen mice make a machine go bonkers with very poor responsiveness. Sometimes the cable or something is damaged and the only solution is to replace the mouse. It could happen with other USB peripherals also.
Gerald C writes:
I just wanted to thank you for you article and the response from Jarno Z. After spending days and night trying to resolve this, I read the article, unplugged the Thunderbolt to HDMI adapter… and shhhh, quiet. Immediately the CPU usage stabilised and I plugged the 2nd screen into the HDMI port directly and it is back to business.
Apple Inc. as usual you are wrong and this time you have egg on your face. i cannot wait to take the service desk on.