Skip to content

About

A Windows kernel filter driver that lifts the GeForce Tensor core frequency cap on NVIDIA GA100 / GA10x / AD10x / TU102 consumer boards

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gpu-unlock-windows

A Windows kernel filter driver that lifts the GeForce Tensor core frequency cap on NVIDIA GA100 / GA10x / AD10x / TU102 consumer boards before the official nvlddmkm.sys display driver stacks on top of the device. This is the Windows port of the original Linux kernel module; the Linux source has been removed entirely and the unlock transaction core has been re-platformed on the WDM PnP / WDDM stack while preserving the original code structure, the Linux errno return codes and the opt-in registry model.

⚠️ Test-signed, not production-signed. Installing this driver requires enabling test signing (bcdedit /set testsigning on), disabling Secure Boot in firmware, and disabling Memory Integrity (HVCI) in Windows Security > Core isolation. All three are covered by tools\install.ps1 -PrepareBoot. Do not deploy this on a machine that requires a production-signed, HVCI-protected kernel.

What it does

On supported consumer NVIDIA boards, the GPU's Tensor cores ship with a hard frequency ceiling enforced by the firmware bootstrap. The unlock is a one-shot privileged transaction that runs against a cold, unbound GPU:

  1. Save the PCI configuration image and disable bus mastering.
  2. Discover BAR0 geometry (one-shot, while the display stack is still down).
  3. Allocate a sub-4 GB contiguous DMA buffer (the GSP boot scene requires a 32-bit addressable region).
  4. Run the GFW (general firmware) sequence: load the SEC2 Booter, the GSP Boot image and the GSP Boot descriptor, then the Falcon loader.
  5. Run FWSEC: evaluate the GSP-RM-CTRL commands, publish the published VBIOS image, perform the privileged register writes that flip the unlock bit.
  6. Function Level Reset (FLR) to wipe Falcon state, then restore the saved PCI configuration image and re-enable bus mastering.
  7. On system resume from S3/S4 / Modern Standby, the same transaction runs again because the GPU has lost the unlock bit while powered down.

The whole sequence is the original Linux unlock transaction (the unlock_610.c module), re-platformed with the Windows equivalents of the Linux services it consumed. The Linux→Windows API correspondence is documented inline in driver/unlock_610.c.

Supported boards

The driver carries per-chip payload vocabularies and recipe tables for:

Family Example SKUs Code paths
GA100 CMP 40HX, GA100 w/ Tensor enabled recipes.c GA100 slots
GA10x RTX 3090, 3080, 3070, CMP 170HX etc. recipes.c GA10x slots
AD10x RTX 4090, 4080, 4070 recipes.c AD10x slots
TU102 RTX 2080 Ti, Titan RTX recipes.c TU102 slots

The opt-in model is preserved: the filter only ever attaches to NVIDIA display controllers (PCI vendor 10de, class 0300 / 0302) and is explicitly listed in the registry Parameters\Targets value (all or a comma-separated list of 0000:21:00.0-style addresses). Other vendors and unlisted devices are no-ops.

Build

You need:

  • Windows 10/11 x64 host (or a Windows build container / EWDK VM).
  • The Windows Driver Kit (WDK) matching your SDK, or the free Enterprise WDK (EWDK) ISO. The build only uses WindowsKernelModeDriver10.0 as the platform toolset, so either works.
  • Python 3 on PATH (for the firmware pipeline). The assets step also requires the zstd command for unpacking the GSP ELFs.
  • About 400 MB of free space for the pinned NVIDIA inputs.

From an elevated WDK / EWDK build prompt:

:: one-time: download the pinned NVIDIA 610.43.03 inputs and extract firmware
tools\build.cmd assets

:: full build: embed small blobs, msbuild Release x64, attach GSP overlay
tools\build.cmd

:: produce a test-signed driver (self-signed cert, signtool)
tools\sign.cmd

The result is build\Release\gpu_unlock.sys — a single PE file with the fourteen small firmware bundles compiled in (pageable PAGEFW section) and the two large GSP ELFs (gsp_ga10x.bin, gsp_tu10x.bin, tens of MB each) appended after the PE image as a runtime overlay with an 80-byte GUFW manifest footer that the driver reads once at first attach.

Verifying the firmware overlay

python firmware\embed_firmware.py verify --sys build\Release\gpu_unlock.sys

prints the manifest, including the offset and size of each attached blob, and recomputes the footer CRC. attach is idempotent: re-running it replaces the existing overlay rather than appending a second one.

The driver sources include driver/firmware_data.c, which is regenerated by embed_firmware.py gen during tools\build.cmd. The committed copy holds placeholder byte arrays only — it exists so the source tree compiles even before the firmware pipeline has run, and the first real build replaces it with the actual embedded NVIDIA firmware bundles.

Host syntax check (without the WDK)

