mirror of
https://github.com/JustAResearcher/gpu-unlock-ada.git
synced 2026-12-03 20:45:57 +07:00
[GH-ISSUE #107] [SUCCESS / EXPERIMENTAL] Gigabyte RTX 4070 Ti AD104: Windows UEFI GPU unlock on MSI B450, successful cold boot and driver handoff #64
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JustAResearcher/gpu-unlock-ada#64
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 @zefirkapie-star on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/JustAResearcher/gpu-unlock-ada/issues/107
[SUCCESS / EXPERIMENTAL] Gigabyte RTX 4070 Ti AD104 (
10de:2782,1458:40e8): Windows UEFI GPU unlock on MSI B450, successful cold boot and driver handoffTest date: October 28, 2026
Report updated: October 28, 2026 — validated unlocked Windows CUDA/cuBLAS results, Ubuntu comparison, and final ComfyUI application-performance follow-up
Hardware: Gigabyte GeForce RTX 4070 Ti Windforce OC 12 GB on MSI B450 Gaming Pro Carbon Max WiFi
Related reports: Successful native Ubuntu unlock, issue #77; earlier Gigabyte/UEFI investigation, issue #38; Gigabyte X99 Windows UEFI port, PR #96.
Summary
A fully logged cold-boot Windows UEFI unlock attempt completed its hardware transaction successfully on a Gigabyte RTX 4070 Ti Windforce OC 12 GB (AD104,
10de:2782, subsystem1458:40e8) installed in an MSI B450 Gaming Pro Carbon Max WiFi motherboard. The experiment used a locally adapted Windows UEFI application built from the AD104/Gigabyte X99 code in PR #96, with the three-stage console/GOP release mechanism adapted from the repository's MSI UEFI port.The application's USB log confirms successful FWSEC/payload execution, setting
SS0=0x88888888andSS1=0x8, retention of the fully enabled selector readback after one PCIe FLR, DMA teardown, and a successful final hardware transaction status:Windows then booted successfully. The normal NVIDIA 617.42 Windows WDDM driver bound the GPU (
00000000:26:00.0). The native CUDA/cuBLAS benchmark, using the same source and problem sizes as the previous Ubuntu evaluation, completed all six FP16/BF16 GEMM configurations withfailures=0. On 8192³ GEMM, the unlocked Windows system achieved 144.084844 TFLOPS (FP16/FP32) and 144.489097 TFLOPS (BF16/FP32), compared with 146.122117 / 146.070428 TFLOPS on unlocked Ubuntu. This corresponds to 98.6% / 98.9% of Ubuntu throughput on those large-matrix workloads. In the latest operator-reported ComfyUI/Krea2 comparison, unlocked Windows and Ubuntu differed by only approximately 0.5 seconds per sampling step, a practically negligible gap for the tested workflows. Full final per-scenario timing distributions were not archived, so this is an observed practical near-parity result, not a statistical equivalence claim.Evidence boundary: The firmware transaction, post-FLR full-rate selector checks, Windows driver handoff, and high unlocked native Windows CUDA/cuBLAS throughput are directly demonstrated. The earlier Ubuntu test in issue #77 supplied a matched stock/unlocked GEMM comparison and independent NVIDIA RM rate readback. This report does not claim a separately clock-controlled Windows stock/unlocked benchmark or an independent Windows NVIDIA RM issue-rate readback. The one complete UEFI transaction log, exact Windows benchmark samples, and the scope of the application comparison are distinguished below. Long-term reliability and compatibility with other boards remain unverified.
Hardware and software
sm_8910de:2782/1458:40e895.04.3C.08.E3from earlier board-specific read-only capture; not independently reread in this Windows run0x26), device 0, function 0; Windows00000000:26:00.00xfb000000, 16 MiB; board-specific valuenvidia-smi, not a sustained-load measurement)torch 2.14.1+cu126; ComfyUI/Krea2 runs used the RTX 4070 Tidocs/evidence/rtx4090-pr1-stock/gemm_bench.cu(the source used in Ubuntu issue #77); compiled separately for Windowssm_89and linked to cuBLAS; Windowsnvccreported CUDA release 12.6,V12.6.20; the linked cuBLAS library build was not independently recorded610.43.03assets staged on the USB stickUEFIPROBE, launched manually from the motherboard's F11 UEFI boot menuLightEssence/gpu-unlock-adaatfbff6979986260732733630b8c204e27eb846c66, corresponding to PR #96 head at the timeThis is not an MSI Z490 or Huananzhi X99 test. Their device paths, BAR0 addresses, GPU topology, loaded UEFI driver bytes, and Windows ESP details must not be applied unchanged to this B450 machine.
Local Windows port and implementation
1. Fork and board-specific profile
A separate, initially fail-closed working directory,
windows/ad104-gigabyte-b450/, was derived from the Gigabyte X99 UEFI port. The important changes were:0x26, not the X99 board's bus.0xfb000000, not the X99 address.3721223371f2e7f2ce565ce1c4aaee43cb0c012ddb18b73753ff46ef4acaae74and prefix SHA-256e3165826d5217fb3b4e758f3e9ad3ae95ffa074e994dc774b8f82cd14a8ac96f.bootmgfw.efiwith SHA-2562d60a2203865122dad22772136b3d905167d9dcf926d602bb5f48b3b6668abec; EFI partition size in the board profile was 409,600 sectors. The machine-specific ESP partition GUID was kept locally and is not reproduced here.#error B450_PORT_BLOCKEDin the main B450app.c.Important provenance: This B450 adaptation, including its diagnostic scripts, is local experimental work, not an upstream release or a claim that PR #96 already supports this motherboard.
2. Read-only UEFI graph discovery
Earlier read-only captures (
CAP0003) and multiple USB-launched EFI probes established the live driver relationships before any write-capable image was attempted. The final structural probe reported:These values describe the live UEFI snapshot of this particular machine, not universal constants. The preserved archive contained 496 handles; the live probe enumerated 495, while the key 135 active ownership edges matched. The 865 OpenProtocolInformation records include 730 passive/non-owning records and should not be misread as 865 active consumers.
A significant MSI B450-specific detail is that
ConsoleInHandle == ConsoleOutHandlein this firmware session. The first strict C graph contract incorrectly required those handles to be distinct, causingA-self=DENYwith diagnostic bit0x004. Allowing only this console-in/console-out alias (while continuing to reject aliases involving the GPU, GOP child, or PCI root) yielded the finalMATCH/MATCH/MATCHresult. The reads are explicitly non-atomic.The five required local edges are: PCI I/O
BY_DRIVERon the GPU, DevicePathBY_CHILD_CONTROLLERto the GOP child, GOPBY_DRIVER, TextOutBY_DRIVER, and TextOutBY_CHILD_CONTROLLERto the console. Ownership is tied to discovered handles and protocol relationships rather than hard-coded transient handle addresses.3. Exact loaded UEFI driver code identities
DriverBinding interfaces and LoadedImage metadata were checked. Historical handle indexes are omitted from executable logic; handles are discovered afresh at boot. The read-only code-fingerprint profiles are:
StopRVA(RVA, length)0x100x11f00x2a0, 19,962 bytes4b183861d78918e6770d104dd2e65208e8c769b5e41fc742bb92e97c7fb095f20x100x0a3c0x2a0, 7,280 bytes5611b854c94d96dd18e511316d9702e1407895fd52ce1ab6c961891f78d1df950x7000b0x06ec0x280, 137,711 bytes77632902f0ceb0ba2848200f396ab61eacd7910e9cce7c535f65d6cdbe2b6c32The code spans in the archived capture had zero detected code relocations and matching SHA-256. A later live read-only EFI probe reported executable-code
MATCHfor loaded drivers (the supplied photograph explicitly shows GOP and NVIDIA GOP, and the final aggregateRESULT: READ-ONLY STRUCTURE MATCHED). A pointer to a validStopmethod does not by itself prove that stopping, restarting, or reconnecting a driver is safe.4. Three-stage console/GOP release
The final local B450 UEFI source adapted the three-stage
GuMsiRelease()logic fromwindows/ad104-msi/msi_release.cinto the B450 application'sx99_release.c, withGuMsi*function names mapped to the B450 application's existingGuX99*entry points. These names are compatibility names inherited from PR #96, not evidence that X99 hardware was used.Release sequence used by the candidate:
StartImage()for Windows Boot Manager.The adapted code retained strict driver-code identity pins, the expected UEFI graph-delta logic, PCI command/configuration checks, and stop-on-error behavior. The release source SHA-256 was:
The design does not claim an automatic, validated GOP rebind/rollback after a partial detach. A post-mutation failure may deliberately halt with no display until power is removed. That remains a material unresolved safety limitation, even though the fully logged attempt succeeded.
5. Build and USB staging
The complete application was compiled from 15 C translation units using Clang targeting
x86_64-pc-windows-msvcandlld-linkas a freestanding PE32+ EFI application. Build validation reported EFI subsystem, relocations, and no imports/TLS/CLR.The original B450
app.cretainedB450_PORT_BLOCKED; only a temporary build copy excluded that compile-time directive to link the actual write-capable experimental image. The resulting EFI was not safety-blocked at runtime by that source directive.The five firmware inputs present in the local
~/.cache/gpu-unlock/assetswere checked against exact expected lengths/hashes and copied to the removable UEFI volume:booter_load_ad102.bin6ee05b20e1dc244c08c052f36ef28469b8d09f4955d1fe33e48a179e11a7fd49v67-ad102-610.43.03-four-plm.bin44c36b2d6b3424e53e18f3e55db85c833655de071ce66ce42749588a4a7dc8cbgsp_ga10x.bin572373620a37418f24dc16b5031c39338778c3257e48e8408de9a57291b24f3agsp_boot_ad102.bin45d6335a8185d6ff13e8d1484cea73f68d3d13aa1c19dc080ed1c3482dd5bac0gsp_boot_desc_ad102.bin83f8f3f1f5f9496e0ea8fc7103c2beb64d0b6de2f5ffe725f13514de5a95fa42The staging script reported:
The USB had an original
EFI/BOOT/BOOTX64.BACKUP.EFI. No original Windows or Ubuntu ESP, boot-variable, NVIDIA Windows driver, or VBIOS modification was performed as part of USB staging. The experimental EFI itself did write GPU/PCI state during the actual unlock.Execution: Cold shutdown and AC-power removal, then a manual one-shot boot from the removable UEFI drive using the motherboard's F11 menu. The application offers an explicit
[U]unlock action,[S]/ESCstock-Windows option, and a 30-second stock-Windows timeout. The operator choseU; this was not an automatic unlock at startup. The machine successfully entered Windows after the experimental operation.Physical boot evidence:
AD104-UNLOCK/RUN0001.TXTThe complete original log resides on the USB; the following verbatim lines are selected from the user's
Get-Content ... -Tail 60output. Runtime DMA addresses and driver handle pointers are deliberately omitted from this public report, since they are process/boot-specific and not part of the required device profile.FWSEC and payload
The internal log calls its firmware stages
AD102; this identifies the reused firmware/payload path, not the physical chip (which is AD104 /0x194000a1). The tolerated Falcon pre-reset polling timeout should be reported as a log observation, not silently erased or treated as a fatal failure.Speed selector changes and PCIe FLR
Nuance: Certain permission-register values are shown in the raw log as reverted to their earlier values after FLR; the separate selector readback remained
full=1. This report claims preservation of the speed selectors across the single reset—not permanent persistence of every FWSEC permission register.Cleanup and Windows handoff
The final
TRANSACTION OKline precedes a last unlogged pre-Windows check andStartImage(): it does not alone prove the OS booted. The separate observation that the operator reached Windows andnvidia-smi/PyTorch worked establishes successful handoff in this specific run. The log also records a tolerated PCI status drift after FLR; it is not evidence of an unchanged PCI configuration byte-for-byte.Windows driver and independent compute observations
The operator captured the following
nvidia-smiresult after Windows boot:This idle snapshot confirms successful normal-driver initialization and an active desktop, not sustained-load power or thermals. No Code 43 problem was observed or reported, but the exact Windows Device Manager diagnostic state was not separately captured.
Native Windows CUDA/cuBLAS benchmark after unlock (October 28, 2026)
Source:
docs/evidence/rtx4090-pr1-stock/gemm_bench.cu, the identical source used in the successful Ubuntu test documented in issue #77. The Windows and Ubuntu executables were compiled separately, so the source and workload are matched while the complete toolchain and operating-system environments are not identical.Method:
cublasGemmEx,CUBLAS_GEMM_DEFAULT_TENSOR_OP; FP16 or BF16 input matrices with FP32 accumulation, square matrix sizes 1024³, 4096³, and 8192³; CUDA targetsm_89; 10 warmups, 20 timed GEMMs per repetition, five repetitions. Throughput is based on CUDA-event elapsed time; the table reports the median and best of five repetition rates. The benchmark validates every output cell against its deliberately simple, deterministic expected result.In total, the six benchmark configurations checked 169,869,312 output elements, reporting no mismatches for these exact-reference patterns. In a separate monitoring capture during this performance evaluation, the GPU's SM clock was predominantly 2595–2640 MHz under active load, with momentary excursions outside that range; observed board power reached approximately 209 W, below the 285 W board limit. These telemetry samples are a partial observation rather than synchronized per-GEMM averages.
The final unlocked Windows dataset is presented on its own merits. A controlled stock/unlocked Windows ratio under demonstrably identical operating conditions is not claimed from these measurements. The prior Ubuntu report includes such an A/B comparison and an independent rate readback.
Windows vs Ubuntu: identical cuBLAS source, different OS/toolchain
The unlocked GPU throughput was compared using the same
gemm_bench.cusource and the same FP16/BF16 workloads with FP32 accumulation on the same Gigabyte RTX 4070 Ti. Both operating systems completed the benchmark's numerical checks (failures=0).At 8192³, Windows reached 98.6% of the Ubuntu FP16 throughput and 98.9% of the Ubuntu BF16 throughput. These results establish near-parity in large-matrix CUDA/cuBLAS throughput after unlock for this particular GPU. Smaller matrices exhibit workload-dependent differences. This comparison uses matching benchmark source and mathematical workloads, but not identical compiled binaries or an isolated measurement of operating-system overhead: Ubuntu used CUDA Toolkit 13.4.3, while Windows
nvcc --versionreported 12.6.20; the NVIDIA drivers also differed.Submitted raw Windows unlocked timing samples (milliseconds per GEMM)
Each five-element array records per-repetition CUDA-event milliseconds per GEMM (20 GEMMs per repetition), directly from the measured unlocked Windows run. Every configuration returned
failures=0.Scope of validation:
failures=0supports correctness for the benchmark's deliberately simple exact-reference input patterns; it is not a broad randomized numerical-validation campaign for Windows. The earlier Ubuntu issue #77 included additional varied-input checks. The Windows benchmark does not replace an independent NVIDIA RM issue-rate readback.ComfyUI / Krea2 / DynamicVRAM: final cross-OS performance observation
The operator compared image generation on the same Gigabyte RTX 4070 Ti using unlocked Ubuntu and unlocked Windows, including text-to-image and reference-guided Krea2 workflows with DynamicVRAM. In the latest follow-up comparison, the operator reported that Windows and Ubuntu differed by only approximately 0.5 seconds per sampling step. For these practical workloads, this is near-parity, and the operator no longer considers the remaining difference material to the choice of operating system.
The 12-step figure is an arithmetic extrapolation, not a separately measured end-to-end duration. It excludes reference preprocessing, model loading, VAE decoding, and image saving. The latest comparison was reported by the operator without a separate per-scenario timing table, confidence interval, repeated-run variance, or side-by-side software manifest. It should therefore be described as practical performance parity in the observed workflow, not mathematical or statistical proof of zero OS overhead.
Taken together with the 98.6–98.9% of Ubuntu cuBLAS throughput at 8192³ shown above, the latest ComfyUI observation supports the practical conclusion that the experimental Windows UEFI path does not impose a material performance penalty compared with Ubuntu on this specific system and workload.
Relation to prior Ubuntu result
The same card previously showed an independently confirmed native Ubuntu unlock in issue #77, using
gpu-unlock-ada 1.1.1and NVIDIA open kernel driver615.78.08. That Linux test included an NVIDIA RM speed-rate readback (fmla32,imla2,imla4:1stock →0unlocked), matched stock/unlocked cuBLAS GEMM tests, zero reported numerical mismatches for the exercised inputs, and a subsequent cold stock boot that restored the half-rate state.This Windows result adds B450-specific UEFI driver/console ownership mapping, exact loaded-driver fingerprints, staged GOP release, firmware transaction and FLR, then a successful Windows WDDM-driver boot and independently measured unlocked native Windows CUDA/cuBLAS performance at near-Ubuntu throughput. The Linux report separately provides matched stock/unlocked benchmarks, an NVIDIA RM-rate readback, and broader varied-input validation not performed in this Windows follow-up.
Known limitations, confidence, and maintenance implications
failures=0, reaching 144.084844 TFLOPS FP16 and 144.489097 TFLOPS BF16 at 8192³. A separate rigorously frequency-matched Windows stock/unlocked A/B result is not asserted in this report; Ubuntu issue #77 supplies the independent A/B evidence. An NVIDIA RM issue-rate getter has not been recorded under Windows.B450_PORT_BLOCKEDremains in the primary source; the physically run EFI was built from a temporaryapp_candidate.cexcluding that directive, and was capable of real GPU writes. A source-level#erroris not protection against executing this EFI binary.full=1is significant but does not substitute for a separate SM-rate readback by NVIDIA's running driver.Suggested upstream follow-up
This is a concrete board-specific Windows success report, not a claim of general AD104 Windows support. It may be useful to upstream for:
ConsoleInHandle == ConsoleOutHandlebehavior and exact five-edge GOP/console ownership structure.Conclusion: On this specific MSI B450 + Gigabyte RTX 4070 Ti configuration, the fully logged Windows UEFI attempt completed the unlock transaction, preserved full-rate selector state after PCIe FLR, and handed off successfully to the unmodified NVIDIA WDDM driver. A native unlocked Windows CUDA/cuBLAS run measured 144.084844 TFLOPS FP16/FP32 and 144.489097 TFLOPS BF16/FP32 on 8192³ GEMM, with no output mismatches in any of the six recorded benchmark configurations. The corresponding Ubuntu unlocked results were 146.122117 and 146.070428 TFLOPS, placing Windows within 1.4% / 1.1% of Ubuntu on these large-matrix workloads. In the latest ComfyUI/Krea2 comparison, the operator observed an approximately 0.5-second-per-step cross-OS difference, regarded as negligible for practical use. No independent Windows NVIDIA RM speed-rate readback, frequency-controlled Windows stock/unlocked benchmark, second full UEFI transaction log, or long-term reliability validation is claimed. This is a board-specific experimental success, not evidence of general Windows AD104 compatibility.
After unlocking, my RTX 4070 Ti achieves about 87-88% of the performance of the stock RTX 4090 in large FP16/BF16 cuBLAS calculations with FP32 accumulation, falling only about 12-13%. It sounds like magic.