Tuesday, December 17, 2019

How to Fix Your Mac’s “kernel_task” High CPU Usage Bug

It’s never fun when your computer starts running slowly, but it’s even worse when you can’t figure out why it’s so slow. If you’ve shut down all the programs you can and everything on your Mac still feels like it’s moving through molasses, this could be a sign of the dreaded kernel_task causing high CPU usage.

Unlock the free "Most Useful Mac Keyboard Shortcuts" cheat sheet now!

This will sign you up to our newsletter

Enter your Email

On your Mac, kernel_task is the name given to a variety of low-level functions that allow the rest of your computer to work. This means figuring out what the culprit is can be tough. We’ve seen this a lot, so we’ve got a handful of tips to help you get rid of this problem.

Diagnosing a Slow Mac

If your Mac appears to be running slowly, is generating a lot of heat, or sounds like it’s about to take off due to high fan speeds, then you’ll want to open Activity Monitor and find out why. This is essentially macOS’s equivalent to the Windows Task Manager. Activity Monitor is a useful tool for managing resources and processes.

You can open Activity Monitor using Spotlight: just hit Cmd + Space then start typing “activity” and it should pop up. You can also find it under Applications > Utilities, and you might want to pin it to your Dock for even quicker access when you run into major issues.

macOS Activity Monitor

The reason for your slow computer should be evident on the CPU tab. Just click the %CPU column header to organize running processes by processor usage. Anything using a high amount of processing power will appear at the top; these will move around as your computer performs various tasks in the background.

High CPU usage is generally only a problem when you’re not expecting it. It’s reasonable to expect your machine to chew up resources if you’re running a game, watching a video in your browser, or editing a video. If a single Safari tab or Mac process is using more than its fair share, that generally means something’s gone wrong.

Why Is kernel_task the Culprit?

You can kill most processes by clicking on them, then clicking on the X in the top-left corner of the screen. Unfortunately, you can’t do this for one particular process: kernel_task. The reason for this is that kernel_task is actually part of macOS.

Activity monitor kernel_task high CPU usage

It’s not so much a single process, but actually a series of processes under one label. While you’re working, macOS does all sorts of tasks in the background. These include sending and receiving data over the network, writing and reading data to the disk, and indexing new folders or disks for Spotlight search.

This process will often use a lot of your available RAM on the Memory tab, but that’s much less of a worry. The amount of RAM in use will rise and fall as required. High CPU usage, however, can bring your whole system to a grinding halt, and even result in the occasional complete system crash.

So how do you stop kernel_task from negatively affecting your Mac’s performance?

Simple Solutions for kernel_task Issues

In many cases, a simple restart of your Mac will clear the problem up right away. This isn’t a permanent long-term solution if you’ve been having this issue for a while, though. Instead, it’s a short-term fix that should provide immediate results.

Whatever is causing the spike in CPU usage may return. So if you’ve been having repeat incidents, you might want to try resetting your system management controller (SMC) too. This is easy to do and can fix a wide variety of macOS issues.

Instructions for resetting the SMC vary slightly depending on what model of Mac you have. Because it can fix so many issues, we have a full guide detailing how to reset your Mac’s SMC. It also covers resetting your PRAM, another part of a Mac that can cause multiple issues.

Other Solutions for kernel_task High CPU Usage

Perhaps the most obvious fix for any OS-related issues is to update to the latest version of macOS. Simply launch System Preferences, click Software Update, and run any outstanding Apple software updates.

Another common cause of high CPU usage by the kernel_task process is Adobe Flash. The days when Flash was essential for browsing the web are long gone, but you may still need it for a specific web app or site.

Instead of keeping Flash installed, you can use a browser like Google Chrome, which provides Flash (albeit optionally). Most likely, you don’t need Flash at all, so it’s safe to remove.

Adobe Flash Player Uninstaller Mac

If you want to remove Flash altogether, run the Adobe Flash Player Install Manager and click Uninstall.

Digging a Little Deeper Into High kernel_task CPU Usage

Some have had success in removing kernel extensions, which are modules of code able to perform low-level tasks. Also known as “kexts,” the vast majority of these extensions are installed by Apple as part of the core macOS environment. Some software will install third-party extensions as drivers, or for controlling hardware.

One quick way to check if a third party kext is causing your kernel_task issues is to reboot your machine into safe mode. To do this, restart your machine and hold the Shift key as it boots. Safe mode loads only the required kernel extensions, so if the problem doesn’t occur in this environment, it points to an issue with a third-party kext.

To dive into this, reboot your system as normal and launch Terminal. Then, run the kextstat command to see what kernel extensions are currently loaded. All Apple extensions will look like com.apple.[etc]. Meanwhile, third-party drivers will have the developer name in them, like com.paragon-software.filesystems and ch.tripmode.TripModeNKE to name a few.

macOS kextstat comand

The best way to remove these is to uninstall the associated software. For some apps, that simply means moving the application file to the Trash, then inputting your admin password to allow the change.

Others may include a PKG uninstaller file you need to run. For the rest, head to System Preferences and look for any third-party preference panes. Paragon’s NTFS driver, for instance, hides the Uninstall option next to its settings.

Paragon NTFS for Mac uninstall

Starting with OS X El Capitan, Apple introduced a new security feature which broke a number of third-party modifications. System Integrity Protection, or SIP for short, stops apps from injecting code into Apple’s own apps, as well as writing to certain parts of the drive that Apple deems important to system security.

This results in better system stability, so you should see this issue less often in modern versions of macOS.

Still Have High CPU Usage? What to Do When All Else Fails

The final solution here is a bit of a risky one: removing Apple’s own kernel extensions. Doing this is not recommended. However, if you’ve tried everything else and are still seeing kernel_task causing high CPU usage, this is a solution you may want to try.

Developer and blogger Viktor Petersson has written extensively about kernel_task and the issues around it. In his case, it was likely caused by a dodgy sound card. Petersson’s initial post focused on Mac OS X Yosemite, though he later followed it up with updates for El Capitan and Sierra.

We have not tested this fix and can’t say whether or not it will work for you. If you’re interested in giving it a go, here’s what you’ll need to do:

  1. Create a backup of your Mac using Time Machine or another backup solution.
  2. Turn off System Integrity Protection by booting into Recovery mode and running the csrutil disable command.
  3. Follow Viktor’s method. Start by finding your Mac’s model using the system_profiler -detailLevel mini | grep "Model Identifier:" command.
  4. Run the following command:
    1. cd /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources
  5. Move and back up the file relevant to your model. For example, if your identifier is MacBookPro8,2 you would run:
    1. sudo mv MacBookPro8_2.plist MacBookPro8_2.bak
  6. Reboot into Recovery mode and enable System Integrity Protection again using the csrutil enable command.

Again, this is a last-resort fix. Attempt it only if you’re struggling to get anything done due to kernel_task rendering your Mac unusable. This isn’t a short-term solution—it persists even after reinstalling your operating system.

Even so, you’ll also need to repeat this process after every major software update or operating system upgrade, as Apple will restore the file you moved.

Is the kernel_task Bug a New Problem?

Generally, upgrading to a new version of macOS brings new features and capabilities, but it can also introduce bugs. This is especially true on older models of hardware that are starting to push the limits. If you’re one generation away from a Mac that is no longer supported, that could mean that your model isn’t as much of a priority for Apple.

Did you recently upgrade your version of macOS? If only then did you start seeing issues with kernel_task on your Mac, that could be the culprit. If you’re not relying on new features introduced in the latest update, you may be able to safely downgrade.

Want to give it a try? We have a guide detailing multiple ways to downgrade to an older version of macOS.

Read the full article: How to Fix Your Mac’s “kernel_task” High CPU Usage Bug

https://ift.tt/2S4PCtl

via MakeUseOf

0 comments:

Post a Comment