Skip to content

SysAdminDoc/win11-nvme-driver-patcher

Repository files navigation

NVMe Driver Patcher

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.

Version .NET Windows 11 License

Quick Start

GUI (recommended) — download NVMeDriverPatcher.exe from the latest release and run it. Administrator elevation is automatic; no install or prerequisites needed (self-contained single file).

CLI (automation/fleets) — download NVMeDriverPatcher.Cli.exe:

.\NVMeDriverPatcher.Cli.exe status
.\NVMeDriverPatcher.Cli.exe apply --safe

Windows on ARM releases also ship *-win-arm64.exe portable builds for GUI, CLI, tray, and watchdog. These are diagnostic/status builds until Microsoft ships an ARM64 nvmedisk.sys; use the x64 assets under emulation if you need the current native-NVMe enablement path.

MSI (managed deployment)NVMeDriverPatcher-<version>.msi from the release installs GUI + CLI + tray per-machine; the real-time watchdog service is an opt-in feature (ADDLOCAL=WatchdogService).

Legacy PowerShell script (deprecated)
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

Deprecated — limited to pre-March-2026 builds. The script writes only the registry override keys, which Microsoft neutered on newer builds: it reports success while the driver never binds. It has none of the v4.4+ capabilities:

Capability Legacy script GUI / CLI
Registry override patch + SafeBoot keys
Native FeatureStore fallback for post-block builds (ViVeTool only after native failure)
Post-reboot bind verification (honest status)
Watchdog auto-revert, minidump triage, reliability correlation
Per-drive scope, dry-run preview, recovery USB builder

It remains in releases for air-gapped/legacy environments only.

Verify the download (recommended)

Every release artifact ships with a matching <asset>.sha256 sidecar and a combined SHA256SUMS.txt. Verify before running — this catches a tampered CDN, a corrupted download, or a masquerading file under the same name:

# Verify any single artifact against its .sha256 sidecar
$file = 'NVMe_Driver_Patcher.ps1'
$expected = (Invoke-WebRequest -UseBasicParsing -Uri "https://github.com/SysAdminDoc/win11-nvme-driver-patcher/releases/latest/download/$file.sha256").Content.Split(' ')[0].Trim()
$actual = (Get-FileHash -Algorithm SHA256 -Path $file).Hash.ToLower()
if ($expected -eq $actual) { "OK: $file" } else { "MISMATCH: expected $expected, got $actual" }

The GUI's in-app auto-updater (Help → Check for updates) performs the same SHA-256 sidecar check automatically at the original GitHub release asset URL before falling back to any redirected CDN URL. It refuses to stage any binary that either fails the hash or has no sidecar / Authenticode signature available — this is load-bearing supply-chain defense, not just UI polish.

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, UrBackup, NinjaOne, Paragon, Samsung Magician, WD Dashboard, Crucial Storage Executive, CrystalDiskInfo, 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)
  • Custom INF / TESTSIGNING warning -- flags test-signed native NVMe driver-store workarounds that the registry rollback cannot remove
  • 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 named-game 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, and rules/compat DB provenance (source, schema, SHA-256, review freshness)
  • 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 command timeouts, 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. The MSI grants the LocalService watchdog read access to the System log when the optional service is installed.
  • 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} and flags power-loss-risk entries such as Phison E18/E26. 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 %ProgramData%\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 (C# binary — 42 commands)

Run NVMeDriverPatcher.Cli help for the full grouped command reference.

# Lifecycle
NVMeDriverPatcher.Cli status                              # Patch state + build rule (exit: 0/1/2)
NVMeDriverPatcher.Cli apply --safe                         # Apply with Safe Mode profile
NVMeDriverPatcher.Cli apply --dry-run                      # Preview registry changes only
NVMeDriverPatcher.Cli remove                               # Undo the patch

# Recovery
NVMeDriverPatcher.Cli recovery-kit                         # Generate WinRE recovery kit
NVMeDriverPatcher.Cli recovery-proof                       # Check recovery infrastructure readiness
NVMeDriverPatcher.Cli upgrade-safeboot                     # Add KB5079391 SafeBoot entries

# Diagnostics
NVMeDriverPatcher.Cli watchdog                             # Stability verdict (exit: 0/1/2)
NVMeDriverPatcher.Cli watchdog-service                     # Real-time service state
NVMeDriverPatcher.Cli reliability                          # Reliability Monitor correlation
NVMeDriverPatcher.Cli minidump                             # NVMe-stack crash scan
NVMeDriverPatcher.Cli controllers                          # Per-controller driver audit
NVMeDriverPatcher.Cli bypassio                             # Per-volume BypassIO + named-game gaming impact
NVMeDriverPatcher.Cli bypassio --history                   # Pre/post patch BypassIO comparison
NVMeDriverPatcher.Cli apst                                 # APST state + battery impact estimate
NVMeDriverPatcher.Cli identify                             # NVMe Identify Controller dump
NVMeDriverPatcher.Cli bundle                               # Export support bundle (.zip)
NVMeDriverPatcher.Cli diagnostics                          # Export diagnostics report (.txt)

# Storage & Performance
NVMeDriverPatcher.Cli etw                                  # 60s ETW storage trace
NVMeDriverPatcher.Cli firmware                             # Compat.json entries
NVMeDriverPatcher.Cli compare-benchmarks --threshold=15    # Before/after benchmark diff

# Fleet & Admin
NVMeDriverPatcher.Cli telemetry --endpoint=<url>           # Submit anonymized compat report
NVMeDriverPatcher.Cli dashboard                            # Generate HTML dashboard
NVMeDriverPatcher.Cli winpe --output=E:\                   # WinPE recovery USB
NVMeDriverPatcher.Cli config-export --export=<path>        # Export config bundle
NVMeDriverPatcher.Cli config-import --import=<path>        # Import config bundle

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 when the bundled build-rule check reports a working path)
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 pre-26200.8524 26200.0-26200.8523 Registry override is blocked; the build-specific FeatureStore fallback is the expected path.
25H2 26200.8524+ 26200.8524+ Verify / monitor / rollback only. No known registry or fallback route binds GenNvmeDisk on this branch.
24H2 pre-block 26100.0-26100.3774 Registry override route works on known builds.
24H2 post-block 26100.3775+ Registry keys can write but may not bind; use the fallback path and verify after reboot.
26300+ Insider 26300+ Check the native Settings Feature flags page first; registry and fallback routes are not expected to bind.
23H2 22631 Partial -- feature flags may write but the driver may not activate.
22H2 / 21H2 22621 / 22000 Not recommended or unsupported; the native driver may be absent or incomplete.

The app and CLI use src/NVMeDriverPatcher.Core/windows_build_rules.json at runtime. Trust status and preflight output over this static table when Microsoft changes Insider or cumulative-update behavior.

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 on known-good firmware (when using inbox driver)
WD SN570 and compat-cleared SN580/SN770/SN850X firmware (when using inbox driver)
Crucial P3, P3 Plus, P5, P5 Plus, T705
SK Hynix Gold P31, Platinum P41 with preflight performance caution
Kingston NV2, KC3000 with Phison E18 power-loss caution
Sabrent Rocket 4 Plus with Phison power-loss caution
Solidigm P5316 (enterprise, Server 2025 tested)
Generic/OEM Any drive using StorNVMe.sys

Run preflight before enabling the patch. The bundled compat.json flags known risky controller/firmware combinations including WD/SanDisk 2TB HMB BSOD firmware, WD SN850X Critical Failure reports, Samsung 990 Pro 2TB 7B2QJXD7, SK hynix Platinum P41 mixed performance, and Phison E18/E26 power-loss risk.

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) Single-digit % (desktop I/O runs at QD1-2)
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)
UrBackup / NinjaOne / Paragon Backup image-mount driver may be blocked by Windows CodeIntegrity after KB5083769 Medium Yes (service + event-log evidence)
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)
CrystalDiskInfo SMART monitoring may stop reading NVMe health (SCSI pass-through) Medium 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.

Advanced hardening: NVMeDriverPatcher.Cli.exe winre-inject previews the DISM plan to inject stornvme.inf into the local WinRE image. winre-inject --apply backs up winre.wim, logs original/backup/final SHA-256 hashes, mounts to an app-owned temp folder, injects the driver, and commits or discards cleanly. After applying, boot into WinRE once and confirm the system volume is accessible.

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.

Custom/test-signed native NVMe workaround detected

Some community workarounds force nvmedisk.sys with a custom OEM INF and BCD TESTSIGNING. This tool warns on that evidence but will not automate or remove the route because it changes driver-store state outside the registry/FeatureStore rollback model. Capture evidence with pnputil /enum-drivers /files, then revert through Device Manager or remove the confirmed package with pnputil /delete-driver <oem#.inf> /uninstall only after you know which INF owns the binding.

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, Crucial Storage Executive, and CrystalDiskInfo 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

50 stars

Watchers

4 watching

Forks

Packages

 
 
 

Contributors