Skip to content

SysAdminDoc/win11-nvme-driver-patcher

Repository files navigation

Astra Deck

NVMe Driver Patcher for Windows 11

A GUI + CLI tool to enable the experimental Windows Server 2025 Native NVMe driver (nvmedisk.sys) on Windows 11, replacing the legacy SCSI translation layer for improved NVMe performance.

PowerShell Windows 11 License

NVMe Driver Patcher Screenshot

Quick Start

One-line install (Run as Administrator in PowerShell):

irm https://github.com/SysAdminDoc/win11-nvme-driver-patcher/releases/latest/download/NVMe_Driver_Patcher.ps1 -OutFile NVMe_Driver_Patcher.ps1; .\NVMe_Driver_Patcher.ps1

Or download NVMe_Driver_Patcher.ps1 from Releases and right-click > Run with PowerShell.

What Does This Do?

Windows Server 2025 introduced a new Native NVMe driver that eliminates the legacy SCSI translation layer, allowing direct communication with NVMe drives. This driver is available in Windows 11 (24H2+) but disabled by default. Microsoft has stated they are "absolutely exploring" bringing it broadly to the entire Windows codebase.

This tool enables it via 5 registry components:

Component Purpose
Feature Flag 735209102 NativeNVMeStackForGeClient - Primary driver enable
Feature Flag 1853569164 UxAccOptimization - Extended functionality
Feature Flag 156965516 Standalone_Future - Performance optimizations
SafeBoot Minimal Key Prevents INACCESSIBLE_BOOT_DEVICE BSOD in Safe Mode
SafeBoot Network Key Safe Mode with Networking support

Optional: Feature Flag 1176759950 (Microsoft Official Server 2025 key) can be included via checkbox. Recommended -- without it, the new I/O scheduler may not activate and results can be inconsistent.

Important: The SafeBoot keys are critical. Without them, your system cannot boot into Safe Mode after enabling Native NVMe. Many manual guides omit these keys -- this tool includes them automatically.

Features

Safety & Compatibility

  • VeraCrypt hard block -- detects system encryption and refuses to patch (breaks boot entirely)
  • Automatic BitLocker suspension -- suspends BitLocker for one reboot cycle to prevent recovery key prompts
  • Comprehensive software detection -- warns about Intel RST (BSOD risk), Intel VMD (boot failures), Hyper-V/WSL2 (40% I/O regression), Storage Spaces (array degradation), Veeam, Acronis, Macrium, Samsung Magician, WD Dashboard, Crucial Storage Executive, Data Deduplication
  • Laptop/power warning -- detects laptops and warns about APST battery regression (~15% impact)
  • Rollback on partial failure -- undoes all applied registry keys if patch doesn't complete fully
  • Registry backup export + system restore point creation before any changes
  • Third-party driver detection (Samsung, WD, Intel RST, AMD, SK Hynix, Crucial, Phison)
  • Recovery Kit generation -- creates .reg + .bat files for offline WinRE recovery (auto-detects WinRE, loads offline registry hive)

Diagnostics & Benchmarking

  • Built-in DiskSpd benchmark -- 4K random read/write test targeting NVMe drive with before/after comparison (auto-downloads Microsoft DiskSpd)
  • 11 async preflight checks run in a background thread without freezing the GUI
  • NVMe health badges -- temperature, wear %, firmware, power-on hours, media errors (hover for SMART details)
  • Per-drive NATIVE/LEGACY badges -- shows whether each NVMe drive migrated to nvmedisk.sys or remains on stornvme.sys
  • Post-reboot drive migration verification -- per-drive confirmation of which drives moved to "Storage disks"
  • BypassIO/DirectStorage status check with gaming impact warning
  • Before/after comparison -- shows exactly what changed after patch/unpatch
  • Diagnostics export -- full system report with SMART health, compat software, migration status, benchmark history
  • GitHub update check with clickable badge in title bar
  • Windows Event Log integration for audit trails

UI/UX

  • WPF dark theme -- zinc-950 palette with blue accent, custom title bar, drop shadow
  • Resizable window with grip handle, clamped to work area (no off-screen at high DPI)
  • Toast notifications -- Windows balloon tips for patch results
  • Activity log with right-click context menu (Copy Selection, Select All, Copy All, Clear)
  • Collapsible Settings panel -- Auto-save, Toasts, Event Log, Restart Delay, Open Data Folder
  • Benchmark IOPS display in patch status card
  • Refresh button -- re-run all preflight checks without restarting
  • Skip warnings checkbox -- for experienced users who don't need confirmation dialogs
  • Silent/CLI mode for scripting and automation

