About 2 years ago my Macbook CPU started going crazy and would run at about 500% (not sure how the stats actually work) which made the laptop virtually unusable. The problem seemed to be initially associated with overheating as the fans sounded like an aircraft taking off and I was doing a considerable amount of data processing. To address this issue I brought a cooling pad which made some difference however the laptop would still overheat. The next step was to clean the inside of the mac as it had got pretty dusty over the years. With the help of some special screwdrivers and compressed air the fans were cleaned and this made a noticeable difference.

Unfortunately the high CPU came back again. I have quite a lot of monitors attached to the mac and I wondered if it was a hardware issue. It turned out that by disconnecting the monitor attached to the hdmi port the problem stopped…for a while.

The next step was to start looking online and it turned out that this problem is not uncommon with a lot of suggestions including resetting SMC and PRAM (http://www.makeuseof.com/tag/reset-macs-smc-pram/). The solution eventually came from a stack overflow article. https://apple.stackexchange.com/questions/164923/rmbp-kernel-task-spikes-when-connecting-more-than-one-external-monitor/164947#164947

Disabling a particular extension fixed things cd /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/Plugins sudo mv X86PlatformShim.kext X86PlatformShim.kext.disabled

This requires temporarily switching off System Integrity Protection (https://www.macworld.com/article/2986118/security/how-to-modify-system-integrity-protection-in-el-capitan.html)

The only problem with this solution was that it was reset every time the OS was upgraded, so you would need to run through the process each time.

Sierra Broke it! Annoyingly after upgrading to Sierra the fix stopped working and the CPU usage was even worse than before. I was about 2 clicks away from a complete re-installation when I started looking at some other extensions

The following command will list all the none apple extensions running kextstat | grep -v com.apple

One extension stood out, DisplayLink. I’d installed this some time ago but had, had problems with the monitor that was associated it so was no longer using it. After uninstalling the extension all the CPU issues stopped and I’ve not had any problems since.