tools\hostcheck\check.sh runs gcc -fsyntax-only -DGU_HOSTCHECK against the driver C files using the included hostcheck_ntddk.h stub. It will not produce a driver, but it catches portability mistakes that would otherwise only surface inside the WDK build. All 14 C files currently pass (this is run as part of the project's self-check, not as part of the Windows build).

The check produces GCC warnings about multi-character pool-tag constants ('ULUG'); these are a Microsoft extension that MSVC accepts and GCC only warns about, so they are not bugs.

Install

⚠️ The driver is test-signed. You must enable test signing, disable Secure Boot, and disable HVCI before Windows will load it.

From an elevated PowerShell:

# one-time: enable test signing, prompt for Secure Boot / HVCI actions
powershell -ExecutionPolicy Bypass -File tools\install.ps1 -PrepareBoot

# repeat for the actual install (after rebooting once for testsigning)
powershell -ExecutionPolicy Bypass -File tools\install.ps1 -Targets all
# or: -Targets "0000:21:00.0,0000:23:00.0"   (specific PCI addresses only)

install.ps1:

  1. Optionally prepares the boot configuration (test signing on, prompts to disable Secure Boot / HVCI).
  2. Copies gpu_unlock.sys to %SystemRoot%\System32\drivers\.
  3. Creates the boot-start kernel service gpu_unlock.
  4. Appends gpu_unlock to the display class LowerFilters value (the same documented mechanism partmgr.sys uses for the disk class), so the filter is stacked under every display miniport at boot.
  5. Writes the opt-in Parameters\Targets, Parameters\Resume and Parameters\Verbose registry values.
  6. Asks for a reboot to activate the unlock.

Uninstall

powershell -ExecutionPolicy Bypass -File tools\uninstall.ps1

Removes gpu_unlock from LowerFilters, deletes the service, deletes the driver image, and prompts for a reboot. After the reboot, re-enable test signing / Secure Boot / HVCI as needed.

Verifying the unlock

After the reboot, run Sysinternals DebugView with Capture → Capture Kernel enabled and look for gpu_unlock: log lines. The filter prints its identity, BAR0 discovery and the per-step transaction progress, ending with either an unlock ok line or an unlock failed: <errno> summary.

If the transaction succeeds, the GPU now exposes the unlocked Tensor core frequency range to nvlddmkm.sys / nvapi.dll, observable through any overclocking utility that reads the policy table.

How it works (architecture summary)

The driver is a WDM lower-level filter driver on the Display device class. This places its AddDevice ahead of nvlddmkm.sys's, which is what makes the unlock possible at all — by the time the display stack is built, the privileged register writes are already done and the FLR has already wiped any Falcon state that would have noticed them.

Linux original Windows port
pci_read_config_* gu_pci_config_* (IRP_MN_READ/WRITE_CONFIG, PCI_WHICHSPACE_CONFIG)
pci_save_state / restore gu_pci_save_state / gu_pci_restore_state (command / BAR / MSI image)
pci_iomap MmMapIoSpace (uncached, PAGE_NOCACHE)
pcie_flr gu_pcie_flr (TRPND wait → FLR bit → 100 ms settle)
dma_alloc_coherent (32-bit) MmAllocateContiguousMemorySpecifyCache (sub-4 GB)
request_firmware overlay ZwReadFile into paged pool, shared cache
PM notifier (resume re-run) D0 IRP completion routine hangs the IRP + IoQueueWorkItem
aperture_remove_conflicting no equivalent (WDDM owns the aperture; the filter only touches config space and BAR0 transiently during the unlock round)
__module_get (hold DMA across PM) retained DMA allocation on the device extension, freed in the remove / surprise-removal path

The driver's Parameters\Resume value (default 1) toggles the re-unlock-on-resume path. With it on, a resume from S3 / S4 / Modern Standby triggers the same transaction a second time, because the GPU has lost the unlock bit while powered down. With it off, the driver only ever runs the unlock once at boot.

Licensing

  • The driver source and all build tooling are GPL-2.0-only (SPDX-License-Identifier: GPL-2.0-only).
  • The embedded NVIDIA firmware (gsp_*.bin, booter_load_*.bin, gsp_boot_*.bin, gsp_boot_desc_*.bin, sec2_bl_*.bin, falcon_loader.bin) is NVIDIA's, redistributed under the NVIDIA driver license (see licenses/NVIDIA-MIT.txt).
  • The CMP 40HX SKU is additionally covered by the CMP40HX-MIT license (see licenses/CMP40HX-MIT.txt), as in the original Linux project.

Disclaimer

This project enables hardware behavior that NVIDIA did not officially expose to Windows. It is intended for research and benchmarking on hardware you own. The driver is test-signed and not suitable for production deployment. You assume all risk of use.

About

A Windows kernel filter driver that lifts the GeForce Tensor core frequency cap on NVIDIA GA100 / GA10x / AD10x / TU102 consumer boards

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages