If you’ve used a computer for any length of time, you will have no doubt encountered the Blue Screen of Death, or a kernel panic, where the computer restarts without warning, costing you all your work.
What causes this to happen, and is there anything you can do to prevent it in future? Let’s take a look.
What Is a Kernel Panic and What Causes One?
A kernel panic, or its equivalent in the Windows world of a stop error or the dreaded Blue Screen of Death (BSOD), happens as the result of an unspecified low level error that an operating system cannot recover from.
The error is regarded as being more serious than a simple crashing app, and potentially damaging to the system or data.
As a result the operating system takes the decision to close everything down as a safety measure, and output error codes containing information about what exactly happened.
From the user’s perspective, all it means is that one minute you’re working as normal, and the next, your computer is restarting, and you’ve lost everything you’ve done since you last saved.
Windows — The Blue Screen Of Death
On Windows, you’ll know one has happened because the whole screen will turn blue, with a message stating that the computer needs to restart.
On OS X versions 10.8 and later. the computer simply restarts without any warning, followed by a brief message explaining what has happened. On 10.7 and earlier, the screen fades to black in a rather more alarming manner, with a message telling you to restart.
On Linux computers there’s also something called a kernel oops, where a serious error occurs that the operating system is able to deal with. The system will continue running, although it may cause instability and even lead to a full kernel panic, shown as a black screen full of code.
A kernel panic on Linux is not always preceded by a kernel oops.
The causes of a kernel panic or BSOD are many and varied, and they can be hardware or software-related.
Common causes include things like faulty RAM or malfunctioning peripherals, drivers or software plugins, or even badly written programs.
What To Do When You Get One
When you experience a kernel panic or BSOD, there’s not a lot you can do about it other than restart your computer and get back to work.
The kernel panic generates a log containing data that can help an engineer decipher what exactly has happened. Upon restarting, and depending on your operating system, you should be given the option to send this to the OS developer. You won’t get personalised support for the issue, but it will help them prevent kernel panics in future versions of the operating system.
It’s important to remember that a kernel panic is only a sign that an error occurred, not that there’s anything fundamentally wrong with your PC. Everyone will get them from time to time, and you can happily forget about it.
However, if you start to see them on a more regular basis — such as every couple of weeks — then you should try and identify what is causing them.
Troubleshooting A Kernel Panic
Each time a kernel panic occurs, a log will be created containing information about what happened. It’s mostly incomprehensible to the regular user, although a scan of the data can sometimes reveal a particular app that was at fault.
To view the log on Windows, you may need to download and install the Debugging Tool for Windows.
Mostly, though, you’ll just need to investigate some common causes to see if they are to blame.
When looking for possible causes of your kernel panics, the key is to try and identify any changes you’ve made to your system recently. Undoing these changes, and then re-enabling them one at a time, helps you to isolate a possible cause.
- Check the RAM: If you have upgraded the RAM in your computer, the first step is to check that it is seated properly. If the problem persists, remove the RAM you added. If that solves it, the RAM may be faulty, so contact your retailer for an exchange.
- Detach Peripherals: It isn’t just large add-ons like scanners and printers that can cause potential problems. A kernel panic can be caused by something as benign as a USB flash drive. Once you are confident that a particular device isn’t at fault, you can reconnect it.
- Check for Disk Errors: Run the disk repair software built into your computer’s operating system to ensure that disk errors are not causing your kernel panics. If the computer crashes as soon as it boots, you will need to either boot into the Recovery partition (usually F10 on Windows and Command + R on Mac; for Linux it depends on the distro being used) or boot from a disk or USB drive to carry out these diagnostic tasks.
If software is the cause of your kernel panic or Blue Screen of Death, you will tend to pick on which program it is over a period of time. Sometimes, though, applications running in the background, such as security software, may be the cause.
To diagnose software problems, boot into Safe Mode on Mac or Windows. This loads only the core elements of the operating system. Do this on Windows by holding F8 when you restart, and on Mac by holding the Shift key after you hear the startup chime. Linux doesn’t have a safe mode as such, only the recovery partition.
- Check Software and Startup Items: Check all your software is up to date, and also look at which programs are launching on boot. Disable any that you installed shortly before you started to experience kernel panics, then re-enable them in turn.
- Update the System: Download and install the latest updates for your operating system, as well as drivers for your hardware on Windows. If you’re testing a beta or preview versions of your operating system, these may not be stable so may be a cause of the problem.
- Use System Restore: If you make a lot of changes to your system, consider using System Restore or Time Machine to roll back to a time before the kernel panics occurred.
Can You Avoid Them in the Future?
Kernel panics and the Blue Screen of Death are pretty rare. You will inevitably experience them from time to time, but they aren’t usually indicative of a wider problem.
If you do start to see them on a regular basis, it’s almost always a direct result of a recent change you have made to your system. As such, they’re often relatively easy to diagnose and deal with.
There’s no way to avoid kernel panics, but so long as you’re prepared should you ever need to deal with them, there’s no need to worry either.
What are your experiences with the dreaded Blue Screen of Death? Have you found any hardware or software that has caused a kernel panic on your Mac? Let us know in the comments.