Microsoft Stop Code (Blue Screen of Death): Complete Troubleshooting Guide for All BSOD Errors
Fix Microsoft stop codes like 0xc000021a, IRQL_NOT_LESS_OR_EQUAL, and more. Step-by-step BSOD troubleshooting guide with real commands and fixes.
- Microsoft stop codes (BSODs) are triggered by critical kernel-level failures including faulty drivers, corrupted system files, hardware errors, or bad memory modules.
- Common stop codes include 0xc000021a (critical system process failure), IRQL_NOT_LESS_OR_EQUAL (driver memory access violation), MEMORY_MANAGEMENT (RAM or virtual memory corruption), KERNEL_SECURITY_CHECK_FAILURE (kernel data structure corruption), and INACCESSIBLE_BOOT_DEVICE (boot partition not readable).
- Most BSODs can be resolved by running Windows Memory Diagnostic, SFC /scannow, DISM health restore, updating or rolling back drivers, and checking disk health with chkdsk — all accessible via Safe Mode or Windows Recovery Environment (WinRE).
| Method | When to Use | Time | Risk |
|---|---|---|---|
| SFC /scannow + DISM RestoreHealth | Corrupted system files causing stop codes like 0xc000021a or MEMORY_MANAGEMENT | 15–30 min | Low |
| Driver Rollback / Update | IRQL_NOT_LESS_OR_EQUAL or DRIVER_POWER_STATE_FAILURE after hardware or Windows Update | 10–20 min | Low |
| Windows Memory Diagnostic | MEMORY_MANAGEMENT or BAD_POOL_CALLER stop codes with suspected RAM issues | 20–60 min | None |
| CHKDSK /f /r | INACCESSIBLE_BOOT_DEVICE or disk-related stop codes | 30–120 min | Low (requires restart) |
| System Restore | Stop code appeared after a recent change, update, or installation | 20–40 min | Medium (reverts changes) |
| Startup Repair via WinRE | PC cannot boot to Windows at all; persistent BSOD on startup | 15–45 min | Low |
| Reset This PC / Reinstall Windows | All other methods failed; severe system corruption | 1–3 hours | High (data loss possible) |
Understanding Microsoft Stop Codes
A Microsoft stop code — commonly known as a Blue Screen of Death (BSOD) or, in newer Windows versions, a Blue Screen with a QR code — indicates that Windows has encountered a critical error it cannot safely recover from. The system halts to prevent further damage. On Windows 10 and 11, the screen displays a sad face emoji, a brief description, a stop code string (e.g., MEMORY_MANAGEMENT), and a QR code you can scan for Microsoft's support page at https://www.microsoft.com/stopcode or https://windows.microsoft.com/stopcode.
On Microsoft Surface devices (including Surface Pro), BSODs can also be caused by firmware bugs, thermal throttling, or driver conflicts unique to Surface hardware.
Most Common Microsoft Stop Codes and Their Causes
1. 0xc000021a / 0xc00021a / Stop Code 21a
Full error: STOP: c000021a {Fatal System Error}. This occurs when the Windows Session Manager (smss.exe) or Client/Server Runtime (csrss.exe) fails. Common triggers: corrupted Windows update, bad third-party software, or registry damage.
2. IRQL_NOT_LESS_OR_EQUAL / DRIVER_IRQL_NOT_LESS_OR_EQUAL A driver attempted to access pageable memory at a process IRQL that was too high. Usually caused by a faulty, outdated, or incompatible device driver.
3. MEMORY_MANAGEMENT Indicates a serious memory subsystem error. Causes include faulty RAM sticks, corrupted virtual memory, or a failing hard drive.
4. BAD_POOL_CALLER A kernel-mode process made an invalid pool allocation request. Often caused by buggy drivers or corrupted system files.
5. KERNEL_SECURITY_CHECK_FAILURE A kernel data structure integrity check failed. Commonly triggered by incompatible drivers, malware, or RAM errors.
6. INACCESSIBLE_BOOT_DEVICE Windows cannot access the boot partition during startup. Causes include corrupted boot sector, missing storage drivers, or failed Windows update.
7. DRIVER_POWER_STATE_FAILURE A driver did not complete a power-state transition in time. Often occurs after sleep/hibernate cycles and is usually driver-related.
Step 1: Capture the Stop Code and Crash Dump
Before fixing anything, identify the exact stop code. If Windows reboots too fast:
- Go to Settings > System > About > Advanced system settings > Startup and Recovery > Settings.
- Uncheck Automatically restart so the BSOD stays visible.
- Note the stop code displayed on the blue screen.
Alternatively, read crash dumps using Event Viewer or WinDbg:
- Open Event Viewer > Windows Logs > System and filter for Critical errors.
- Use WinDbg or the free WhoCrashed tool to analyze minidump files located at
C:\Windows\Minidump\.
Step 2: Boot into Safe Mode or WinRE
If Windows won't start normally, access the Windows Recovery Environment (WinRE):
- Force-shutdown your PC 3 times during boot to trigger Automatic Repair mode.
- From Automatic Repair, choose Advanced options > Troubleshoot > Advanced options > Startup Settings > Restart, then press 4 for Safe Mode.
On Microsoft Surface or Surface Pro:
- Hold Volume Down + Power for 15 seconds to force shutdown, then boot normally into WinRE after two failed starts.
Step 3: Run System File Checker and DISM
From an elevated Command Prompt (run as Administrator):
sfc /scannow
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth
Restart after completion and check if the stop code recurs.
Step 4: Check and Repair the Disk
Run CHKDSK to detect and repair disk errors:
chkdsk C: /f /r /x
You will be prompted to schedule this for the next restart. Type Y and restart. This is especially important for INACCESSIBLE_BOOT_DEVICE errors.
Step 5: Test Your RAM
For MEMORY_MANAGEMENT or BAD_POOL_CALLER stop codes:
- Press Win + R, type
mdsched.exe, and press Enter. - Choose Restart now and check for problems.
- Windows will run two full passes of memory tests.
For more thorough testing, use MemTest86 (bootable from USB) for extended overnight testing.
Step 6: Update or Roll Back Drivers
For IRQL_NOT_LESS_OR_EQUAL, DRIVER_IRQL_NOT_LESS_OR_EQUAL, or DRIVER_POWER_STATE_FAILURE:
- Open Device Manager (devmgmt.msc).
- Look for devices with yellow warning icons.
- Right-click the suspect device > Update driver or Roll back driver.
To identify the specific faulty driver from a minidump, use WinDbg:
!analyze -v
This will output the name of the offending .sys file.
For Microsoft Surface devices, always get drivers from the official Microsoft Surface Update or through Windows Update rather than third-party sources.
Step 7: Fix 0xc000021a Specifically
This stop code often requires WinRE. Boot into WinRE and open Command Prompt:
bcdedit /set {default} safeboot minimal
Restart into Safe Mode, then:
net stop wuauserv
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
net start wuauserv
sfc /scannow
If the issue followed a Windows Update, use System Restore:
- WinRE > Advanced options > System Restore > pick a restore point before the update.
Step 8: Address Microsoft Teams Blue Screen
If the BSOD occurs specifically when Microsoft Teams is running, this is often caused by a conflict between Teams' hardware acceleration and a display or audio driver:
- Open Teams > Settings > General > Disable GPU hardware acceleration.
- Update your graphics driver from the manufacturer's website (NVIDIA, AMD, or Intel).
- Reinstall Teams using the Teams bootstrapper rather than the store version.
Step 9: Microsoft Update Blue Screen Recovery
If a Windows Update caused the BSOD:
- Boot into WinRE > Troubleshoot > Advanced options > Uninstall Updates.
- Choose Uninstall latest quality update or Uninstall latest feature update.
- After unbooting, pause Windows Updates temporarily while you investigate the problematic update KB article.
Step 10: Last Resort — Reset or Reinstall Windows
If all above steps fail:
- Go to Settings > System > Recovery > Reset this PC.
- Choose Keep my files for a non-destructive reset, or Remove everything for a full clean reinstall.
For a clean install on Surface devices, download the Surface Recovery Image from the Microsoft website and flash it via USB.
Microsoft Green Screen of Death (GSOD)
Windows Insider Preview builds display a Green Screen of Death instead of blue. It functions identically to a BSOD — same stop codes, same troubleshooting steps. The green color simply identifies it as occurring on an Insider/preview build of Windows.
Using the Microsoft QR Code on BSOD
Modern Windows 10/11 BSODs display a QR code. Scanning it takes you to https://www.microsoft.com/stopcode (also accessible as https://windows.microsoft.com/stopcode, https://microsoft.com/stopcode, or https://www.microsoft stopcode). This page redirects to Microsoft's official BSOD support documentation and is a good starting reference point.
Frequently Asked Questions
# ============================================================
# MICROSOFT STOP CODE (BSOD) DIAGNOSTIC & FIX SCRIPT
# Run all commands in an elevated Command Prompt (Admin)
# ============================================================
# --- STEP 1: Disable automatic restart to capture stop code ---
# Run in PowerShell (Admin):
# Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl' -Name 'AutoReboot' -Value 0
# --- STEP 2: Check system file integrity ---
sfc /scannow
# --- STEP 3: Repair Windows image with DISM ---
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth
# --- STEP 4: Repair disk errors (schedule for next reboot) ---
chkdsk C: /f /r /x
# Type Y when prompted, then restart
# --- STEP 5: Run Memory Diagnostic ---
mdsched.exe
# GUI will open -- choose "Restart now and check for problems"
# --- STEP 6: View recent BSOD events in Event Viewer ---
wevtutil qe System /q:"*[System[Provider[@Name='Microsoft-Windows-WER-SystemErrorReporting'] and (Level=1 or Level=2)]]" /f:text /c:10
# --- STEP 7: List minidump files for WinDbg analysis ---
dir C:\Windows\Minidump\ /od
# --- STEP 8: Export last 50 System log errors to CSV ---
Get-WinEvent -LogName System -MaxEvents 50 | Where-Object { $_.LevelDisplayName -eq 'Critical' -or $_.LevelDisplayName -eq 'Error' } | Export-Csv -Path C:\bsod_events.csv -NoTypeInformation
# --- STEP 9: Fix 0xc000021a -- reset boot config ---
bcdedit /set {default} recoveryenabled yes
bcdedit /set {default} bootstatuspolicy ignoreallfailures
# --- STEP 10: Clear Windows Update cache (run in Safe Mode if needed) ---
net stop wuauserv
net stop cryptSvc
net stop bits
net stop msiserver
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
ren C:\Windows\System32\catroot2 catroot2.old
net start wuauserv
net start cryptSvc
net start bits
net start msiserver
# --- STEP 11: Scan for driver issues with verifier (use carefully) ---
# This will stress-test all non-Microsoft drivers:
# verifier /standard /all
# To disable verifier after testing:
# verifier /reset
# --- STEP 12: Check disk health (PowerShell) ---
Get-PhysicalDisk | Get-StorageReliabilityCounter | Select-Object DeviceId, ReadErrorsTotal, WriteErrorsTotal, Temperature, Wear
# ============================================================
# After running these commands, restart and check if BSOD recurs.
# If BSOD persists, analyze C:\Windows\Minidump\ with WinDbg:
# !analyze -v
# ============================================================Error Medic Editorial
The Error Medic Editorial team is composed of senior DevOps engineers, SREs, and Windows system administrators with over a decade of experience diagnosing and resolving OS-level failures, BSOD stop codes, driver conflicts, and enterprise Windows deployments. We specialize in translating complex kernel errors into actionable troubleshooting steps for developers and IT professionals.
Sources
- https://support.microsoft.com/en-us/windows/troubleshoot-blue-screen-errors-5c62a15a-8be4-4197-b92b-2c3b7e8b6e2b
- https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-code-reference2
- https://learn.microsoft.com/en-us/windows/client-management/windows-10-stop-error-troubleshooting
- https://answers.microsoft.com/en-us/windows/forum/all/blue-screen-of-death-bsod/
- https://stackoverflow.com/questions/tagged/bsod
- https://www.microsoft.com/en-us/surface/support/warranty-service-and-recovery/recovery-image