v4.4 — Stability, correlation, enterprise (new)

  • Post-patch event-log watchdog -- scans System channel for Storport ID 129, disk ID 51/153, Kernel-Power 41, and BugCheck 1001 inside a configurable window (default 48h). Crosses the revert threshold? Stages an auto-revert on next boot.
  • Reliability Monitor correlation -- pulls Win32_ReliabilityStabilityMetrics, overlays the patch-apply timestamp, reports pre/post stability averages with delta.
  • Minidump triage -- scans C:\Windows\Minidump for dumps newer than the patch and flags any that reference nvmedisk.sys, stornvme.sys, storport.sys, disk.sys.
  • Firmware + controller compat JSON -- shipped compat.json maps {controller, firmware}{Good, Caution, Bad}. Preflight consults it before proceeding.
  • Per-drive scope -- exclude specific NVMe drives from the swap by serial or model pattern (e.g. keep a DirectStorage gaming drive on stornvme.sys while the OS drive moves to nvmedisk.sys).
  • Dry-run preview (--dry-run / "Preview Changes") -- prints every registry write the patch would perform, without touching the registry.
  • ETW storage trace (etw) -- wraps wpr.exe for 60-second pre/post captures; ETL files land in %LocalAppData%\NVMePatcher\etl\.
  • WinPE recovery USB builder (winpe) -- detects the Windows ADK + WinPE add-on and produces a bootable tree/ISO with the Recovery Kit pre-staged and a custom startnet.cmd.
  • Opt-in compatibility telemetry -- build an anonymized {controller, firmware, OS build, profile, verification, watchdog, reliability delta} JSON and optionally POST it to a user-configured HTTPS endpoint. No serials, machine names, drive letters, or user names.
  • Driver Verifier harness (verifier-on / -off / -status) -- dev/tester-mode wrapper around verifier.exe for kernel-level stress checks on the NVMe stack.
  • GPO / ADMX templates (packaging/admx/) -- pin Safe/Full profile, IncludeServerKey, SkipWarnings, watchdog behavior, and telemetry across a fleet via HKLM\SOFTWARE\Policies\SysAdminDoc\NVMeDriverPatcher. Policy overrides local config.
  • winget manifest (packaging/winget/SysAdminDoc.NVMeDriverPatcher.yaml) -- winget install SysAdminDoc.NVMeDriverPatcher.
  • Non-admin status tray agent (NVMeDriverPatcher.Tray) -- separate exe, no UAC. Shows patch state + watchdog verdict from the system tray; right-click → "Open Main App (elevated)" for the admin GUI.
  • Rotating logs -- crash.log, activity.log, watchdog.log, diagnostics.log rotate at 5MB each with 5 generations retained.

CLI Usage

All CLI operations require Administrator privileges.

# Check patch status (exit code: 0=applied, 1=not applied, 2=partial)
# Shows driver status, migration, compat warnings, laptop detection
.\NVMe_Driver_Patcher.ps1 -Silent -Status

# Apply the patch silently without restart prompt
.\NVMe_Driver_Patcher.ps1 -Silent -Apply -NoRestart

# Apply with force (skip NVMe drive check and preflight)
.\NVMe_Driver_Patcher.ps1 -Silent -Apply -Force

# Remove the patch silently
.\NVMe_Driver_Patcher.ps1 -Silent -Remove

# Export system diagnostics report
.\NVMe_Driver_Patcher.ps1 -ExportDiagnostics

# Generate post-reboot verification script
.\NVMe_Driver_Patcher.ps1 -GenerateVerifyScript

# Generate WinRE-compatible recovery kit
.\NVMe_Driver_Patcher.ps1 -ExportRecoveryKit

