Error Medic

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, KERNEL_SECURITY_CHECK_FAILURE & more. Step-by-step BSOD repair guide with real commands.

Last updated:
Last verified:
2,196 words
Key Takeaways
  • Microsoft stop codes (BSODs) are triggered by hardware failures, corrupt drivers, faulty RAM, incompatible software, or corrupted system files — each stop code points to a specific root cause.
  • Common stop codes include 0xc000021a (critical system process failure), IRQL_NOT_LESS_OR_EQUAL (driver memory access violation), KERNEL_SECURITY_CHECK_FAILURE (corrupt driver or hardware), MEMORY_MANAGEMENT, BAD_POOL_CALLER, and INACCESSIBLE_BOOT_DEVICE.
  • Most BSODs can be resolved by running SFC /scannow and DISM, updating or rolling back drivers, checking RAM with Windows Memory Diagnostic, and using Windows Recovery Environment (WinRE) for boot-loop situations — visit https://www.microsoft.com/stopcode for official QR-code stop code lookups.
Fix Approaches Compared
MethodWhen to UseTimeRisk
SFC /scannow + DISMCorrupted system files causing random BSODs10-30 minLow
Driver rollback / updateBSOD after Windows Update or new hardware install5-20 minLow
Windows Memory DiagnosticMEMORY_MANAGEMENT or BAD_POOL_CALLER stop codes30-60 minLow
System RestoreBSOD appeared after a recent software/driver change15-30 minLow-Medium
Startup Repair (WinRE)INACCESSIBLE_BOOT_DEVICE or 0xc000021a boot loops15-45 minLow-Medium
chkdsk /f /rDisk errors suspected, storage-related stop codes60-180 minMedium
Clean Boot / Safe ModeIsolating third-party software causing BSOD20-40 minLow
Reset this PC / Reinstall WindowsAll other fixes failed, persistent BSOD loops2-4 hrsHigh (data loss risk)

Understanding Microsoft Stop Codes

A Microsoft stop code — colloquially known as the Blue Screen of Death (BSOD), or on Windows 11 occasionally a Green Screen of Death in preview/Insider builds — is Windows' last resort safety mechanism. When the operating system detects a condition so severe it cannot safely continue running (a kernel-mode exception, memory corruption, hardware fault, or critical driver error), it halts everything and displays a stop code.

The blue screen you see contains:

  • A frowning face emoji (modern Windows)
  • A plain-English description of the error (e.g., KERNEL_SECURITY_CHECK_FAILURE)
  • A QR code you can scan with your phone, directing you to https://www.microsoft.com/stopcode for guided help
  • A stop code in hexadecimal (e.g., 0xc000021a)
  • A percentage counter while Windows collects a memory dump

If you reach this article via the URL on your screen (https://windows.microsoft.com/stopcode or https://www.microsoft.com/stopcode), Windows has already logged a minidump in C:\Windows\Minidump\ that contains detailed crash data.


Most Common Microsoft Stop Codes and Their Causes

1. 0xc000021a / 0xc00021a (Critical Process Died)

This stop code means a critical Windows user-mode process (Winlogon.exe or csrss.exe) failed. It almost always causes a boot loop. Common causes:

  • Corrupted system files after a failed Windows Update
  • Incompatible third-party software modifying system files
  • Registry corruption

2. IRQL_NOT_LESS_OR_EQUAL / DRIVER_IRQL_NOT_LESS_OR_EQUAL

Exact BSOD text: IRQL_NOT_LESS_OR_EQUAL or DRIVER_IRQL_NOT_LESS_OR_EQUAL. A kernel-mode driver attempted to access pageable memory at a process IRQL that was too high. Nearly always a driver bug — network adapters, antivirus kernel components, and GPU drivers are frequent offenders.

3. KERNEL_SECURITY_CHECK_FAILURE

Indicates a kernel data structure violated a security invariant. Caused by outdated or corrupt drivers, hardware failures (especially RAM), or rootkit activity.

4. MEMORY_MANAGEMENT

Points directly at RAM — either a hardware fault in your memory sticks or a driver that is mismanaging memory allocation.

5. BAD_POOL_CALLER

A driver or process made an illegal memory pool request. Common after driver installations or Windows Updates that include driver packages.

6. INACCESSIBLE_BOOT_DEVICE

Windows cannot read the boot partition. Caused by a missing or corrupt storage driver, BIOS/UEFI setting changes (AHCI vs IDE mode), or a damaged SSD/HDD.


Step 1: Capture the Stop Code Information

Before anything else, write down or photograph:

  • The stop code text (e.g., KERNEL_SECURITY_CHECK_FAILURE)
  • The hex code (e.g., 0x00000139)
  • Any file name mentioned (e.g., ntfs.sys, nvlddmkm.sys)

If Windows reboots too fast to read the screen:

  1. Press Win + R, type sysdm.cpl, press Enter
  2. Go to AdvancedStartup and RecoverySettings
  3. Uncheck Automatically restart under System Failure
  4. Click OK

Alternatively, view past crash dumps:

  • Open Event Viewer → Windows Logs → System → filter for Critical events
  • Use WinDbg (Windows Debugger) to analyze C:\Windows\Minidump\*.dmp files

Step 2: Boot Into Safe Mode or WinRE

If your PC is stuck in a BSOD loop and cannot boot normally:

Method A — Interrupt boot 3 times: Force-power-off your PC during Windows startup three consecutive times. Windows will automatically enter the Windows Recovery Environment (WinRE).

Method B — From Settings (if you can log in): Settings → System → Recovery → Advanced Startup → Restart Now

From WinRE:

  • Choose Troubleshoot → Advanced Options → Startup Settings → Restart
  • Press 4 for Safe Mode or 5 for Safe Mode with Networking

Step 3: Run System File Checker and DISM

This resolves the majority of 0xc000021a, MEMORY_MANAGEMENT, and random stop codes caused by corrupted system files. Run from an elevated Command Prompt or from WinRE's Command Prompt:

DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow

Restart after both complete, even if SFC reports no violations found.


Step 4: Update or Roll Back Drivers

For IRQL_NOT_LESS_OR_EQUAL, DRIVER_IRQL_NOT_LESS_OR_EQUAL, KERNEL_SECURITY_CHECK_FAILURE, and BAD_POOL_CALLER:

Roll back a recently updated driver:

  1. Press Win + X → Device Manager
  2. Expand the suspected category (Display adapters, Network adapters, etc.)
  3. Right-click the device → PropertiesDriver tab → Roll Back Driver

Update drivers:

  1. Right-click the device → Update driverSearch automatically
  2. Or visit the manufacturer website (NVIDIA, AMD, Intel, Realtek) for the latest driver package

Identify the faulty driver from the minidump: Use the free tool WhoCrashed or WinDbg to read .dmp files and identify the exact .sys file responsible.


Step 5: Check RAM with Windows Memory Diagnostic

For MEMORY_MANAGEMENT, BAD_POOL_CALLER, and random BSODs:

  1. Press Win + R, type mdsched.exe, press Enter
  2. Choose Restart now and check for problems
  3. Windows reboots into the diagnostic tool (runs for ~30-45 minutes)
  4. Results appear after restart in Event Viewer under Windows Logs → System (source: MemoryDiagnostics-Results)

If errors are found, test RAM sticks individually (remove one at a time) to identify the faulty module.


Step 6: Run CHKDSK for Disk Errors

For INACCESSIBLE_BOOT_DEVICE and storage-related stop codes:

chkdsk C: /f /r /x

If the drive is in use, schedule for next reboot. From WinRE Command Prompt:

chkdsk C: /f /r

Step 7: Fix 0xc000021a / INACCESSIBLE_BOOT_DEVICE Boot Loops

For stop codes that prevent Windows from booting, use WinRE Command Prompt:

bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd

If bootrec /fixboot returns "Access is denied," first run:

bcdboot C:\Windows /s C: /f ALL

Then retry bootrec commands.


Step 8: Microsoft Surface-Specific BSOD Fixes

Blue screens on Microsoft Surface (Surface Pro, Surface Laptop, Surface Book) are often caused by:

  • Outdated Surface firmware — update via Windows Update → Optional Updates → Driver and firmware updates
  • Incompatible Type Cover or docking station driver
  • Touch or pen driver conflicts

Visit Device Manager → Firmware and ensure Surface UEFI firmware is current. For Surface blue screen issues, Microsoft provides the Surface Diagnostic Toolkit for Business as a free download from the Microsoft Download Center.


Step 9: Investigate Microsoft Teams or Application-Specific BSODs

If BSODs occur specifically when launching Microsoft Teams, video conferencing apps, or during gaming:

  • These are almost always GPU driver crashes (nvlddmkm.sys for NVIDIA, atikmpag.sys for AMD)
  • Update GPU drivers to the latest Game Ready or Studio release
  • Disable hardware acceleration in Teams: Teams → Settings → General → uncheck "GPU hardware acceleration"
  • Check for conflicting antivirus kernel modules (temporarily disable and test)

Step 10: Last Resort — Reset or Reinstall Windows

If all above steps fail:

Option A — Reset this PC (keeps files): Settings → System → Recovery → Reset this PC → Keep my files

Option B — Clean install: Download the Windows 11 Media Creation Tool or Windows 10 Media Creation Tool from microsoft.com, create bootable USB, and perform a clean installation.

Before resetting: Back up important files to an external drive or cloud storage. A Reset or Reinstall will remove installed applications.

Frequently Asked Questions

bash
:: ============================================================
:: Microsoft Stop Code / BSOD Diagnostic & Repair Script
:: Run from elevated Command Prompt or WinRE Command Prompt
:: ============================================================

:: --- STEP 1: Repair Windows image with DISM ---
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth

:: --- STEP 2: Run System File Checker ---
sfc /scannow

:: --- STEP 3: Check and repair disk (schedule for reboot if drive is locked) ---
chkdsk C: /f /r /x

:: --- STEP 4: Repair boot records (for INACCESSIBLE_BOOT_DEVICE / 0xc000021a) ---
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd

:: --- STEP 5: Rebuild BCD store (alternative if bootrec fails) ---
bcdedit /export C:\BCD_Backup
attrib C:\boot\bcd -r -s -h
ren C:\boot\bcd bcd.old
bootrec /rebuildbcd

:: --- STEP 6: Export last 50 System Critical events to desktop ---
wevtutil qe System /c:50 /rd:true /f:text /q:"*[System/Level=1]" > %USERPROFILE%\Desktop\critical_events.txt

:: --- STEP 7: List minidump files for analysis ---
dir C:\Windows\Minidump\ /o-d

:: --- STEP 8: Disable automatic restart on BSOD (to read stop code) ---
reg add "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" /v AutoReboot /t REG_DWORD /d 0 /f

:: --- STEP 9: Enable complete memory dump for deeper analysis ---
reg add "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" /v CrashDumpEnabled /t REG_DWORD /d 1 /f

:: --- STEP 10: Run Memory Diagnostic (schedules test on next reboot) ---
echo Scheduling Windows Memory Diagnostic on next reboot...
rundll32.exe advapi32.dll,ProcessIdleTasks
start /wait mdsched.exe

:: --- STEP 11: Generate detailed system info report ---
msinfo32 /report %USERPROFILE%\Desktop\sysinfo_report.txt

:: --- STEP 12: List all third-party drivers (non-Microsoft) ---
driverquery /v /fo csv | findstr /v /i "microsoft" > %USERPROFILE%\Desktop\third_party_drivers.csv

:: --- STEP 13: Check Windows Update history for recent updates ---
wmic qfe list brief /format:htable > %USERPROFILE%\Desktop\windows_updates.html

:: --- STEP 14: Safe Mode boot option (add to BCD) ---
bcdedit /copy {current} /d "Safe Mode"
:: After getting the new GUID from the above command, run:
:: bcdedit /set {GUID} safeboot minimal

echo.
echo === Diagnostics complete. Check Desktop for report files. ===
echo === Review C:\Windows\Minidump\ with WinDbg or WhoCrashed ===
pause
E

Error Medic Editorial

The Error Medic Editorial team is composed of senior DevOps engineers, SREs, and Windows system administrators with 10+ years of experience diagnosing kernel crashes, BSOD failures, and enterprise Windows infrastructure issues. Our guides are built from real-world incident postmortems, Microsoft documentation, and hands-on lab testing across Windows 10 and Windows 11 environments including Surface devices, virtual machines, and enterprise workstations.

Sources

Related Articles in Microsoft

Explore More windows Guides