Error Medic

Windows Blue Screen of Death (BSOD): Complete Troubleshooting Guide for All Stop Codes

Fix Windows blue screen errors including MEMORY_MANAGEMENT, SYSTEM_SERVICE_EXCEPTION, VIDEO_TDR_FAILURE & more. Step-by-step diagnostics with real commands.

Last updated:
Last verified:
2,303 words
Key Takeaways
  • Most BSODs are caused by faulty RAM, corrupt system files, incompatible drivers (especially GPU drivers like nvlddmkm.sys), or failing storage devices — each maps to a specific stop code.
  • Critical stop codes to know: MEMORY_MANAGEMENT (0x0000001A), SYSTEM_SERVICE_EXCEPTION (0x0000003B), KERNEL_SECURITY_CHECK_FAILURE (0x00000139), UNMOUNTABLE_BOOT_VOLUME (0xC000009F), and 0xC00021A (critical system process failure).
  • Quick fixes include running 'sfc /scannow' and 'DISM /RestoreHealth' in an elevated Command Prompt, booting into Safe Mode to isolate driver issues, analyzing minidump files with WinDbg, and using Startup Repair from a Windows Recovery USB drive.
BSOD Fix Approaches Compared
MethodWhen to UseTimeRisk
sfc /scannow + DISMCorrupt system files (ntfs.sys, random BSODs)15-30 minLow
Driver rollback / DDU uninstallGPU BSOD (nvlddmkm.sys, VIDEO_TDR_FAILURE)10-20 minLow
Windows Memory Diagnostic / MemTest86MEMORY_MANAGEMENT, PFN_LIST_CORRUPT2-8 hrsNone
chkdsk /r /fUNMOUNTABLE_BOOT_VOLUME, ntfs.sys BSODs30-120 minLow
Startup Repair (WinRE)BSOD loop at startup, 0xC00021A10-30 minLow
System Restore / ResetAfter failed update or driver install30-90 minMedium
Re-seat / replace RAM or HDDHardware failure confirmed by diagnostics30-60 minMedium
Clean Windows reinstallPersistent BSODs, all software fixes failed1-3 hrsHigh (data loss)

Understanding Windows Blue Screen Errors

A Blue Screen of Death (BSOD) — formally called a Stop Error — occurs when Windows encounters a critical fault from which it cannot safely recover. The system halts to prevent data corruption, writes a memory dump file, and displays a stop code. Since Windows 8, BSODs also display a QR code you can scan to look up the error online.

Every BSOD includes a stop code (e.g., MEMORY_MANAGEMENT, SYSTEM_SERVICE_EXCEPTION) and often a faulting module (e.g., nvlddmkm.sys, ntfs.sys). These two pieces of information are your primary diagnostic handles.


Step 1: Capture the Stop Code and Dump File

Before fixing anything, collect forensic data.

From the blue screen itself: Note the stop code shown in large text and any .sys filename listed beneath it.

From Event Viewer:

  1. Press Win + X → Event Viewer
  2. Navigate to Windows Logs → System
  3. Filter by Event ID 41 (Kernel-Power — unexpected shutdown) and 1001 (BugCheck — the BSOD itself)
  4. The BugCheck event contains the stop code and parameters in hexadecimal

Locating minidump files: Dump files are stored at C:\Windows\Minidump\ (small dumps) or C:\Windows\MEMORY.DMP (full dump). To ensure dumps are being written:

  1. Right-click This PC → Properties → Advanced System Settings
  2. Under Startup and Recovery, click Settings
  3. Set Write debugging information to Small memory dump (256 KB)

Analyzing dumps with WinDbg: Download WinDbg from the Microsoft Store or Windows SDK. Open the dump file and run !analyze -v to get an automated root cause analysis including the faulting driver, stack trace, and memory addresses.


Step 2: Identify Your Specific Stop Code

MEMORY_MANAGEMENT (0x0000001A) / PFN_LIST_CORRUPT (0x0000004E) / STOP CODE MEMORY MANAGEMENT

These indicate physical RAM or virtual memory issues.

  • Primary suspects: Faulty RAM sticks, overclocked memory running out of spec, or corrupt page file
  • Fix: Run Windows Memory Diagnostic (mdsched.exe), then MemTest86 for extended testing. If errors found, re-seat RAM or replace the failing stick.
SYSTEM_SERVICE_EXCEPTION (0x0000003B)

A system service or driver violated memory access rules.

  • Primary suspects: Outdated or corrupt drivers, antivirus software, VPN clients
  • Fix: Boot into Safe Mode, uninstall recently installed drivers or software, run sfc /scannow
KERNEL_SECURITY_CHECK_FAILURE (0x00000139) / SECURITY_CHECK_FAILURE

Data structures protected by kernel security checks were corrupted.

  • Primary suspects: Faulty RAM, corrupt drivers, disk errors
  • Fix: Run sfc /scannow, check RAM with MemTest86, run chkdsk /r
VIDEO_TDR_FAILURE (nvlddmkm.sys / atikmpag.sys)

The GPU driver stopped responding and failed to recover.

  • Primary suspects: Corrupt or outdated NVIDIA/AMD GPU drivers, overheating GPU, PCIe slot issues
  • Fix: Use Display Driver Uninstaller (DDU) in Safe Mode to completely remove the GPU driver, then install the latest stable driver from the manufacturer's website. Check GPU temperatures with HWiNFO64.
UNMOUNTABLE_BOOT_VOLUME (0xC000009F)

Windows cannot mount the system partition at boot.

  • Primary suspects: Corrupt boot sector, failing HDD/SSD, corrupt NTFS file system
  • Fix: Boot from Windows installation media → Startup Repair. If that fails, run bootrec /fixmbr, bootrec /fixboot, bootrec /rebuildbcd from the Recovery Command Prompt, then chkdsk C: /r /f.
0xC00021A (STATUS_SYSTEM_PROCESS_TERMINATED)

A critical Windows subsystem process (winlogon.exe or csrss.exe) terminated unexpectedly.

  • Primary suspects: Corrupt system files, failed Windows Update, mismatched system DLL versions (often after a partial update)
  • Fix: Boot into WinRE → Startup Repair. If unsuccessful, use DISM from the Recovery Command Prompt or restore a system image.
NTFS_FILE_SYSTEM (ntfs.sys)

The NTFS driver encountered a disk error.

  • Primary suspects: Failing hard drive or SSD, corrupt file system, bad sectors
  • Fix: Run chkdsk C: /r /f and check drive health with CrystalDiskInfo (look for reallocated sector count or pending sectors in S.M.A.R.T. data).
WDF_VIOLATION

A Windows Driver Framework violation occurred, typically from a hardware driver.

  • Primary suspects: Faulty USB drivers, peripheral device drivers, recently installed hardware
  • Fix: Check Device Manager for driver errors, uninstall recently added devices, update or roll back drivers.
UNEXPECTED_KERNEL_MODE_TRAP (0x0000007F)

The CPU generated a trap the kernel did not catch.

  • Primary suspects: Faulty RAM, overclocking instability, hardware defects
  • Fix: Disable overclocking (reset XMP/DOCP profile to default), run MemTest86.

Step 3: Boot into Safe Mode or Windows Recovery Environment

If Windows won't boot due to a BSOD loop:

Force WinRE access: Interrupt the boot process 3 times by holding the power button as Windows starts. On the third failure, Windows automatically boots into the Recovery Environment.

From WinRE → Troubleshoot → Advanced Options you can access:

  • Startup Repair — automated fix for boot-related BSODs
  • Command Prompt — for manual repair commands
  • System Restore — roll back to a working restore point
  • Uninstall Updates — remove a bad cumulative update that caused the BSOD
  • Safe Mode (via Startup Settings) — boot with minimal drivers

Step 4: Run System File and Image Repair

Always run these two commands in sequence from an elevated Command Prompt:

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

DISM repairs the Windows component store first so that SFC has healthy source files to restore from. After both complete, reboot and monitor for BSODs.


Step 5: Hardware Diagnostics

RAM: Windows Memory Diagnostic (mdsched.exe) runs on reboot. For thorough testing, boot MemTest86 from USB and run at least 2 full passes. Any errors confirm faulty RAM.

Storage: Run chkdsk and inspect S.M.A.R.T. data. Drives showing Reallocated Sectors Count above 0 or Current Pending Sectors are failing and must be replaced.

GPU temperature: Use HWiNFO64 or GPU-Z to monitor temperatures under load. Anything above 90°C for NVIDIA or 95°C for AMD under load suggests thermal throttling or imminent failure.


Step 6: Isolate Software Causes

Recently installed software or updates are a common BSOD trigger. In safe mode or from WinRE:

  • Uninstall the most recently installed applications
  • Roll back GPU drivers via Device Manager → Display Adapters → Properties → Driver → Roll Back
  • Remove Windows updates via Settings → Windows Update → View Update History → Uninstall Updates

Antivirus/security software can cause SYSTEM_SERVICE_EXCEPTION BSODs. Temporarily disable or uninstall third-party AV and test for recurrence.

Overclocking: Reset BIOS to default settings (load optimized defaults). Overclocked CPU, RAM, or GPU frequencies often cause UNEXPECTED_KERNEL_MODE_TRAP and MEMORY_MANAGEMENT BSODs under load.


Step 7: Check for Malware

While rare, certain rootkits and bootkits can cause BSODs by corrupting kernel-level drivers. If your BSOD is accompanied by other symptoms (browser redirects, unexplained processes), boot from a trusted offline scanner like Windows Defender Offline Scan or Malwarebytes Bootable Media to scan outside the Windows environment.

Frequently Asked Questions

powershell
# ============================================================
# Windows BSOD Diagnostic & Repair Script
# Run PowerShell as Administrator
# ============================================================

# 1. Check recent BSODs from Event Log
Write-Host "`n=== Recent BSOD Events ==="
Get-WinEvent -FilterHashtable @{LogName='System'; Id=1001} -MaxEvents 10 |
    Select-Object TimeCreated, Message |
    Format-List

# 2. List minidump files
Write-Host "`n=== Minidump Files ==="
$dumpPath = "C:\Windows\Minidump"
if (Test-Path $dumpPath) {
    Get-ChildItem $dumpPath -Filter "*.dmp" | Select-Object Name, LastWriteTime, Length
} else {
    Write-Host "No minidump directory found. Enable small memory dumps in System Properties."
}

# 3. Run System File Checker
Write-Host "`n=== Running SFC (this may take 10-15 minutes) ==="
sfc /scannow

# 4. Run DISM health restoration
Write-Host "`n=== Running DISM RestoreHealth ==="
DISM /Online /Cleanup-Image /RestoreHealth

# 5. Check disk health (non-destructive)
Write-Host "`n=== Disk Health Check (read-only) ==="
Get-PhysicalDisk | Select-Object FriendlyName, HealthStatus, OperationalStatus, Size

# Schedule chkdsk on next reboot (for C: drive)
Write-Host "`n=== Scheduling chkdsk for next reboot ==="
chkdsk C: /f /r /x
# Answer 'Y' when prompted to schedule on reboot

# 6. List recently installed drivers (last 30 days)
Write-Host "`n=== Recently Installed Drivers (Last 30 Days) ==="
$cutoff = (Get-Date).AddDays(-30)
Get-WmiObject Win32_PnPSignedDriver |
    Where-Object { $_.DriverDate -and [Management.ManagementDateTimeConverter]::ToDateTime($_.DriverDate) -gt $cutoff } |
    Select-Object DeviceName, DriverVersion, DriverDate |
    Sort-Object DriverDate -Descending

# 7. Check for unsigned drivers
Write-Host "`n=== Checking for Unsigned Drivers ==="
$unsigned = Get-WmiObject Win32_PnPSignedDriver | Where-Object { $_.IsSigned -eq $false }
if ($unsigned) {
    $unsigned | Select-Object DeviceName, DriverVersion, InfName
} else {
    Write-Host "All loaded drivers are signed."
}

# 8. Check Windows Memory Diagnostic status
Write-Host "`n=== Triggering Windows Memory Diagnostic ==="
Write-Host "This will prompt to restart. Close other programs first."
# Uncomment the line below to launch:
# Start-Process mdsched.exe

# 9. Enable verbose BSOD info (disable automatic restart on BSOD)
Write-Host "`n=== Disabling Auto-Restart on BSOD (so you can read the stop code) ==="
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl' -Name 'AutoReboot' -Value 0
Write-Host "Done. System will now pause on BSOD instead of auto-restarting."

# 10. Verify dump type is set to Small Memory Dump
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl' -Name 'CrashDumpEnabled' -Value 3
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl' -Name 'MinidumpDir' -Value '%SystemRoot%\Minidump'
Write-Host "Minidump capture configured at C:\Windows\Minidump\"

# 11. GPU driver check (NVIDIA specific)
Write-Host "`n=== NVIDIA Driver Info ==="
try {
    $nvidiaSMI = & "C:\Windows\System32\nvidia-smi.exe" --query-gpu=name,driver_version,temperature.gpu --format=csv,noheader 2>$null
    if ($nvidiaSMI) { Write-Host $nvidiaSMI } else { Write-Host "nvidia-smi not found or no NVIDIA GPU detected." }
} catch {
    Write-Host "No NVIDIA GPU or driver found."
}

Write-Host "`n=== Diagnostics Complete. Review output above for issues. ==="
E

Error Medic Editorial

The Error Medic Editorial team consists of senior DevOps engineers and SRE professionals with decades of combined experience diagnosing and resolving Windows system failures in enterprise and consumer environments. We specialize in translating cryptic stop codes and kernel-level errors into actionable, tested remediation steps.

Sources

Related Articles in Other Windows Blue Screen

Explore More windows Guides