Extended CLI (v4.4, C# CLI binary)

# Preview every registry change without touching the system
NVMeDriverPatcher.Cli apply --dry-run

# Read the post-patch watchdog verdict (exit: 0=healthy, 1=unstable, 2=warning)
NVMeDriverPatcher.Cli watchdog

# Correlate Reliability Monitor stability index with the patch timestamp
NVMeDriverPatcher.Cli reliability

# Scan C:\Windows\Minidump for NVMe-stack crashes since the patch
NVMeDriverPatcher.Cli minidump

# List bundled controller/firmware compat entries (compat.json)
NVMeDriverPatcher.Cli firmware

# Show per-drive include/exclude decisions from drive_scope.json
NVMeDriverPatcher.Cli scope

# Capture a 60s ETW storage trace via wpr.exe
NVMeDriverPatcher.Cli etw

# Build a WinPE recovery USB tree/ISO from the current Recovery Kit
NVMeDriverPatcher.Cli winpe --output=E:\

# Build (and optionally submit) the anonymized compat report
NVMeDriverPatcher.Cli telemetry --endpoint=https://example.com/nvme/compat

# Driver Verifier harness (dev testing; requires reboot)
NVMeDriverPatcher.Cli verifier-on
NVMeDriverPatcher.Cli verifier-status
NVMeDriverPatcher.Cli verifier-off

Exit Codes (Silent Mode):

Code Meaning
0 Success / Patch Applied
1 Failure / Patch Not Applied
2 Partial / No NVMe drives
3 Invalid parameters
4 Elevation required

Requirements

Requirement Details
OS Windows 11 Build 22000+ (24H2 or 25H2 recommended)
Privileges Administrator (auto-elevation prompt)
Hardware NVMe SSD using Windows inbox driver (StorNVMe.sys)
Update KB5066835 (October 2025 cumulative update) or newer

Windows Version Compatibility

Windows 11 Version Build Support
25H2 26200+ Full support, best performance
24H2 26100 Full support, recommended minimum
23H2 22631 Partial -- feature flags apply but driver may not activate
22H2 22621 Not recommended -- driver not present in base image
21H2 22000 Unsupported

The tool will warn you if your build is below 26100 but will not block the patch.

Hardware Compatibility

The patch works with any NVMe drive using the Windows inbox StorNVMe.sys driver. Drives using vendor-specific drivers are unaffected.

Confirmed working:

Brand Models
Samsung 970 Evo/Plus, 980, 980 Pro, 990 Pro (when using inbox driver)
WD SN570, SN580, SN770, SN850X (when using inbox driver)
Crucial P3, P3 Plus, P5, P5 Plus, T705
SK Hynix Platinum P41, Gold P31
Kingston NV2, KC3000
Sabrent Rocket 4 Plus
Solidigm P5316 (enterprise, Server 2025 tested)
Generic/OEM Any drive using StorNVMe.sys

Not compatible (uses vendor driver by default):

Brand Notes
Samsung (with Samsung NVMe Driver) Uses samsungnvmedriver.sys -- patch has no effect
WD (with WD Dashboard driver) Uses proprietary driver

To check which driver your drive uses: Device Manager > Disk drives > [Your NVMe] > Properties > Driver > Driver Files

Performance Benchmarks

The native NVMe driver delivers significant gains by eliminating the SCSI translation layer. Results vary by SSD model, controller, and workload type.

Independent Benchmark Results

Source Test Improvement
Tom's Hardware 4K random read (StorageReview) +64.89%
Tom's Hardware Random workloads (consumer SSD) Up to +85%
StorageReview 64K random read latency -38.46% (faster)
NotebookCheck Sequential read / write (PCIe 4.0) +23% / +30%
Microsoft 4K random read IOPS (Server) +80%, -45% CPU
Overclock.net IOPS 512b-8KB (Samsung OEM) +167%
CrystalDiskMark (Reddit) 4K-64Thrd random read/write +22% / +85%

What to Expect

Workload Expected Gains
Random 4K read/write (high queue depth) +20% to +85% -- biggest wins
Sequential read/write +10% to +30%
Desktop responsiveness (app launches, boot) Noticeable improvement
Gaming (load times) Minimal difference
DirectStorage games May be worse (BypassIO not supported)

The biggest gains are in high-queue-depth random I/O. Sequential transfers and gaming see more modest improvements. Desktop usage operates at QD1-2 where gains are ~2%. Run your own benchmarks with the built-in DiskSpd or CrystalDiskMark before and after.

Known Compatibility Issues

The tool automatically detects and warns about all of these. VeraCrypt is a hard block.

Software Issue Severity Auto-Detected
VeraCrypt (system encryption) Breaks boot entirely Critical Yes (blocks patch)
BitLocker May trigger recovery key prompt High Yes (auto-suspends)
Intel RST Conflicts with nvmedisk.sys, BSOD risk High Yes (warns)
Intel VMD Boot failures on VMD-configured systems High Yes (warns)
Hyper-V / WSL2 WSL2 disk I/O ~40% slower (no paravirt) Medium Yes (warns)
Storage Spaces Arrays may degrade or disappear High Yes (warns)
Acronis True Image Drives invisible to backup/restore High Yes (warns)
Veeam Backup Cannot detect drives High Yes (warns)
Macrium Reflect May need update for compatibility Medium Yes (warns)
Samsung Magician Cannot detect drives (SCSI pass-through) Low Yes (warns)
WD Dashboard Cannot detect drives (SCSI pass-through) Low Yes (warns)
Crucial Storage Executive Cannot detect drives (SCSI pass-through) Low Yes (warns)
Data Deduplication Microsoft confirms incompatibility High Yes (warns)
Laptop / Battery APST broken, ~15% battery life reduction Medium Yes (warns)
DirectStorage games BypassIO not supported, higher CPU Low-Medium Yes (warns)

If you experience problems, use the Remove Patch button (or -Silent -Remove) and restart.

Recovery Kit

The tool can generate a WinRE-compatible Recovery Kit -- a folder containing:

  • NVMe_Remove_Patch.reg -- double-click from Windows, or regedit /s from WinRE
  • Remove_NVMe_Patch.bat -- smart batch script that auto-detects WinRE vs Windows, finds your Windows installation, loads the offline SYSTEM hive, and removes the patch from all ControlSets
  • README.txt -- step-by-step instructions for both Windows and WinRE recovery

A recovery kit is automatically generated after each successful patch installation. You can also create one manually via the RECOVERY KIT button or .\NVMe_Driver_Patcher.ps1 -ExportRecoveryKit.

Copy this folder to a USB drive before rebooting to have an offline recovery option if the system won't boot.

Scope

This patch affects ALL NVMe drives in your system that use the Windows inbox driver (StorNVMe.sys), not just the OS drive.

Exception: Drives using vendor-specific drivers (e.g., Samsung's proprietary driver) are not affected.

Troubleshooting

"No NVMe drives detected"

  • Your drives may use vendor-specific drivers
  • Check Device Manager > Disk drives > Properties > Driver
  • If using Samsung/WD proprietary drivers, this patch won't help

System won't boot after patch

Option 1: Use the Recovery Kit (recommended)

  1. If you saved the Recovery Kit to USB before rebooting:
  2. Boot to WinRE (hold Shift + Restart, or use Windows install USB > "Repair")
  3. Open Command Prompt
  4. Navigate to USB (try D:, E:, F:)
  5. Run NVMe_Recovery_Kit\Remove_NVMe_Patch.bat
  6. Restart

Option 2: Manual WinRE removal

  1. Boot to WinRE > Troubleshoot > Advanced options > Command Prompt
  2. Load the offline registry:
reg load HKLM\OFFLINE C:\Windows\System32\config\SYSTEM

(If C: doesn't work, try D: or E: -- drive letters differ in WinRE) 3. Remove the patch:

for /L %N in (1,1,9) do reg delete "HKLM\OFFLINE\ControlSet00%N\Policies\Microsoft\FeatureManagement\Overrides" /v 735209102 /f
for /L %N in (1,1,9) do reg delete "HKLM\OFFLINE\ControlSet00%N\Policies\Microsoft\FeatureManagement\Overrides" /v 1853569164 /f
for /L %N in (1,1,9) do reg delete "HKLM\OFFLINE\ControlSet00%N\Policies\Microsoft\FeatureManagement\Overrides" /v 156965516 /f
for /L %N in (1,1,9) do reg delete "HKLM\OFFLINE\ControlSet00%N\Policies\Microsoft\FeatureManagement\Overrides" /v 1176759950 /f
for /L %N in (1,1,9) do reg delete "HKLM\OFFLINE\ControlSet00%N\Control\SafeBoot\Minimal\{75416E63-5912-4DFA-AE8F-3EFACCAFFB14}" /f
for /L %N in (1,1,9) do reg delete "HKLM\OFFLINE\ControlSet00%N\Control\SafeBoot\Network\{75416E63-5912-4DFA-AE8F-3EFACCAFFB14}" /f
reg unload HKLM\OFFLINE
  1. Restart

Option 3: Wait for auto-recovery Windows automatically disables the native NVMe driver after 2-3 consecutive failed boots and reverts to the legacy stack.

Can't boot into Safe Mode

This shouldn't happen if you used this tool (SafeBoot keys are included). If it does, follow the WinRE steps above.

SSD vendor tools stopped working

Samsung Magician, WD Dashboard, and Crucial Storage Executive use legacy SCSI pass-through to communicate with drives. The native NVMe driver doesn't implement this interface. Use Windows built-in tools (Device Manager, Get-PhysicalDisk, Get-StorageReliabilityCounter) for health monitoring instead, or remove the patch to restore compatibility.

Credits & Sources

Disclaimer

This tool modifies system registry settings to enable an experimental, unsupported feature on Windows 11. While safety measures are included (VeraCrypt detection, BitLocker auto-suspend, restore points, registry backups, rollback on failure, recovery kit generation), use at your own risk. The native NVMe driver is only officially supported on Windows Server 2025. Always ensure you have backups before making system changes.


Made with coffee by SysAdminDoc

About

GUI tool to enable the experimental Windows Server 2025 NVMe storage driver on Windows 11.

Topics

Resources

License

Stars

Watchers

Forks

Packages