Question: Q: Cleaning System and Kernel Cache. I have an older G5 iMac. I use Onyx and was wondering should I occasionally clear out the System and Kernel Cache's? IMAC and Macbook, Mac OS X (10.4.11), MacBook OS 10.5.4 with 4Gb ram. Mac OS X Speciality level out of ten: 0. What is Kernel Panic? Kernel Panic, though sounding scary, is simply an occurrence when your Mac keeps restarting for no obvious reason. Your Mac’s screen goes black giving you various warning messages like “You need to restart your computer.” Note that the presence of the warning message is what distinguishes Kernel Panic from usual Mac restarts and app crashes.
When your Mac keeps restarting or unexpectedly tells you that you have to restart because of a problem, that's a kernel panic.
There are few things more terrifying when using a Mac than the dreaded kernel panic. A kernel panic occurs when your Mac runs into a problem that is so serious it is unable to continue running. When it happens, your Mac displays a dark grey screen with the words 'You need to restart your computer. Hold down the Power button for several seconds or press the Restart button.'
How to stop a kernel panic?
The only way to fix a kernel panic error is to do exactly that and restart your Mac. Fortunately, kernel panics are very rare these days and when they do occur, restarting your Mac may be all you need to do to never see one again.
If you suffer repeated kernel panics, however, you’ll need to investigate the cause and solve the problem — it could be a conflict between poorly written apps or services, or a problem with hardware. The software is the most likely culprit. But thanks to apps from Setapp, fixing problems with software and avoiding kernel panics is very easy.
Tools to fix Kernel Panic
A collection of tools that keeps your Mac from going grey. Get your hands on it and stay on the safe side.
Here’s how to vastly reduce your chances of needing to fix a kernel panic in the future.
Hardware
- Shut down your Mac and disconnect all hardware except your keyboard and mouse. If you use a third-party keyboard and mouse, swap them for the Apple versions, where possible. Restart your Mac. If your Mac runs ok and there are no more kernel panics, it’s likely a device connected to your Mac was to blame.
- Shut down your Mac again and re-connect one device. Restart your Mac. Repeat this process until you get another kernel panic. When that happens, you’ll know the last device you connected was the culprit. You can now either use your Mac without the device or check to see if it has updated drivers and install those, then try again with the device connected.
Software
- First, rule out a deep-rooted problem with macOS. Restart your Mac in safe mode by holding down the shift key when you restart. This disables login items, kernel extensions, and all fonts not used by the system. It also does a check of your startup drive’s directory structure. If you can reboot in safe mode and use your Mac without a kernel panic occurs, the likely cause of the problem is files installed by an application or a login item.
- If you experience a kernel panic in safe mode and you’ve ruled out a problem with hardware connected to your Mac, the problem could be your Mac’s basic hardware or system. Try doing a clean install of macOS, and starting from there.
- Assuming running in safe mode worked, you can reboot normally and use the techniques below to reduce the likelihood of experiencing a kernel panic in the future.
What’s causing Kernel Panic? Identify potential problems
It can be a million reasons why your Mac keeps restarting. The best way to identify what's wrong is use system monitoring app like iStat Menus. It makes it easy to track the performance of your Mac and see whether any applications are hogging resources, like CPU cycles or RAM.
- Launch iStat Menus, and set up monitoring.
- Use the Dashboard to choose which components you want to display in the menu bar. At the very least, choose CPU.
- Click on CPU in the menu bar to see which processes are consuming the most cycles — it’s an indication that an app or system component is having problems. If an app consistently uses a significant percentage of CPU cycles, uninstall it using CleanMyMac (see below) and reinstall it.
- It’s also a good idea to use the sensors tab to keep an eye on your Mac’s fans. An overheating Mac is likely to run into problems.
Uninstall applications with CleanMyMac
CleanMyMac allows you to easily uninstall problematic login items and applications.
To uninstall an application:
- Launch CleanMyMac (if you haven’t already installed it, launch Setapp, search for it and click Install).
- Click on Uninstaller in the Application section in the left-hand window. Navigate to the application you want to uninstall and click the checkbox next to it.
- Click Uninstall
To uninstall a login item:
- Click on Optimization in the Speed section, then Login Items.
- Navigate to the login item you want to uninstall and click the checkbox next to it.
- Click Perform.
You can do the same for System Preferences panes, browser extensions, audio plugins, and other system files. Before you attempt to remove something, however, make sure you know what it does and how its removal will affect your ability to use the application it is associated with.
Clean up your hard drive / SSD with Mac cleaning tools
While you’re troubleshooting and solving problems with your Mac, it’s a good idea to clean up its hard drive or SSD and remove duplicate files. There are a couple of apps available in Setapp that make this a breeze.
Disk Drill allows you to quickly identify files that are taking up lots of space on your drive and remove them. It’s quick and easy to do and can free up several gigabytes.
Gemini identifies duplicate files on your Mac and allows you to remove copies very easily. It’s a simple way to free up space on your Mac.
Cleaning up your hard drive or SSD is important because to have room for virtual memory, you need to keep at least 10% of your disk’s capacity free.
Find out how to use Disk Drill and Gemini to free up storage space on your Mac and reduce the chances of it having a kernel panic.
Try all these apps for free
Get a huge set of top apps for keeping your Mac in shape. Best utilities in one pack.
As you can see, kernel panics aren’t nearly as worrisome as they first appear. Following the process above, you can quickly fix the problem. Or, better still, you can take steps now to avoid one altogether.
If you’re reading this, there’s a good chance your Mac just suffered a kernel panic and you’re searching for what to do next. We’ve got the answer, and it’s simple: Don’t panic. Instead, take a deep breath, relax, and know that almost all kernel panics are transitory; events that aren’t likely to keep repeating. You don’t need to live in fear that in the next minute, your Mac will crash once again.
On the downside, you likely lost any unsaved work up to the point of the kernel panic. There’s a remote chance that some work may have been saved in the last Time Machine backup.
What a Kernel Panic Is
In UNIX-based operating systems, such as OS X and macOS, a panic is an unrecoverable error that was detected by the operating system kernel. It’s unrecoverable because the kernel, the basic heart of the operating system, can’t figure out how to get back on track. In essence, it’s lost, and not sure how it got here. When this occurs, the kernel runs the panic function code that tells it what to do in these situations. Unfortunately, about the best the kernel can do once it runs the panic code is collect some data about the current condition of the processors, and what processes were running, and then halt or restart your Mac.
(The older style kernel panic text stayed until you restarted your Mac.)In UNIX-based operating systems, such as OS X and macOS, a panic is an unrecoverable error that was detected by the operating system kernel. It’s unrecoverable because the kernel, the basic heart of the operating system, can’t figure out how to get back on track. In essence, it’s lost, and not sure how it got here. When this occurs, the kernel runs the panic function code that tells it what to do in these situations. Unfortunately, about the best the kernel can do once it runs the panic code is collect some data about the current condition of the processors, and what processes were running, and then halt or restart your Mac.
In OS X Lion and earlier, a panic resulted in the screen dimming and a message in multiple languages that said: “You need to restart your computer. Hold down the Power button for several seconds or press the restart button.” The message was white text on a black background.
OS X Mountain Lion changed the look and sequence by automatically restarting the Mac, and then displaying a text message similar to the one above, but with black text on a gray background.
What a Kernel Panic Is Not
Kernel panics are sometimes confused with application crashes, startup problems, or sustained beach balls. The big difference is that with a kernel panic, your Mac will display the kernel panic message as well as halt or restart on its own.
Kernel panics are sometimes confused with application crashes, startup problems, or sustained beach balls. The big difference is that with a kernel panic, your Mac will display the kernel panic message as well as halt or restart on its own.
Check for Recurring Kernel Panics
It’s a bit more difficult in the older versions of OS X to discover if the panic will recur; that’s because you really need to have the same conditions in place: the same apps running, and the same background processes; you also need to perform the same task that precipitated the panic, such as saving a file, loading a web page, or launching an app.
(Selecting Open will launch all the apps that were running when your Mac crashed.)It’s a bit more difficult in the older versions of OS X to discover if the panic will recur; that’s because you really need to have the same conditions in place: the same apps running, and the same background processes; you also need to perform the same task that precipitated the panic, such as saving a file, loading a web page, or launching an app.
With OS X Mountain Lion and later, your Mac saves the log of which apps and process were running, and will offer to reopen them when it restarts after a kernel panic. Simply click the Open button on the “You shut down your computer because of a problem.” dialog box when it’s presented during the login process.
Once your Mac has finished launching all the apps and processes, you should attempt to perform the same tasks you were involved in when the panic originally occurred. If there’s no panic after a reasonable amount of time, it’s probably not worth further troubleshooting attempts, and can just be chalked up to gremlins and ghosts.
Troubleshooting Recurring Kernel Panics
If, on the other hand, a kernel panic occurs soon after you click the Open button in the dialog box, you likely have a problem you need to track down.
If, on the other hand, a kernel panic occurs soon after you click the Open button in the dialog box, you likely have a problem you need to track down.
One of the options in the “Your computer was restarted because of a problem” dialog box is “More Info.” Pressing this button will cause the dialog box to expand and display the panic report, a detailed look at what occurred at the time of the panic.
(You can view the panic report, which includes details about the kernel panic.)
Don’t worry if you already dismissed the dialog box; you can view the panic log with the Console app, located at:
/Applications/Utilities/
Simply launch the Console app, then in the sidebar, select the System Reports item, and then select the Kernel Panic item (the actual name will include the terms kernel and panic, but it will also have the date and the name of your Mac in the title).
(The panic report includes the calling app that was likely involved in the kernel panic, as well as active kernel extensions.)Reading the Panic Report
The panic report includes the memory address and, in most cases, the name of the process that called for the panic function to be invoked. The calling process may be helpful, but it doesn’t always indicate what actually caused the event that led up to the panic; only the last process in the chain of events.
The panic report includes the memory address and, in most cases, the name of the process that called for the panic function to be invoked. The calling process may be helpful, but it doesn’t always indicate what actually caused the event that led up to the panic; only the last process in the chain of events.
Other important information in the panic report is the list of loaded kexts as well as the last loaded kext. Kexts are extensions to the kernel that can be used to add functionality to the operating system. Apple provides many different kexts, but so do some third-party developers. If the last loaded kext was from, say, a third-party system utility you installed, that may be a good indication of what caused the panic, or at least, what was involved in the panic.
Peripherals
Kernel panics can be caused by hardware as well as software. Checking for a hardware cause for a panic is fairly straightforward. Start by isolating all external peripherals you have connected to your Mac, except for the keyboard and mouse or trackpad.
Kernel panics can be caused by hardware as well as software. Checking for a hardware cause for a panic is fairly straightforward. Start by isolating all external peripherals you have connected to your Mac, except for the keyboard and mouse or trackpad.
Start your Mac in Safe Mode by holding down the shift key and pressing the power button. Keep pressing the shift key until your Mac finishes starting up.
If your Mac is able to start in Safe Mode, then its basic hardware is in good shape. Restart your Mac to leave Safe Mode. Once back in normal mode, try running a few apps. If everything is OK, then the kernel panic was likely a transitory event caused by an app or process in combination with another app, process, or device not getting along; it may also have been caused in part by one of the peripheral items you disconnected.
Shut down your Mac, reconnect a peripheral, and then restart your Mac. Try opening the same apps that were in use at the time of the panic. If everything seems OK, then shut down and connect the next peripheral. Continue the connect-and-test process until all your devices are reconnected.
If you find a device that causes a panic, check for updates to the device’s drivers, as well as updates to any apps that are involved.
Apps and Software
Just like you did for checking the Mac’s hardware, you can use Safe Mode to test for apps and other software that are causing the kernel panic. Safe Mode keeps startup items from being loaded, as well as third-party kexts and fonts (other than those used by the system). Once you’re running in Safe Mode, you can disable startup items by using the Users & Groups preference pane.
(Recurring panics can be caused by login items.)Just like you did for checking the Mac’s hardware, you can use Safe Mode to test for apps and other software that are causing the kernel panic. Safe Mode keeps startup items from being loaded, as well as third-party kexts and fonts (other than those used by the system). Once you’re running in Safe Mode, you can disable startup items by using the Users & Groups preference pane.
After you disable startup items, use Font Book to validate your installed fonts. If any fonts come up with errors, use Font Book to disable the indicated fonts.
Go ahead and restart normally. If no kernel panic occurs, add one of the startup items back, then restart. Repeat and test each startup item until all have been restored.
Internal Hardware
Your Mac’s internal hardware, including RAM and storage drives, can be a source of kernel panics. You can use Apple diagnostic routines to test your Mac. You’ll find instructions for how to do this in the Rocket Yard Guide: How to Run and Interpret Your Mac’s Built-in Diagnostic Routines.
Your Mac’s internal hardware, including RAM and storage drives, can be a source of kernel panics. You can use Apple diagnostic routines to test your Mac. You’ll find instructions for how to do this in the Rocket Yard Guide: How to Run and Interpret Your Mac’s Built-in Diagnostic Routines.
Reinstall the Mac OS
Because the OS can also be a source for kernel panics, usually due to corrupt system files, if you can’t resolve the panics, our last tip is to reinstall the OS. You can use the Recovery HD partition to perform the reinstall. Reinstalling the OS should replace any corrupt system files, while retaining user data and apps.
Because the OS can also be a source for kernel panics, usually due to corrupt system files, if you can’t resolve the panics, our last tip is to reinstall the OS. You can use the Recovery HD partition to perform the reinstall. Reinstalling the OS should replace any corrupt system files, while retaining user data and apps.
For more Rocket Yard guides and tricks, please visit our Tech Tips section.
Be Sociable, Share This!
OWC is on-site wind turbine powered at 8 Galaxy Way, Woodstock, IL 60098 | 1-800-275-4576 | +1-815-338-8685 (International)
All Rights Reserved, Copyright 2018, OWC – Since 1988