mirror of
https://github.com/Zagitta/gpu-unlock.git
synced 2026-12-03 19:44:49 +07:00
[GH-ISSUE #168] Method: building the unlock payload from a newer NVIDIA driver (615.71.10) - 3 extractor changes, and how to verify the unlock #191
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Zagitta/gpu-unlock#191
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yakold on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/Zagitta/gpu-unlock/issues/168
TL;DR
This is a method, not a prebuilt blob: everything needed to build the unlock firmware can be re-derived from the NVIDIA driver you already have installed plus NVIDIA's published kernel-module source. No upstream artifact has to be pinned to one driver version.
Tested end to end on driver 615.71.10 (the current tree is pinned to 610.43.03). The only real work is that NVIDIA changed the codegen of the generated bindata arrays, so
firmware/extract_boot_assets.pyneeds three small updates.What actually differs between 610.43.03 and 615.71.10
Building the asset set from 615.71.10 sources gives, byte for byte:
So the booter/boot/desc assets are stable across these driver versions; only the GSP image differs. The synthetic V67 payload is unaffected. Note that the two GSP figures are not directly comparable — one comes from an Arch
nvidia-utilspackage, the other from Ubuntu'snvidia-driver-open; see the correction comment for details.The three extractor changes
Pinned hashes.
extract_boot_assets.pypins SHA-256 of four generated sources(
g_bindata_kgspGetBinArchiveBooterLoadUcode_{GA102,AD102}.c,g_bindata_kgspGetBinArchiveGspRmBoot_{GA102,AD102}.c). With a new driver they mismatch and it aborts withpinned generated source mismatch. They need to be regenerated from the new source tree.Codegen changed: bytes → u64. 610 emits one
0xAB,token per byte; 615 emitsNV_DECLARE_ALIGNED(NvU64, 8)arrays of0x................ULLtokens. The single-byte regex rejects them(
non-byte token in generated array). Decoding each token withstruct.pack("<Q", v)restores the original stream.8-byte alignment padding. After u64 expansion the array is longer than the
COMPRESSED SIZE (bytes)declared in the surrounding comment. The excess is zero padding: validate it is all zero, then truncate,
otherwise you get
compressed storage size mismatch.With those three, the same tool builds a complete, working asset set for 615.71.10.
How to prove the unlock actually happened
The
pci <BDF>: gpu_unlock: unlockedline is the module's own word, and cards missing fromsupported_ids[]are skipped silently — no log at all — so the log alone cannot distinguish"unlocked" from "never attempted". A hardware measurement is needed.
Criterion used here: cuBLAS GEMM, FP16 in / FP32 accumulate, M=N=K=4096 (the PLM limit hits the
FP32-accumulate tensor path):
Same machine, same driver, same boot, two identical cards, one unlocked only — obtained by setting
gpu_unlock.targets=0000:02:00.0for one boot andallfor the next. Restored, both cards report 183.1 TFLOPS.Caveat:
CUBLAS_COMPUTE_16Freturned nonsense in our harness (0.02 ms / 7000+ TFLOPS on CUDA 13.4, sm_89),so the acc16F/acc32F ratio is not usable — compare the acc=32F absolute value against the part's spec instead.
Supported cards in the current tree (57 device IDs)
main.c: supported_ids[], resolved against pci.ids:GA102 (12)
0x2200 0x2203 0x2204 0x2205 0x2206 0x2207 0x2208 0x220A 0x220D 0x2216 0x222B 0x222F— 3090 Ti, 3090, 3080 Ti, 3080 Ti 20 GB, 3080, 3080 12 GB, 3080 LHR, 3070 Ti (listed as GA102), CMP 90HX, plus engineering samples
GA104 (29)
0x2480 0x2482 0x2483 0x2484 0x2486 0x2487 0x2488 0x2489 0x248A 0x248C 0x248D 0x248E 0x249C 0x249D 0x249F 0x24A0 0x24A4 0x24AC 0x24AD 0x24AF 0x24BF 0x24C0 0x24C7 0x24C8 0x24C9 0x24DC 0x24DD 0x24DF 0x24E0— 3070 Ti, 3070, 3070 GDDR6X, 3060 Ti, 3060 Ti GDDR6X, 3060 8 GB, CMP 70HX, 3080 Mobile, 3070 Mobile, 3070 Ti Laptop, plus reserved/sample IDs
GA103 (1)
0x2414— 3060 Ti (marked untested)GA106 (9)
0x2501 0x2503 0x2504 0x2505 0x2507 0x2508 0x2509 0x252F 0x2544— 3060 family, 3060 LHR, 3060 12 GB Rev.2, 3050, 3050 OEM, sample
AD103 (2)
0x27024080 SUPER (validated),0x27044080 (community)AD104 (1)
0x27824070 Ti (community)AD106 (2)
0x28034060 Ti 8 GB (validated),0x28054060 Ti 16 GB (community)AD107M (1)
0x28A04060 Mobile (community)Cards not in the table (4090, 4070 SUPER, 4070, 4060 desktop, 3050 6 GB, …) are not touched at all and produce no log line.
Test setup
10de:2702, VBIOS 95.03.44.00.02, 32 GB VRAM modification),gpu_unlock.targets=allpci 0000:02:00.0andpci 0000:03:00.0: gpu_unlock: unlocked@yakold commented on GitHub (Oct 26, 2026):
A/B measurement — full data
Two consecutive boots on the same machine, same driver, same two cards. The only variable is
gpu_unlock.targets.Setup: 2× AD103 RTX 4080 SUPER (
10de:2702), open kernel modules 615.71.10, kernel 7.0.0-38-generic,CUDA 13.4,
-arch=sm_89. Harness:cublasGemmEx, M=N=K=4096, half A/B/C,CUBLAS_GEMM_DEFAULT_TENSOR_OP, 4 iterations after warm-up, best-of. Readings were bit-stable acrossiterations apart from the acc=16F column (see the invalid datapoint below).
Boot 1 —
gpu_unlock.targets=0000:02:00.00000:02:00.00000:03:00.0ratio = 1.96
Boot 2 —
gpu_unlock.targets=all0000:02:00.00000:03:00.0So the AD103 delta on this workload is 93.5 → 183.4 TFLOPS, i.e. ~1.96×, and the value is reproducible
across a reboot.
CUDA-core reference (not the affected path)
Separate kernel — 8 independent FMA accumulators, 8192 blocks × 256 threads,
FFMAvsHFMA2:Both cards were in the unlocked state for this run (no locked-card counterpart was captured), so this is
only here to show where the gain is not: the CUDA-core FP16 rate barely moves, the ~2× shows up on the
FP16-with-FP32-accumulate tensor path. Anything measured through tensor cores with FP16 accumulate will
also hide it.
Invalid datapoint — do not use acc=16F in a ratio
The same harness reports
CUBLAS_COMPUTE_16Fas:0.02 ms for a 4096³ GEMM is physically impossible on this part, and cuBLAS returned
CUBLAS_STATUS_SUCCESSwith no CUDA error. Treat the accumulator-16F number as not executed rather thanas a measurement — the acc16F/acc32F ratio computed from it (0.02) is meaningless and would wrongly
suggest a locked card.
Reproducing
/etc/default/grub.d/50-gpu-unlock.cfgfor the A/B boot (any file ingrub.dworks, the value is justappended to
GRUB_CMDLINE_LINUX_DEFAULT):update-grub && reboot, then benchmark both cards from one process; revert totargets=alland rebootafterwards. Note the value must match
pci_name()exactly (0000:02:00.0, not the 8-digit-domain form00000000:02:00.0thatnvidia-smiprints). A mistyped address is not silently ignored — the modulelogs
gpu_unlock: no supported card at "<entry>".Benchmark kernel core (the whole harness is ~60 lines):
Reference values for this part: ~183 TFLOPS = unlocked, ~93.5 TFLOPS = locked on FP16/FP32-acc at 4096³.
@yakold commented on GitHub (Oct 26, 2026):
Device IDs vs. what is actually extracted
A clarification worth making explicit, because the two are easy to conflate:
The device ID is not extracted from the driver. It lives in the card's PCI configuration space and is read
with
lspci -nn— here10de:2702. Nothing about the build produces it.The driver does not ship per-card firmware either.
nvidia-driver-open 615.71.10installs exactly fourimages, one per family, not per SKU:
So building on a 4090 machine with the same driver version produces the same GSP/ucodes bytes as ours — the
extraction result does not depend on which card sits in the box.
What is per-architecture is the booter/boot/desc set, and both variants are already produced by the same run:
A 4090 is AD102, so it would use the AD102 subset — which is present in the asset set, unchanged.
The only thing that is genuinely per-card is
supported_ids[], i.e. which cards the module is willing to touchat all. That list is hardware IDs, not an extraction product.
Correction to the size figure in the first post
The
84277400 BGSP number comes from the 610.43.03 Archnvidia-utilspackage that the upstream Makefilepins; the
27043992 Bnumber is Ubuntu'snvidia-driver-open615.71.10. Those are different packaging, so thesize delta should not be read as a pure driver-version change. What is certain is that the 27 MB image works
with the module.
Device IDs that are outside the current table
Resolved against pci.ids and compared to the 57 entries in
supported_ids[]:None of these ever reach
gpu_unlock_610_unlock():next_supported()only iterates devices whose ID is inthe table, so there is no register write, no FLR, and no log line at all — not even a "skipped" message.
Absence of
unlockedin the log therefore has two different causes, and the way to tell them apart is to checkwhether your ID is in the table: a card that was attempted and failed prints
gpu_unlock: unlock failed (N)instead.Same model, different device ID
The table registers individual IDs, so two cards sold under the same name can differ:
This is the most likely explanation when one report says "works" and another says "nothing happens" for what
looks like the same card.
lspci -nn | grep VGAsettles it before anyone spends an evening rebuilding.@yakold commented on GitHub (Oct 26, 2026):
There are two device-ID tables, and only one of them decides whether the card works
When adding a card,
main.c: supported_ids[]is the obvious one — but it only decides whether the modulelooks at the card. A second, separate list decides which asset set it gets:
unlock_610.c:53tests membership withis_ad10x(), which walksgu_ad10x_ids[]only. Nothing insupported_ids[]feeds that decision.So an Ada card that is present in
supported_ids[]but missing fromgu_ad10x_ids[]is treated as a GA10xpart and gets the GA102 booter/boot/desc set — a mismatch that has no chance of working, while still producing
a clean
unlock failed (N)rather than anything that points at the real cause. The comment inmain.calready says "keep in sync with gu_ad10x_ids"; this is why.
There are exactly two asset families, and every supported card maps onto one of them:
What that implies for extending coverage
0x2783, 40700x2786/0x2709, 40600x2882/0x2808,4060 Ti AD104
0x2788, 4080 SUPER variant0x2703, 40900x2684): these are AD10x dies, so the AD102 assetset applies. Adding the ID to both tables is the minimum to give it a chance. I have not validated any of
these, so treat it as "worth trying", not as a claim.
gsp_tu10x, and anything Blackwell): there is no asset path in thismodule for them, so adding IDs alone cannot work — that needs separate extraction and boot logic.
For reference, a 4090 is AD102, and there is already a report of a 4090 working on a different fork (#157:
fp16 +10% / bf16 +17% / tf32 +56%), so AD102 itself is not excluded by the asset side.
The extraction method in the first post is what removes the driver-version dependency; it says nothing about
whether a given die is unlockable. Those are two independent gates, and a card has to pass both.
@Zagitta commented on GitHub (Oct 27, 2026):
Hi closing this as I don't see any bugs and the code comments refer to an older version that's been refactored.
Please create a new issue if you experience any problems