39

When connecting a second external monitor kernel_task spikes to 600%+. This makes the computer unusable.

Before Yosemite, this worked fine with 3 monitors.

Here are the specifics:

  • When I connect one monitor to either DP or HDMI things work fine.
  • When I connect a second monitor with either DP or HDMI kernel_task spikes.
  • When I disconnect either the DP or HDMI sometimes the kernel_task rapidly returns to normal levels.
  • When I disconnect all monitors the kernel_task rapid returns to normal levels. (In Activity Monitor goto View > Update Frequency > Very Often and as soon as you disconnect the monitors, you will get lots of rapid updates to the UI).
  • Occasionally when plugging in two monitors it works (DP or HDMI) but the 3rd causes an immediate spike. After this happens, all monitors must be removed for it to return to normal. Sometimes removing all but one will fix it.
  • Sometimes when I plug all 3 in it takes 3 mins+ for it to occur.

What I have tried:

  • Resetting NVRAM.
  • Resetting SMC.
  • Attempting the above scenario with power adapter plugged in and running on battery.
  • Disabling "Automatic Graphics Switching" in Energy Saver.
  • Using integrated graphics by using sudo pmset -c gpuswitch 0

NOTE: When trying some of these things sometimes it takes 1min to happen.

System config:

I am running a MacBook Pro Retina 2.7Ghz i7 (Macbook10,1 / Mid 2012) running Yosemite 10.10.1.

I have 3 external monitors (Dell 2415H) with 2 connected by Display Port and 1 with the HDMI.


I think the issue has to do with power management. Whenever my CPU hits 58 degrees it seems to occur. I just left my 3 monitors plugged in for 5+ mins and it didn't happen. But when I started searching using Chrome it immediately happened.

Looks like a good fix here: http://www.rdoxenham.com/?p=259

vaughan
  • 1,681

2 Answers2

40

According to Rhys Oxenhams:

the kernel will keep looping some very simple tasks, e.g. getting the date, therefore ‘consuming’ (with the highest priority) the majority of the CPU in a bid to cool the system down.

The solution he mentions on his blog should work for earlier Macs. For Ivy-Bridge Macs and a little earlier Richard Schwarting has found the appropriate file to disable. Instructions are included below for convenience. I have tried many things, but this works.

  1. Disable kext by renaming it

    cd /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/Plugins
    sudo mv X86PlatformShim.kext X86PlatformShim.kext.disabled
    
  2. Clear kext cache (not sure if this is needed)

    sudo touch /System/Library/Extensions/
    
  3. Restart

    sudo reboot
    

  • After installing OSX updates you may need to repeat the above procedure if the updates have re-created the kext.

Update for (High) Sierra:

TL:TR

Rename IOPlatformPluginFamily.kext/ACPI_SMC_PlatformPlugin.kext/[MacModelIdentifier].plist

Step by step:

  1. Start intro Recovery Mode (press CMD + R while startup)
  2. Utility > Terminal csrutil disable (Disable system file protection)
  3. Restart and rename /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources/[MacModelIdentifier].plist (Mac > About > System Report > Model Identifier) to bugfix.plist (or something else)
  4. Restart and check if kernal_task process is down below 10%
  5. If successful restart again in Recovery Mode and enable system protaction again with csrutil enable

Tested and worked for me at 10.13.2 on Early 2011 MacbookPro.

Source with pictures (german) http://www.couchpiratin.de/mac-zu-langsam-kernel_task-cpu-fehler-beseitigen/

