Skip to content

About

A tool to unlobotomize your NVIDIA card with p2p and gds.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

 
 

Repository files navigation

cmpunlocker banner

What is cmpunlocker?

cmpunlocker restores numerous features that are restricted in firmware/OTP configuration of the NVIDIA CMP 170HX. cmpunlocker has been featured by multiple outlets like wccftech, Tom's Hardware and LinusTechTips.

P2P merged build. This repository is a merged version that integrates the GPU-to-GPU BAR1 P2P implementation from bayley/cmpunlocker into the patch-based cmpunlocker build. P2P mode is off by default and enabled with the --p2p flag at install time; all original memory-geometry, PCIe Gen2 and passthrough unlocks are preserved. See Optional GPU-to-GPU P2P for usage and docs/P2P.md / docs/P2P-MERGE.zh-CN.md for the full merge and verification notes.

Join our Discord community for support and discussions.


Proof of Concept

Below are memory and performance results after applying the unlock:

Memory Unlock Results
memory unlock
Performance Benchmarks (OpenCL-Benchmark)
performance benchmarks

Requirements

  • Linux (x86-64)
  • Root access
  • NVIDIA CMP 170HX
  • nvidia-open 610.xx.xx+ already installed (libs + firmware)
  • Kernel headers matching the running kernel (linux-headers-$(uname -r) / kernel-devel)
  • Secure Boot disabled (patched modules are unsigned)
  • Network access on first install (downloads matching stock open-gpu-kernel-modules sources)
  • Python 3 (used at build time to select 8GB/10GB geometry)

Install

To install cmpunlocker, run the following command:

sudo ./install.sh

To force a certain memory profile, use the --profile option:

sudo ./install.sh --profile=8gb    # 8GB card → 64GB unlock
sudo ./install.sh --profile=10gb   # 10GB card → 40GB unlock

Then perform a cold reboot (full power off, then boot).

Optional GPU-to-GPU P2P

This build ships the GPU-to-GPU BAR1 P2P mode ported from bayley/cmpunlocker. It is off by default and is turned on with the --p2p flag:

sudo ./install.sh --p2p
# Can be combined with the existing options:
sudo ./install.sh --p2p --profile=8gb --no-passthrough

--p2p enables the BAR1 P2P implementation from bayley/cmpunlocker, including capability overrides, peer mappings and page-table rewrites. It is off by default. Every peer GPU needs a sufficiently large BAR1 and a host PCIe path that carries peer traffic (BIOS must provide enough Above-4G MMIO space). See P2P setup and transfer verification. 中文说明:P2P 合并与验证说明。

Important

PCIe-switch hosts: REBAR to a 64 GB BAR1 can fail. On hosts that hang the CMP GPUs behind a PCIe switch, the driver's runtime REBAR resize of BAR1 to 64 GB frequently fails because the switch's MMIO window does not expose enough Above-4G space for the reallocation. When that happens the BAR stays at its stock size and BAR1 P2P (and the full 64 GB BAR1 window) will not work.

  • Kernel-level fix: bayley/cmpunlocker/kernel-patches patches the kernel to reprogram the switch windows and force the BAR1 resize. It works but is heavy — a custom kernel to build and maintain.
  • Lightweight alternative: cmp170hx-rebar-shim reaches the same result through a small shim, without rebuilding the kernel.

P2P builds install the modules and module options for the next cold boot. Reinstall without --p2p to disable the optional driver patches and settings. Keep --p2p when reinstalling after a kernel upgrade.

The same switch is available for direct driver builds:

sudo env CMPUNLOCKER_ENABLE_P2P=1 ./driver/build.sh

After a cold boot, verify real peer transfers (capability reports alone are not proof that data moves):

sudo ./verify.sh
nvidia-smi topo -p2p r
nvidia-smi topo -p2p w
nvcc -O2 -arch=sm_80 -o /tmp/cmpunlocker-test-p2p tools/test-p2p.cu
timeout 120s /tmp/cmpunlocker-test-p2p 0 1

Optional GPUDirect Storage (GDS)

sudo ./install.sh --p2p --no-iommu

--no-iommu keeps the installer from adding IOMMU options to the kernel command line: GDS performs DMA straight between the NVMe device and the GPU's BAR1, and leaving the IOMMU out of the storage DMA path avoids the address translation layer in the way.

This is a GDS-specific choice. Pure P2P does not need the IOMMU disabled — it runs fine under the default iommu=on/iommu=pt; if peer traffic is blocked, the cause is ACS on the intervening bridges, not the IOMMU itself.

What Gets Unlocked

Feature Status
Full SM compute throughput (SS0/SS1) Working ✓
Memory geometry (64GB on 8GB cards, 40GB on 10GB cards) Working ✓
PCIe Gen 2 speeds Working ✓
Error-Correcting Code (ECC) DRAM and SRAM Working ✓ (automatic — enabled by default, no flag)
Full BAR1 Size (64GB) Working ✓
JTAG (Host2Jtag register access) Working ✓
VFIO-based passthrough Working ✓
GPU profiling Working ✓
GPU-to-GPU BAR1 P2P Optional: --p2p; requires host setup and real transfer verification
Persistence across reboot (patched modules) Working ✓

ECC and SM count

ECC (DRAM and SRAM) and the additional SMs are part of the default patch set — they are applied on every install and there is no separate flag. After a reboot, confirm ECC is reported:

nvidia-smi -q -d ECC

The status may show as pending until after a cold reboot (full power off, then boot). "more SMs" is covered by the Full SM compute throughput (SS0/SS1) row above.


Uninstall

To uninstall cmpunlocker, run the following command:

sudo ./remove.sh --yes

Then perform a cold reboot (full power off, then boot).

Contributions

Please read docs/CONTRIBUTING.md before opening a PR.

Support & Community

Having issues? Need help? Join our Discord community to discuss with other users and get support.

About

A tool to unlobotomize your NVIDIA card with p2p and gds.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages