Error Medic

BSOD Windows 11 Fix: Stop Errors Including memory_management, ntoskrnl.exe, ntkrnlmp.exe & ksecdd.sys

Fix BSOD Windows 11 stop errors including memory_management, ntoskrnl.exe, ntkrnlmp.exe, and ksecdd.sys with step-by-step diagnostic commands and proven solutio

Last updated:
Last verified:
2,071 words
Key Takeaways
  • Root cause 1: Faulty or incompatible RAM is responsible for a large percentage of Windows 11 BSODs, especially MEMORY_MANAGEMENT (0x0000001A) and PAGE_FAULT_IN_NONPAGED_AREA errors linked to ntoskrnl.exe or ntkrnlmp.exe.
  • Root cause 2: Corrupt system files, outdated or buggy drivers (including ksecdd.sys — the Kernel Security Support Provider Interface driver), and Windows Update failures trigger stop errors by corrupting kernel memory regions.
  • Quick fix summary: Run 'sfc /scannow' and 'DISM /Online /Cleanup-Image /RestoreHealth' to repair system files, use Windows Memory Diagnostic or MemTest86 to test RAM, roll back or update suspect drivers via Device Manager, and check Event Viewer for the exact stop code and faulting module before attempting deeper hardware-level repairs.
Fix Approaches Compared
MethodWhen to UseTimeRisk
SFC + DISM RepairCorrupt system files, failed Windows Update, random BSODs15-45 minLow
Driver Rollback / UpdateBSOD started after a driver or Windows Update install; ksecdd.sys or ntoskrnl.exe faulting module10-20 minLow
Windows Memory DiagnosticSuspected RAM issue, MEMORY_MANAGEMENT BSOD, ntkrnlmp.exe errors30-60 minNone
MemTest86 (Bootable)Thorough RAM validation, multiple BSOD codes, SFC passes but BSODs persist2-8 hrsNone
RAM Reseating / ReplacementMemTest86 reports errors, hardware fault confirmed30-60 minMedium (hardware)
Clean Boot / Safe ModeIsolate third-party software or driver conflicts causing BSODs15-30 minLow
Windows 11 Repair Install (In-place Upgrade)Persistent BSODs unresolved by all software fixes60-120 minLow-Medium
Full Reinstall of Windows 11Last resort — hardware confirmed good, OS entirely corrupt2-4 hrsHigh (data loss if no backup)

Understanding BSOD Stop Errors in Windows 11

A Blue Screen of Death (BSOD) in Windows 11 — officially called a Stop Error — occurs when the kernel detects a fatal inconsistency it cannot recover from. Windows halts execution, dumps memory to disk, and reboots. You will typically see a message like:

Your PC ran into a problem and needs to restart.
Stop code: MEMORY_MANAGEMENT
Failing module: ntoskrnl.exe

or:

Stop code: SYSTEM_SERVICE_EXCEPTION
Failing module: ksecdd.sys

Common Stop Codes and Their Meanings

  • 0x0000001A — MEMORY_MANAGEMENT: A severe memory-subsystem error. Usually points to faulty RAM, memory timing issues, or a driver writing outside its allocated memory region.
  • 0x0000007E / 0x0000003B — SYSTEM_SERVICE_EXCEPTION: A system service generated an unhandled exception. Often tied to ksecdd.sys (Kernel Security Support Provider) or third-party AV drivers.
  • 0x00000050 — PAGE_FAULT_IN_NONPAGED_AREA: A requested page of memory is not available. Frequently involves ntoskrnl.exe or ntkrnlmp.exe (the multiprocessor version of the NT kernel).
  • 0xC0000005 — ACCESS_VIOLATION in ntkrnlmp.exe: The kernel attempted to access an invalid memory address, common with overclocked or unstable RAM.

Step 1: Capture the Stop Code and Faulting Module

Before fixing anything, identify the exact error. Windows 11 logs every crash in Event Viewer.

  1. Press Win + X → select Event Viewer.
  2. Navigate to Windows Logs → System.
  3. Filter by Event ID 41 (Kernel-Power — unexpected shutdown) and Event ID 1001 (BugCheck).
  4. Note the stop code (e.g., 0x0000001A) and the faulting module (e.g., ntoskrnl.exe, ntkrnlmp.exe, ksecdd.sys).

Alternatively, use PowerShell to extract the last 10 critical events:

Get-WinEvent -LogName System | Where-Object {$_.LevelDisplayName -eq 'Critical'} | Select-Object -First 10 | Format-List TimeCreated, Message

For memory dump analysis, install WinDbg from the Microsoft Store and open C:\Windows\Minidump\*.dmp. Run:

!analyze -v

This gives you the exact faulting module, call stack, and stop code context.


Step 2: Repair System Files with SFC and DISM

Corrupted Windows system files are a leading cause of BSODs. Run these in an elevated Command Prompt or PowerShell:

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

After DISM completes, run sfc /scannow again. Restart and monitor for BSODs. If DISM fails with error 0x800f081f, mount the Windows 11 ISO and point DISM to the WIM file:

DISM /Online /Cleanup-Image /RestoreHealth /Source:E:\sources\install.wim /LimitAccess

Step 3: Test and Diagnose RAM

Windows Memory Diagnostic (Quick)
  1. Press Win + R, type mdsched.exe, press Enter.
  2. Choose Restart now and check for problems.
  3. After reboot, the tool runs in pre-OS environment. Results appear in Event Viewer under Windows Logs → System (source: MemoryDiagnostics-Results).
MemTest86 (Thorough — Recommended)
  1. Download MemTest86 from https://www.memtest86.com/.
  2. Flash it to a USB drive using the included tool.
  3. Boot from USB and run at least 2 full passes (4+ passes recommended).
  4. Any errors = faulty RAM. Replace the affected DIMM.

Pro tip: If you have dual-channel RAM (2 sticks), remove one stick, boot, test stability, then swap. This isolates a single bad DIMM.


Step 4: Address Driver-Specific BSODs

ksecdd.sys BSOD

ksecdd.sys is the Kernel Security Support Provider Interface driver, part of Windows security subsystem. BSODs from this module are commonly caused by:

  • Conflicting antivirus or endpoint security software
  • A buggy cumulative Windows Update
  • Corrupted Local Security Authority (LSA) configuration

Fix steps:

  1. Boot into Safe Mode (hold Shift while clicking Restart → Troubleshoot → Advanced Options → Startup Settings → F4).
  2. Uninstall third-party antivirus software via Settings → Apps.
  3. Run SFC and DISM as described in Step 2.
  4. Roll back recent Windows Updates: Settings → Windows Update → Update History → Uninstall Updates.
ntoskrnl.exe / ntkrnlmp.exe BSOD

ntkrnlmp.exe is the multiprocessor version of the NT kernel. It appears as the faulting module when a driver or application corrupts kernel memory. This is often a symptom rather than the root cause.

  1. Use Driver Verifier to identify misbehaving drivers:

    verifier /standard /all
    

    Restart. When the verified driver causes a BSOD, the stop code will now name the actual culprit driver. Analyze the new minidump.

  2. To disable Driver Verifier after testing:

    verifier /reset
    
  3. Update or roll back the identified driver via Device Manager → right-click device → PropertiesDriver tab → Roll Back Driver or Update Driver.


Step 5: Check Storage Health

A failing SSD or HDD can cause random BSODs. Check drive health:

chkdsk C: /f /r /x

This runs on next reboot. Also check SMART data:

Get-PhysicalDisk | Get-StorageReliabilityCounter | Select-Object -Property *

Or use CrystalDiskInfo (free tool) for a detailed SMART readout.


Step 6: Perform a Windows 11 Repair Install

If all software fixes fail but hardware tests pass, perform an in-place upgrade repair install:

  1. Download the Windows 11 Installation Media tool from https://www.microsoft.com/software-download/windows11.
  2. Run setup.exe from the mounted ISO.
  3. Choose Keep personal files and apps.
  4. Complete the upgrade — this reinstalls Windows system files without data loss.

This resolves deeply embedded corruption that SFC/DISM cannot reach.


Step 7: BIOS / UEFI and Hardware Checks

  • Update BIOS/UEFI: Outdated firmware causes memory compatibility issues. Visit your motherboard manufacturer's website.
  • Disable XMP/EXPO RAM profiles: Overclocked memory profiles can cause instability on Windows 11. In BIOS, set RAM to JEDEC standard speed.
  • Check CPU temperatures: Use HWiNFO64 or HWMonitor. Sustained CPU temps above 90°C cause thermal throttling and potential BSODs.
  • Reseat RAM and GPU: Physical connection issues cause intermittent memory errors.

