As night follows day, a PC will go wrong and although modern machines do a reasonable job of hauling themselves out of trouble, you know there’s a serious problem when the Blue Screen of Death (BSOD) appears instead of the Windows wallpaper. If you’re lucky, the BSOD will give you a hint as to what has gone wrong in the form of a Windows Stop Code. Here are some tips on what to do when BSODs strike and what to do with Windows Stop Codes.
What are Windows Stop Codes?
Simply, Windows Stop Codes are Microsoft’s way of trying to be helpful in much the same way that a toddler tries to be helpful by cleaning a laptop screen with strawberry jam. Despite Windows approaching its forties, Windows Stop Codes have evolved no further than being an informative but not necessarily useful way of troubleshooting problems. Codes appear as basic text string (IRQL_NOT_LESS_OR_EQUAL) or as a HEX code (0xC000021A) and from these, the customer must decipher a solution.
Why do Windows Stop Codes appear?
Hidden beneath the apps running on your PC are hundreds of processes which make Windows functional. A Windows Stop Code is usually a sign that one or many of the critical processes has suffered some type of failure and the BSOD is the Microsoft way of letting you know. Updates, hardware faults or software incompatibilities introduced into your system can affect critical processes and quickly reduce your machine’s functionality. In more serious cases, your PC will not start, but enough doom and gloom, let’s crack open the toolbox and see what we can do.
How to fix a Window’s Stop Code error
We’re approaching this article with a general, broad-brush approach. The tips below will resolve many BSODs, but not every single one. Having spent 20 years as a PC repair professional, please believe me when I say that there comes a point where, for the sake of one’s sanity or productivity, it’s better to give in and reformat the machine. We’ll also focus mainly on BSODs, which are showstoppers, preventing your machine from booting.
If you have a machine encrypted by BitLocker, you may need the decryption key in order to access certain parts of the PC’s back end. Additionally, grab a decent sized USB stick and beg, borrow or steal access to a working machine. Some of the fixes below will require bootable tools to work the resurrection magic, so it will be handy to know how to change the boot order of your PC. Pressing a key during boot is the most common way, so try Delete, Escape, F2, F10 and F12. If this extensively researched selection of options fails, then have a look at our How do I enter the BIOS on my PC? for other suggestions.
Look at the information on the screen
When a BSOD appears, make a note of the Windows Stop Code, as it may actually give a hint to the cause of the issue. A simple example is MEMORY_MANAGEMENT, which is an unsubtle hint that something could be awry in the RAM department. Let’s begin with a quick RAM test because if your memory can no longer count to ten, then no amount of software fixes will rid you of BSODs.
How to test RAM with MemTest86
My preferred way is to use a free utility from Passmark called MemTest86. Extract the content from the Zip file and install imageUSB.exe which will build a bootable USB. Insert your USB stick, run the software and ensure that imageUSB is pointing at the memtest86-usb.img file (it should automatically detect this). Click Write, and a few minutes later, you’ll be the proud owner of a bootable memory tester. Use it to boot the cronked machine (by liberally bashing whichever key you discovered earlier) and run a few cycles of the test.
If a fault is detected, then a bit of RAM replacement will tell you if this caused the Windows Stop Code. However, if your RAM is the epitome of health, it’s time to try something else.
How to enter the Windows Recovery Environment
The Windows Recovery Environment (WinRE) is part of the Windows operating system and enables us to repair things when Windows Stop Codes appear. It’s a vital tool in troubleshooting and if you have a non-booting PC, there are two ways of entering it. The first is devilishly simple, if somewhat clunky.
Turn on the PC, then wait for the Windows logo to appear, then press and hold the power button. This will interrupt the boot process and power off the PC. Repeat. On the third boot, Windows will detect that something is wrong and, if it can, drop into WinRE.
If this doesn’t work, another method is by building a USB Windows boot tool. Grab your trusty USB stick and head over to our How can I create a Windows 10 USB boot device? guide – it’s the same method for Windows 11, but you’ll need to visit this webpage.
From WinRE, we can deliver several fixes which should resolve whatever your Windows Stop Code is whinging about and let you get some work done.
If we roll your PC back in time, we might get a quick result. Boot the machine into the WinRE environment (as discussed above) then click Troubleshoot then Advanced options.
Select System Restore. This function works by saving little snapshots of your PC at certain intervals. If you’ve ever wondered why your machine is sometimes sluggish when installing software, then it’s normally due to a System Restore point being created. Your machine will keep a library of these points (depending on your PC’s configuration) which allows us to reverse recent events on the machine and, hopefully, restore harmony. Critically, System Restore does not delete files, pictures, music, but may remove software and apps.
On the first System Restore Screen, it’ll summarise what I mentioned earlier. Click Next.
Choose the point in time (or state) which you wish to return to, then click Next. In our example, we only have one, but you may have several, so choose one with a date and time from when the machine worked. System Restore will ask you to confirm your choice by selecting Finish, then Yes on the final warning box. Depending on the speed of your machine and the size of the snapshots, this process can take up to a few hours, so just leave it running and go an amuse yourself.
If you’re lucky, System Restore will proudly announce that the process completed successfully and that you can press Restart to reboot the computer. If success didn’t come your way and the BSOD still haunts you, then move onto our next fix.
How to get into Windows Safe Mode
Remember, good old Safe Mode? How we used to tap away on the F8 key and await the menu to appear. While the good news is that the menu is still there, but we have to go through the nonsense of WinRE to find it. If the machine will successfully boot into Safe Mode, the strategy is to uninstall the last piece of software on the machine. Let’s begin by booting the machine into WinRE.
Select Troubleshoot, then Advanced Options then Startup Settings and finally, Restart.
The next screen gives you a few variations of Safe Mode to work with. Personally, I’d begin by selecting 4, 5 or 6 to see if these will grant access to workable Windows environment. If so, uninstall the last app which you installed. Restart and cross your fingers. If it fails, try some of the other Safe Mode options, but if none of them seem to work for you, let’s try an alternative strategy.
Chkdsk and SFC
These two commands are the Ant & Dec of computer repair. They work as a pair but individually do sort of the same thing and achieve great things together. Once again, boot the machine into WinRE, then select Troubleshoot, then Advanced Options and finally, Command Prompt.
A large window will open with a black background and a flashing white cursor. There’s no beautifully rendered graphical interface for ChkDsk and SFC. This is now getting serious and we need fingers, not mice. WinRE has opened a Command Prompt window (CMD.exe) and dropped us to the X: drive, which is actually the location of the WinRE files and certainly not the drive we need to work on. We need to play hunt the disk partition. Type DISKPART and press the Enter key. The DiskPart command will take a few moments to run, but present a flashing cursor when ready. Type list vol then press Enter.
Basically, we’re looking for the boot drive in order to repair it. Nearly always, it will be listed (in the Ltr column) as C, but WinRE can occasionally juggle the drive allocations. In our screenshot, Volume 1: C is our target, which we can also see is a partition formatted as NTFS and isn’t set as Hidden. Make a note of your partition because you’ll need it to run the commands. We’ll begin with Chkdsk.
How do I run Chkdsk?
From our command window, run:
Chkdsk C: /f /r /x
Don’t forget to substitute your drive letter for C. Chkdsk is a contraction of Check Disk, and it will whizz through the partition looking for problems in the file structure, orphaned files and other things which are out of place. Microsoft has a page of Chkdsk parameters which can be used, but we’ve chosen three:
/f instructs chkdsk to fix any errors that it finds.
/r will force it to find bad sectors on the drive and recover readable information.
To enable these parameters to run, /x unlocks the drive.
This process can take a long time to run if you have a large and/or slow hard drive. It’s not unusual for me to run this command overnight. When it is finished, chkdsk will display a summary, listing any problems that it has fixed. At this point, we could try a restart to see if the machine will reboot, but we may as well run the SFC command – System File Checker.
How do I to run SFC?
SFC is another versatile tool with a page full of parameters. It’s superpower is to run through a Windows system, looking for problematic files and attempt a repair. There are many ways of running it and I’m going to show you two. Type the following into the command window:
sfc /scannow /offbootdir=C:\ /offwindir=C:\windows
Press Enter (after substituting the drive letter). This command runs SFC with three parameters.
/scannow whips through all the system files, repairing anything it can.
/offbootdit=c:\ tells SFC where the boot directory is located.
/offwindir=C:\windows explicitly indicates where the Windows system files are located. Like ChkDsk, this process can take some time to complete.
Using SFC to fix a specific file
If your particular Windows Stop Code displayed a specific file name within the error information, then it’s simple to point SFC at this file to see what it thinks. In this example, we’ll use SFC to have a chat with kernel32.dll, located within C:\windows\system32
The command to run is:
sfc /scanfile=C:\Windows\System32\Kernel32.dll /offbootdir=C:\ /offwindir=C:\Windows
This should run rapidly, and hopefully something which you’ve done will help. Type Exit and press enter then select Turn off your PC. When it’s shut down, engage a positive mindset and hit the power button. If the BSOD still haunts you, then we have another fix for you.
How do I run a DISM scan from WinRE?
DISM is the Microsoft Deployment Image Servicing and Management Tool and it’s awfully useful in sorting our problems. As before, boot the machine into WinRE then select Troubleshoot, then Advanced Options and finally, Command Prompt.
For this trick, you’ll need to create the Windows USB boot tool. If you still have the one from earlier, great, if you missed that one, take a trip to our How can I create a Windows 10 USB boot device? guide – it’s the same method for Windows 11, but using this installer.
We’ll need to know which drive letter the WinRE has allocated the Windows USB stick. Type DISKPART and press Enter and when it allows, type list vol then press Enter.
In our example, it listed our Windows boot drive as D: and our USB Stick, E:
Type exit to quit DiskPart then input the following code, but switch in the drive letters to match your setup.
dism /image:D: /cleanup-image /restoreHealth /source:wim:e:\sources\install.wim:1 /limitaccess
This runs the DISM with five parameters (of which there are many more). Basically, the DISM command will check the /image on D: by cleaning it up (/cleanup-image) and fixing any issues (/restorehealth). It does this by using a fresh image of Windows via the USB stick (/source:wim:e:\sources\install.wim:1) and not any other resource (/limitaccess).
Once again, this can take a little while to process, but the DISM command will tell you when it’s finished. You can then reboot your PC with joy and optimism.
Still here, eh? I’ll be honest, I’m not surprised. I’ve been in the PC repair game for a long time and BSODs are frustrating. Still, we have a few other things to try. These last tips won’t resolve the issue, but they’ll give you more information about what is happening inside your machine, enabling you to research another solution.
Very often, when a Windows Stop Code is generated, the PC creates a small memory dump file which can be analysed. To do this, we need to remove the files from the PC generating Windows Stop Codes and load up some software on a working machine. First, let’s grab the files.
I’m sure you’re getting used to this, but boot the machine into WinRE, then select Troubleshoot, then Advanced Options and finally, Command Prompt. Once again, we need to know which drive letters we’re dealing with, so insert a USB to copy the files off the machine and then type DISKPART into the Command Prompt window. Press Enter and when it allows, type list vol and press Enter again.
This time, our boot drive is C: and the USB drive is D: so swap your drive letters accordingly in the following commands. Type exit to escape DiskPart then navigate to the MiniDump repository by typing:
Then press Enter. If you’re wondering, cd means change directory, which is an archaic word the computing world used to describe folders.
The command to copy all the minidump files is straightforward. Type:
copy *.* d:
Then press Enter. This command means copy everything in the folder to the USB stick (D:).
Using WinDbg to analyse Windows Stop Codes
On a working machine, open the Microsoft Store and type WinDbg in the search. There may be a couple of similar sounding apps, so ensure if the one created by Microsoft or click this link to be taken directly there. Click Get and then Open once the app has downloaded.
This is a developer level tool, but we can use its basic functions to give us a hint as to what could be causing your Windows Stop Code.
From the main menu, select File and then open dump file from the Start Debugging menu. When the file browser opens, point it at the MiniDump files you copied to the USB stick. You may have more than one, and if you glance at their filenames, you’ll notice that the first six characters are a timestamp in US date format (MMDDYY). Pick the most recent one and select Open.
WinDBG will download a lot of information to help it interrogate the file. When it’s finished, click on !analyze -v (which will be in blue) and the analysis will begin.
A vast amount of information will be presented, but scroll around until you spot Bugcheck Analysis. Beneath this should be a clue as to what caused that particular BSOD. In our example, WinDBG noted:
The power policy manager experienced a fatal error.
Ok, it’s not a solution, but it’s more information to work out what’s causing the issues. This one is probably just that the hibernation file size is too small. If nothing useful appeared or WinDBG isn’t working for you, I have an alternative.
How to use BlueScreenView to view a Minidump file
BlueScreenView has been an essential part of a technician’s toolbox ever since I began. It can be downloaded for free from NirSoft’s website. Install the software and it will automatically analyse any minidump files found in the default location. Of course, these aren’t the ones we want, so click Options then Advanced Options. Select Load a single MiniDump File and then Browse. Point the file browser at the USB stick and chose a file and then select Open.
In our example, BlueScreenView displays the same information, but in a different format. It too is blaming our Windows Stop Code problems on an INTERNAL_POWER_ERROR. The is a critical piece of information to seek the next stage of the solution.
Wait a minute, my machine still isn’t working!
I’ll be honest, I’m not surprised. If you’ve got this far, then frankly you need an award, never mind a functioning machine. There are many more fixes I can suggest to analyse Windows Stop Codes, but they’re staggeringly complicated and time consuming. Take it from someone who has fixed more PCs than is healthy, sometimes it’s time to let it go. From my experience, there are many times when the source of the BSOD remains elusive. There comes a point when it’s better for the blood pressure to either send it to a computer professional or simply backup the PC and reset it.
Use Ubuntu to backup my PC
If you’re up for a reset, visit Ubuntu where they have a guide on how to create a bootable Ubuntu environment, this’ll allow you to copy your files from the ailing Windows drive before you wipe the drive and start again.
I’m also willing to wager that the in-built Windows Reset feature will also fail. It’s no good even when a machine isn’t clinging to life. We have a great guide on how to install Windows 11. The procedure is virtually identical if you want Windows 10 except you’ll need a to use these instructions to create the USB stick.