Microsoft Stop Code (Blue Screen of Death): Complete Troubleshooting Guide for All BSOD Errors
Fix Microsoft stop codes including IRQL_NOT_LESS_OR_EQUAL, MEMORY_MANAGEMENT, KERNEL_SECURITY_CHECK_FAILURE & more. Step-by-step BSOD fixes with commands.
- Microsoft stop codes (BSODs) are caused by driver conflicts, faulty RAM, corrupt system files, failing storage devices, or incompatible Windows updates — identifying the exact stop code from the QR code screen or Event Viewer is the critical first step.
- The most common stop codes — IRQL_NOT_LESS_OR_EQUAL, MEMORY_MANAGEMENT, KERNEL_SECURITY_CHECK_FAILURE, INACCESSIBLE_BOOT_DEVICE, BAD_POOL_CALLER, and DRIVER_POWER_STATE_FAILURE — each point to distinct hardware or software root causes that require targeted fixes.
- Quick fix summary: Boot into Safe Mode, run 'sfc /scannow' and 'DISM /Online /Cleanup-Image /RestoreHealth' to repair system files, use Windows Memory Diagnostic for RAM issues, roll back or update drivers via Device Manager, and use Startup Repair if the system won't boot — most BSODs are resolved within 30 minutes using these steps.
| Method | When to Use | Time | Risk |
|---|---|---|---|
| SFC + DISM Scan | Corrupt system files, after failed Windows Update BSOD | 15-30 min | Low |
| Driver Rollback / Update | IRQL_NOT_LESS_OR_EQUAL, DRIVER_POWER_STATE_FAILURE after driver install | 10-20 min | Low |
| Windows Memory Diagnostic | MEMORY_MANAGEMENT, BAD_POOL_CALLER, random BSODs | 30-60 min | None |
| Startup Repair (WinRE) | INACCESSIBLE_BOOT_DEVICE, 0xC000021A, system won't boot | 20-40 min | Low |
| Uninstall Recent Windows Update | BSOD started after a Windows Update | 15-20 min | Medium |
| CHKDSK /f /r | Inaccessible boot device, storage-related BSODs | 1-4 hours | Low |
| System Restore | BSOD after software or driver installation | 20-45 min | Medium |
| Reset / Reinstall Windows | Persistent BSOD with no other fix working | 2-4 hours | High (data loss risk) |
Understanding Microsoft Stop Codes (BSOD)
A Microsoft stop code — commonly called a Blue Screen of Death (BSOD) or bug check — is a critical system error that forces Windows to halt all operations to prevent data corruption or hardware damage. On modern Windows 10 and 11 systems, the error screen displays a sad face emoji, a stop code string (e.g., MEMORY_MANAGEMENT), and a scannable QR code that directs you to https://www.microsoft.com/stopcode for more information.
The green screen of death (GSOD) is a variant seen on Windows Insider preview builds and on Microsoft Surface devices running certain firmware, but it carries identical stop codes and is fixed the same way.
How to Read a Stop Code Screen
When a BSOD occurs, record the following before the PC restarts:
- Stop code string: e.g.,
KERNEL_SECURITY_CHECK_FAILURE - Faulting module: listed as
What failed:(e.g.,nvlddmkm.sys) - Hexadecimal code: e.g.,
0xc000021aor0x0000001E - QR code URL: always resolves to
https://www.microsoft.com/stopcodewith the specific code appended
If the system reboots too fast, disable automatic restart: go to System Properties → Advanced → Startup and Recovery → uncheck 'Automatically restart'.
Step 1: Identify the Stop Code via Event Viewer
If you missed the BSOD screen, open Event Viewer to find the stop code from the crash dump:
- Press
Win + X→ select Event Viewer - Navigate to Windows Logs → System
- Filter by Event ID 41 (unexpected shutdown) or Event ID 1001 (BugCheck)
- The Details tab shows the
BugcheckCodein decimal — convert to hex to match the stop code
Alternatively, open Windows PowerShell as Administrator and run:
Get-WinEvent -FilterHashtable @{LogName='System'; Id=41} | Select-Object -First 5 | Format-List
Step 2: Fix by Stop Code Type
IRQL_NOT_LESS_OR_EQUAL / DRIVER_IRQL_NOT_LESS_OR_EQUAL
This stop code means a driver or kernel process attempted to access memory at an incorrect interrupt request level (IRQL). It almost always points to a faulty or outdated driver.
Fix steps:
- Boot into Safe Mode (
Shift + Restart → Troubleshoot → Advanced Options → Startup Settings → F4) - Open Device Manager (
Win + X → Device Manager) - Look for devices with yellow warning icons — right-click → Update driver or Roll Back Driver
- If the faulting
.sysfile was shown on the BSOD (e.g.,netio.sys,nvlddmkm.sys), search its name to identify the associated driver - Use Driver Verifier (type
verifierin Run) to stress-test drivers and identify the culprit
MEMORY_MANAGEMENT (Microsoft Blue Screen Memory Management)
This indicates a severe memory management error, often caused by faulty RAM, corrupt page file, or storage issues.
Fix steps:
- Run Windows Memory Diagnostic:
Win + R → mdsched.exe → Restart now - If errors are found, reseat or replace RAM sticks
- Run
sfc /scannowandDISM /Online /Cleanup-Image /RestoreHealth - Increase or reset virtual memory: System Properties → Advanced → Performance Settings → Virtual Memory
KERNEL_SECURITY_CHECK_FAILURE
Indicates data corruption detected in kernel structures. Common causes: incompatible drivers, RAM errors, or malware.
Fix steps:
- Run SFC and DISM (see commands below)
- Run Windows Memory Diagnostic
- Run
chkdsk C: /f /rfrom elevated Command Prompt (schedule for next reboot) - Scan for malware with Windows Defender offline scan:
Windows Security → Virus & threat protection → Scan options → Microsoft Defender Offline scan
INACCESSIBLE_BOOT_DEVICE
Windows cannot access the partition it needs to boot from. Common after Windows Updates, driver changes, or storage controller changes.
Fix steps:
- Boot from Windows installation media → Troubleshoot → Advanced Options → Startup Repair
- If Startup Repair fails, open Command Prompt from WinRE and run:
bootrec /fixmbrbootrec /fixbootbootrec /scanosbootrec /rebuildbcd
- Ensure storage controller drivers (SATA/NVMe/AHCI) are set correctly in BIOS — do not switch AHCI to IDE after Windows installation
- Uninstall recent Windows Updates from WinRE if the issue started after an update
STOP CODE 0xC000021A / 0xC00021A / Microsoft Stop Code 21A
This critical error means the Windows subsystem (Winlogon or CSRSS) failed. It prevents Windows from starting.
Fix steps:
- Boot from Windows installation media → Startup Repair
- If unsuccessful, run from WinRE Command Prompt:
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windowsdism /image:C:\ /cleanup-image /restorehealth
- Check for third-party security software conflicts — antivirus hooking into winlogon can cause this
- If all else fails, perform an In-Place Upgrade Repair using Windows installation media
BAD_POOL_CALLER
A process or driver made an invalid pool allocation request. Typically caused by faulty drivers, RAM errors, or corrupt system files.
Fix steps:
- Uninstall recently installed software or drivers
- Run Windows Memory Diagnostic
- Run
sfc /scannow - Check for BIOS/firmware updates, especially on Microsoft Surface devices
DRIVER_POWER_STATE_FAILURE
A driver failed to complete a power transition (sleep/hibernate/wake). Common on laptops including Microsoft Surface and Surface Pro.
Fix steps:
- Update or roll back display, network, and chipset drivers
- Disable Fast Startup: Control Panel → Power Options → Choose what the power buttons do → Turn off fast startup
- Run
powercfg /energyfrom Command Prompt to generate an energy report identifying problem drivers - Update Surface firmware via Windows Update → Advanced Options → Optional Updates
Step 3: Universal Post-Fix Verification
After applying any fix:
- Enable Windows Update and install all pending updates
- Run
sfc /scannowone more time to confirm system file integrity - Monitor with Reliability Monitor (
Win + S → 'reliability') to track if BSODs recur - Use WhoCrashed (free third-party tool) to analyze minidump files at
C:\Windows\Minidump\for detailed driver attribution
Microsoft Surface-Specific BSOD Notes
Microsoft Surface and Surface Pro devices have firmware tightly integrated with Windows. Blue screens on Surface devices are often resolved by:
- Installing Surface firmware updates via Windows Update
- Performing a two-button shutdown: hold Power + Volume Down for 20 seconds
- Using the Surface Diagnostic Toolkit available from Microsoft Support
- Checking
https://support.microsoft.comfor device-specific advisories
Frequently Asked Questions
# ============================================================
# MICROSOFT STOP CODE DIAGNOSTIC & FIX COMMANDS
# Run all commands in Administrator Command Prompt or PowerShell
# ============================================================
# --- STEP 1: Check for corrupt system files ---
sfc /scannow
# --- STEP 2: Repair Windows component store (DISM) ---
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth
# --- STEP 3: Check disk for errors (schedules on next reboot for C: drive) ---
chkdsk C: /f /r /x
# --- STEP 4: View recent crash (BugCheck) events in PowerShell ---
Get-WinEvent -FilterHashtable @{LogName='System'; Id=41} | Select-Object -First 10 | Format-List TimeCreated, Message
Get-WinEvent -FilterHashtable @{LogName='System'; Id=1001} | Select-Object -First 10 | Format-List TimeCreated, Message
# --- STEP 5: List minidump files for analysis ---
dir C:\Windows\Minidump\
# --- STEP 6: Decode BugCheckCode from Event ID 41 (decimal to hex) ---
# Example: BugCheckCode = 26 decimal => 0x0000001A (MEMORY_MANAGEMENT)
$code = 26
"Stop Code Hex: 0x" + "{0:X8}" -f $code
# --- STEP 7: Check driver power state issues ---
powercfg /energy
powercfg /sleepstudy
# Reports saved to C:\Windows\System32\energy-report.html
# --- STEP 8: Enable Driver Verifier (for identifying faulty drivers) ---
# WARNING: Only use on test systems -- may cause intentional BSODs to catch bad drivers
verifier /standard /all
# To reset Driver Verifier after testing:
verifier /reset
# --- STEP 9: Boot repair commands (run from WinRE Command Prompt) ---
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd
# --- STEP 10: Offline SFC scan (run from WinRE when Windows won't start) ---
# Replace C: with your actual Windows drive letter if different
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
# --- STEP 11: Offline DISM repair (from WinRE Command Prompt) ---
dism /image:C:\ /cleanup-image /restorehealth
# --- STEP 12: Disable automatic restart on BSOD (run in normal Windows) ---
wmic recoveros set AutoReboot = False
# --- STEP 13: Run Windows Memory Diagnostic (schedules reboot test) ---
start mdsched.exe
# --- STEP 14: Analyze minidump with WinDbg (if installed from Microsoft Store) ---
# Open WinDbg, File > Open Crash Dump > navigate to C:\Windows\Minidump\
# Then run in WinDbg command window:
# !analyze -v
# --- STEP 15: Check for Surface firmware updates via PowerShell ---
Get-WindowsUpdate -Category "Drivers" | Where-Object {$_.Title -like "*Surface*"} | Format-Table Title, KB, SizeError Medic Editorial
Error Medic Editorial is a team of senior DevOps engineers, SREs, and Windows system administrators with over a decade of experience diagnosing critical system failures across enterprise and consumer environments. Our guides are based on real incident postmortems, official Microsoft documentation, and hands-on testing of every fix procedure we publish. We specialize in translating cryptic stop codes and kernel errors into actionable, step-by-step remediation guides.
Sources
- https://support.microsoft.com/en-us/windows/troubleshoot-blue-screen-errors-5c62a79a-27d4-5f3c-e9e4-07bbf5a21f0a
- https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-code-reference
- https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-0x0000001a--memory-management
- https://support.microsoft.com/en-us/surface/surface-diagnostic-toolkit-for-business-90971c6e-22ef-42d2-8dd6-5db0cba72ad7
- https://answers.microsoft.com/en-us/windows/forum/all/blue-screen-with-stop-code/
- https://learn.microsoft.com/en-us/windows/client-management/troubleshoot-stop-errors