3

I have a MacBookAir5,1 connected to a Thunderbolt Display.

When it gets very hot, PID 0 "kernel_task" uses ever more CPU until reaching 340% and slowing the Mac down sufficiently to make me restart it.

I found a proposed solution at this site but it says to "move the ‘plist’ file for the model identifier we discovered earlier out of that directory" which does not apply to me because my installation of Mountain Lion does not have a plist for my 2012 MacBook Air. system_profiler tells me that I have a MacBookAir5,1.

I tried a few things. I figured that since overheating appears to cause this, I should try not to overheat the poor Mac. However, I neither understand why Mac OS X' reaction to overheating is to use 340% of CPU time nor did I manager to keep the lid open and still convince the Airbook to use the Thunderbolt Display as its only display.

I tried running from battery, assuming this would make the CPU run slower and not overheat, but when I remove the power cable from the Airbook, the Thunderbolt Display just turns black, only recovering after several minutes when I reconnect the power cable.

What's going on?

6
  • Beware, the document you quote doesn't do a correct analysis of the origin of the problem. On the other hand it does suggest to remove a kernel extension. This isn't an analysis I'd trust.
    – athena
    Commented Jul 30, 2013 at 20:47
  • I second the idea that the linked analysis isn't useful to others in most cases. Kernel extensions usually cause crashes when they go bad - not resource usage. If you reboot your Mac and the problem goes away - it's going to be a more complicated interaction between a program that asks the kernel to do some long tasks and you are unaware of that program causing the issue. If the usage goes away with a reboot, you'll have to watch and get lucky to correlate the situation where usage skyrockets.
    – bmike
    Commented Aug 4, 2013 at 12:53
  • → Andrew: you said "I should try not to overheat the poor Mac". I can't agree with this safe approach. You are hunting a problem. In this hunt the 1st thing you should try to find is a way to reproduce the problem at will and as fast as possible. This is a hunt: know your ennemy! Don't avoid it, provoke it! Take a snapshot!
    – athena
    Commented Aug 4, 2013 at 15:17
  • I agree. But do note that this is my main computer (until end of the week) and I need it to work more regularly than I need it figured out. Commented Aug 4, 2013 at 17:02
  • I'm able to reproduce this fairly consistently during overheating. I'm also in the middle of work here but if you can't reproduce it again, let me know and I'll try to find time for it, to run the snapshots. Commented Aug 28, 2013 at 12:37

3 Answers 3

2

Could you have a look at the 2 main system logs to see what your MacOS may be busy at. With a terminal or an xterm window, the 2 following commands fired when the problem appears may help you diagnose it:

tail -f /var/log/kernel.log

tail -f /var/log/system.log


To help anyone help you, next time this kind of problem arises, could you run the following command (within a terminal or an xterm window again):

top -o cpu

and grab a copy of the topmost 10 lines to put them back within your original question as here:

Processes: 50 total, 3 running, 47 sleeping, 243 threads                                                                                                                                       12:18:07
Load Avg: 1.40, 1.53, 1.28  CPU usage: 5.97% user, 7.14% sys, 86.88% idle    SharedLibs: 5044K resident, 9292K data, 0B linkedit. MemRegions: 10733 total, 769M resident, 15M private, 1479M shared.
PhysMem: 755M wired, 1363M active, 641M inactive, 2760M used, 1207M free. VM: 120G vsize, 1041M framework vsize, 2798981(19) pageins, 173(0) pageouts.
Networks: packets: 61207/73M in, 66123/6062K out. Disks: 877183/26G read, 171220/22G written.

PID   COMMAND      %CPU  TIME     #TH  #WQ  #POR #MREG RPRVT  RSHRD  RSIZE  VPRVT  VSIZE  PGRP PPID STATE    UID  FAULTS    COW    MSGSENT   MSGRECV   SYSBSD    SYSMACH   CSW      PAGEINS
1530  mdworker     17.1  06:56.12 4/1  2    82+  384+  39M+   16M    143M+  196M+  2586M+ 1530 1    running  501  1946213+  727+   881948+   219072+   6484219+  676187+   679401+  1914+
0-    kernel_task  14.0  07:55.29 69/4 0    2    757-  22M    0B     130M-  75M    2355M- 0    0    running  0    26279     0      33251333+ 32358872+ 0         0         10243109 0
1522  mds          12.6  14:55.33 9    8    118- 862   361M+  6052K  239M+  1334M+ 3736M+ 1522 1    sleeping 0    13373455+ 1286   12149111+ 6697348+  16039295+ 6938357+  3331251+ 1819924+
[...]

This is an example of a problem (no I don't have the same problem ☺) where my Mac was overheating like a fool. Here the 2 processes involved are mds and mdworker and are caused by Spotlight indexing an external drive of 500 Go of backups which I just plugged on. The 2 involved tasks regularly topped to 200% cpu alltogether. Spotlight is very inconspicuous about this behind the scene heavy business. It does just display a small point at the center of its looking glass within the menu bar.

When I finally clearly saw what was happening under the hood, I decided to let spotlight finish its job, and one hour later, the temperature, the processors and the fans returned to a normal life.


Finally, since your OS (Mountain Lion) is Lion or more recent, I advise you to read this great explanation on sysdiagnose and if you feel comfortable reading system logs, try it.

3
  • Will do when it happens again. Last two days have been much cooler and it didn't happen again. Commented Jul 31, 2013 at 6:28
  • 1
    I would also say, next time it happens - run sysdiagnose to collect a snapshot of all system memory and process and activity. Once you have two or three sets of diagnostics, the problem can usually be sussed by someone used to looking over unix log files.
    – bmike
    Commented Aug 4, 2013 at 12:54
  • thank you! I was able to figure out the flux was the reason a lot of my CPU was being taken and causing my computer to lag horribly
    – JJJ
    Commented Sep 11, 2014 at 22:31
0

I am not sure if this is related, but I have been having strange issues on my MacBook with several different various tasks (Specifically QuickLookSatellite-general) using 100+ % CPU Time, obviously making my MacBook unusable like above. Have you noticed any other processes possibly taking more CPU then normal? I have been having the hardest time tracking down the source. Are both problems possibly related?

Hopefully the question I asked might help…

1
  • No, there are no other tasks remotely using as much CPU. THere is kernel_task with about 340% (two cores, two threads), and lots of other tasks (including Civ 5) using the rest. Commented Jul 31, 2013 at 6:26
0

This seems to help: http://blog.viktorpetersson.com/post/100148585299/how-to-fix-kernel-task-cpu-usage-on-yosemite

I had the same problem when I did a clean install with Yosemite on my Macbook 6.1, but the blog above helped.

2
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
    – Tetsujin
    Commented Feb 3, 2015 at 11:43
  • 404 page no longer available
    – spuder
    Commented Nov 30, 2018 at 17:19

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