Error Medic

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.

Last updated:
Last verified:
2,154 words
Key Takeaways
  • 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.
Fix Approaches Compared
MethodWhen to UseTimeRisk
SFC + DISM ScanCorrupt system files, after failed Windows Update BSOD15-30 minLow
Driver Rollback / UpdateIRQL_NOT_LESS_OR_EQUAL, DRIVER_POWER_STATE_FAILURE after driver install10-20 minLow
Windows Memory DiagnosticMEMORY_MANAGEMENT, BAD_POOL_CALLER, random BSODs30-60 minNone
Startup Repair (WinRE)INACCESSIBLE_BOOT_DEVICE, 0xC000021A, system won't boot20-40 minLow
Uninstall Recent Windows UpdateBSOD started after a Windows Update15-20 minMedium
CHKDSK /f /rInaccessible boot device, storage-related BSODs1-4 hoursLow
System RestoreBSOD after software or driver installation20-45 minMedium
Reset / Reinstall WindowsPersistent BSOD with no other fix working2-4 hoursHigh (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., 0xc000021a or 0x0000001E
  • QR code URL: always resolves to https://www.microsoft.com/stopcode with 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:

  1. Press Win + X → select Event Viewer
  2. Navigate to Windows Logs → System
  3. Filter by Event ID 41 (unexpected shutdown) or Event ID 1001 (BugCheck)
  4. The Details tab shows the BugcheckCode in 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:

  1. Boot into Safe Mode (Shift + Restart → Troubleshoot → Advanced Options → Startup Settings → F4)
  2. Open Device Manager (Win + X → Device Manager)
  3. Look for devices with yellow warning icons — right-click → Update driver or Roll Back Driver
  4. If the faulting .sys file was shown on the BSOD (e.g., netio.sys, nvlddmkm.sys), search its name to identify the associated driver
  5. Use Driver Verifier (type verifier in 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:

  1. Run Windows Memory Diagnostic: Win + R → mdsched.exe → Restart now
  2. If errors are found, reseat or replace RAM sticks
  3. Run sfc /scannow and DISM /Online /Cleanup-Image /RestoreHealth
  4. 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:

  1. Run SFC and DISM (see commands below)
  2. Run Windows Memory Diagnostic
  3. Run chkdsk C: /f /r from elevated Command Prompt (schedule for next reboot)
  4. 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:

  1. Boot from Windows installation media → Troubleshoot → Advanced Options → Startup Repair
  2. If Startup Repair fails, open Command Prompt from WinRE and run:
    • bootrec /fixmbr
    • bootrec /fixboot
    • bootrec /scanos
    • bootrec /rebuildbcd
  3. Ensure storage controller drivers (SATA/NVMe/AHCI) are set correctly in BIOS — do not switch AHCI to IDE after Windows installation
  4. 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:

  1. Boot from Windows installation media → Startup Repair
  2. If unsuccessful, run from WinRE Command Prompt:
    • sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
    • dism /image:C:\ /cleanup-image /restorehealth
  3. Check for third-party security software conflicts — antivirus hooking into winlogon can cause this
  4. 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:

  1. Uninstall recently installed software or drivers
  2. Run Windows Memory Diagnostic
  3. Run sfc /scannow
  4. 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:

  1. Update or roll back display, network, and chipset drivers
  2. Disable Fast Startup: Control Panel → Power Options → Choose what the power buttons do → Turn off fast startup
  3. Run powercfg /energy from Command Prompt to generate an energy report identifying problem drivers
  4. Update Surface firmware via Windows Update → Advanced Options → Optional Updates

Step 3: Universal Post-Fix Verification

After applying any fix:

  1. Enable Windows Update and install all pending updates
  2. Run sfc /scannow one more time to confirm system file integrity
  3. Monitor with Reliability Monitor (Win + S → 'reliability') to track if BSODs recur
  4. 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.com for device-specific advisories

Frequently Asked Questions

bash
# ============================================================
# 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, Size
E

Error 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

Related Articles in Microsoft

Explore More windows Guides