Frequently Asked Questions

powershell
# ============================================================
# Windows 11 BSOD Diagnostic & Fix Script
# Run as Administrator in PowerShell
# ============================================================

# --- Step 1: Export last 20 critical/error system events to desktop ---
$logPath = "$env:USERPROFILE\Desktop\BSOD_Events.txt"
Get-WinEvent -LogName System -MaxEvents 500 | Where-Object {
    $_.LevelDisplayName -in @('Critical', 'Error') -and
    $_.Id -in @(41, 1001, 6008)
} | Select-Object -First 20 | Format-List TimeCreated, Id, Message | Out-File $logPath
Write-Host "[OK] Event log exported to $logPath"

# --- Step 2: List recent minidump files ---
$dumpPath = "C:\Windows\Minidump"
if (Test-Path $dumpPath) {
    Write-Host "[INFO] Recent minidump files:"
    Get-ChildItem $dumpPath -Filter "*.dmp" | Sort-Object LastWriteTime -Descending | Select-Object -First 5 | Format-Table Name, LastWriteTime, Length
} else {
    Write-Host "[WARN] No minidump folder found. Ensure Small Memory Dump is configured."
    # Configure small memory dump
    $regPath = "HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl"
    Set-ItemProperty -Path $regPath -Name "CrashDumpEnabled" -Value 3
    Set-ItemProperty -Path $regPath -Name "MinidumpDir" -Value "%SystemRoot%\Minidump"
    Write-Host "[OK] Small memory dump configured. Reboot required."
}

# --- Step 3: Run System File Checker ---
Write-Host "[INFO] Running SFC scan..."
Start-Process -FilePath "sfc" -ArgumentList "/scannow" -Wait -NoNewWindow

# --- Step 4: Run DISM health restoration ---
Write-Host "[INFO] Running DISM RestoreHealth..."
DISM /Online /Cleanup-Image /RestoreHealth

# --- Step 5: Check disk for errors (schedules for next reboot) ---
Write-Host "[INFO] Scheduling CHKDSK on C: for next reboot..."
echo Y | chkdsk C: /f /r /x 2>&1

# --- Step 6: Enable Driver Verifier for all drivers (use carefully -- will BSOD on bad driver) ---
# Uncomment the line below ONLY to identify a faulty driver. Disable after testing.
# verifier /standard /all

# --- Step 7: Query SMART data for physical drives ---
Write-Host "[INFO] Physical disk SMART reliability counters:"
Get-PhysicalDisk | Get-StorageReliabilityCounter | Select-Object DeviceId, ReadErrorsTotal, WriteErrorsTotal, Temperature, Wear | Format-Table -AutoSize

# --- Step 8: Check for pending Windows Updates ---
Write-Host "[INFO] Installed hotfixes (last 10):"
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 10 | Format-Table HotFixID, InstalledOn, Description

# --- Step 9: Export driver list for review ---
$driverLog = "$env:USERPROFILE\Desktop\Drivers_List.txt"
Get-WmiObject Win32_PnPSignedDriver | Select-Object DeviceName, DriverVersion, DriverDate, IsSigned | Sort-Object DriverDate -Descending | Format-Table -AutoSize | Out-File $driverLog
Write-Host "[OK] Driver list exported to $driverLog"

# --- Step 10: Disable XMP via registry notice (must be done in BIOS) ---
Write-Host "[NOTICE] If BSOD persists, disable XMP/EXPO in BIOS and test RAM at stock speed."
Write-Host "[DONE] Diagnostics complete. Review Desktop files and minidumps."
E

Error Medic Editorial

The Error Medic Editorial team is composed of senior DevOps engineers, SREs, and Windows systems specialists with over a decade of experience diagnosing kernel-level failures, production incidents, and OS-level instability across enterprise and consumer environments. Our guides are grounded in real-world incident postmortems, official Microsoft documentation, and community-validated diagnostic techniques.

Sources

Related Articles in Windows 11 Bsod Windows

Explore More windows Guides