One of the scariest things any Mac user can experience is kernel panic: that moment when you are staring at a darkened display wondering what to do next. The answer is quite simple: don’t panic – your machine did that for you already.
What Is Kernel Panic?
If you see a darkened display with the message “You need to restart your computer. Hold down the power button until it turns off” or your Mac becomes unresponsive, spontaneously restarts, and then displays a message that the computer restarted because of a problem, it’s a clear sign that the OS X or macOS kernel detected an unrecoverable error. It’s termed as ‘unrecoverable’ because the heart of the operating system, the kernel, can’t handle whatever the problem is and loses control.
In this situation, the kernel pushes the panic button – in fact, it runs the panic function code – doing what it can to protect the system. In doing this it collects some data on the current condition of the processors, the running processes, and it either displays a warning message prompting a shutdown (OS X Lion or earlier) or just restarts the system. Unfortunately, everything you were working on is gone if you couldn’t save it before the kernel panic.
With OS X Mountain Lion, Apple changed the design of the panic function so that it restarts the Mac first and then displays the following message: “Your computer restarted because of a problem. Press a key or wait a few seconds to continue starting up.”
What Causes Kernel Panic?
In most cases, kernel panic is not caused by the Mac itself but by faulty software or hardware. It is recommended that you always run the latest software, because that will help eliminate the likelihood of kernel panic occurring.
Still, if the machine panics like this again, it’s certainly time to start troubleshooting, so first investigate what is causing the error. Unfortunately, discovering recurring kernel panics is a bit harder with older versions of OS X because you need to have the same conditions in place to identify the root cause. That changed with OS X Mountain Lion: now your operating system saves a log of which apps and background processes were running at the time of the kernel panic and, upon restart, offers to launch all the apps and processes that were running before the error.
How to Fix Kernel Panic
As mentioned above, kernel panic is caused by problems with either software or hardware, so the first step is to identify which it is that is responsible.
After the system has restarted, the operating system gives the option to report the problem to Apple so the company can investigate the incident, but the report is a good resource for you to check whether it is a software or hardware issue, too. Locate the term ‘machine check’ in the Problem Details and System Configuration field of this report, here it may indicate whether it was a hardware-related issue.
If for some reason the dialog box was dismissed, the log can be found within the Console app at this location: Library/Logs/DiagnosticReports.
If the issue is related to software, OS X Mavericks will help you correct it by offering to disable the faulty app. It will display a dialog box informing you about the problem caused by whichever application it was and ask you whether you want to move this app to Trash.
The “More Info” option here will display more details and possible workarounds to solve the issue, while the “Ignore” button will keep the app intact. Clicking on the “Move to Trash” button will display another prompt informing you that a restart is needed to solve the problem.
These are just the basic steps that the operating system offers to fix kernel panic, and in most cases this will be sufficient. Recurring kernel panic, however, is a different animal entirely, and dealing with it requires some advanced knowledge, so it may be best to ask for help from an Apple Authorized Service Provider or a Genius at an Apple Store. Before doing that, however, check out our guide on how to isolate the problem to a hardware or software issue, and the steps to take to fix the problem.
Best Mac Optimization Software of 2018