vaughan
  • 1,681
  • 2
    2 weeks later this has still resolved the issue. But I have also disabled Settings > Mission Control > Separate spaces for displays which stops the lag from focusing windows on different displays. – vaughan Jan 19 '15 at 06:50
  • THANK you for posting this answer. I work on 3 monitors (same idea 2 DP 1 HDMI) and have to unplug my HDMI every day after about 10 minutes of use. Sometimes i'll get lucky and have a few hours, but anytime I play media (music, videos, etc) it'll spike and need to be disconnected. – Atticus Aug 17 '15 at 14:29
  • 6
    Even with sudo getting mv: rename X86PlatformShim.kext to X86PlatformShim.kext.disabled: Operation not permitted when trying to move... – Shwaydogg May 28 '16 at 16:16
  • 5
    @Shwaydogg You probably need to disable OSX SIP. See http://osxdaily.com/2015/10/05/disable-rootless-system-integrity-protection-mac-os-x/ – vaughan Jun 11 '16 at 02:04
  • 6
    This is the correct answer. Why this question is marked as duplicate and says it already has an answer is crazy to me. Thanks so much for looking into the help. – jwillis0720 Jun 21 '16 at 23:02
  • I can't thank you enough for this! I'd written off being able to use my old 27inch imac with my macbook pro. I had to disable SIP but it works perfectly. – opsb Jul 25 '16 at 10:22
  • @opsb Cheers! Also, make sure you keep your graphics card cool. GeForce cards have built-in temperature-sensitive processor speed throttling which is impossible to disable. I highly recommend: https://www.bresink.com/osx/HardwareMonitor.html for monitoring the temps with graphs. I have a small $20 desk fan pointed at the left-top of my mid-2012 rMBP at all times. Otherwise, I see big performance issues with 2 external monitors. – vaughan Jul 25 '16 at 10:27
  • I'm in Barcelona so I do have a fan running constantly anyway just to keep me fresh ;) Haven't noticed any spikes apart from when I'm using hangouts, I just detach the extra screen while I'm on a call. – opsb Jul 26 '16 at 11:09
  • This seems to have worked for me. I will add that I use a Logitech mouse, and I had to reinstall it's drivers to get the scroll wheel to work again. – bheussler Jul 29 '16 at 21:03
  • 1
    @bheussler Interesting. I use an IntelliMouse Explorer from the 90s and I had to reinstall its drivers as well, but I never thought about the link to this kext. – vaughan Jul 29 '16 at 21:05
  • Just following up. I just had kernal_task spike out of control again. Everything seemed to be fixed and working fine for a month. I wonder if I applied an update and have to disable kext again? Or maybe this was temperature related? I'll try to keep you guys up to date. – bheussler Aug 22 '16 at 21:44
  • 1
    @bheussler After each OSX update, it seems to restore the kext so you will probably have to perform fix again. – vaughan Aug 23 '16 at 07:40
  • 1
    @vauhan Thank you for the response! Maybe it's worth adding a note to the bottom of the answer. – bheussler Aug 23 '16 at 13:54
  • 5
    Update: I am running Sierra and I'm having issues with the kernal_task again. This solution is not enough anymore. – bheussler Oct 21 '16 at 22:36
  • 5
    Same here. The solution didn't work for Sierra. Even after renaming and restarting, kernel_task went back to using 500% CPU. – Shobhit Puri Dec 24 '16 at 21:02
  • I depends what Macbook you have. This works on my MBP Mid-2012 with NVidia graphics. It won't work for other laptops. I am using MBP 2016 with Sierra and no longer encounter these issues. – vaughan Feb 03 '17 at 15:12
  • 2
    The solution works, but so much as an iTunes update and my MBP is back to being nearly unusable due to that issue. There simply has to be a better solution. – signus Mar 24 '17 at 23:33
  • I can confirm that this works on macOS High Sierra beta 3... in fact, in my case, I didn't even need to restart. – Stefan Z Camilleri Jul 31 '17 at 16:02
  • I get mv: rename X86PlatformShim.kext to X86PlatformShim.kext.disabled: Operation not permitted. macOS Sierra. – sharpmachine Aug 02 '17 at 21:56
  • @sharpmachine make sure SIP is disabled before attempting to renmae that file – Chiko Jan 09 '18 at 08:46
  • I was trying to follow the update. In my case of 10.13.1 high Sierra, there was no file matching the pattern mentioned. – Shobhit Puri Feb 23 '18 at 09:27
  • 8
    My model identifier says MacBookPro11,3 but there is no 11,3 plist file. Which one do i need to rename? – JohnRW Apr 08 '18 at 16:39
  • 5
    This was working until there was an update to Sierra, then I upgraded to High Sierra, also doesn't work. I checked if the kexts are recreated but unfortunately, that's not the case. We need another solution now – JacopKane Jun 25 '18 at 09:51
  • Any updates? Same problem here - without the big screen, the computer works fine, but I need both to view both code (on laptop) and 'result' (on big screen). – Apps-n-Add-Ons Apr 14 '19 at 12:39
  • 1
    I am having following error on OS Catalina: mv: rename X86PlatformShim.kext to X86PlatformShim.kext.disabled: Read-only file system – alper Nov 19 '19 at 10:39
  • 2
    Has anyone found a solution for Mojave? – zeusstl Jun 02 '20 at 04:32
0

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.