mirror of
https://github.com/Zagitta/gpu-unlock.git
synced 2026-12-03 19:44:49 +07:00
[GH-ISSUE #124] Compatibility report: RTX 3070 Laptop 8GB (10de:24dd) — unlock succeeds, no FP16/BF16 speedup #93
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Zagitta/gpu-unlock#93
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 @dirtyfrog77 on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/Zagitta/gpu-unlock/issues/124
Result
Unlock completed, but no speedup
Card
NVIDIA GeForce RTX 3070 Laptop GPU (GA104M / Max-Q), 8 GB VRAM, Lenovo Legion 5
PCI IDs
VBIOS version
00000000:01:00.0, 94.04.3F.00.C6
Is the card modified?
Stock
Distribution
Ubuntu 26.04.1 LTS (Resolute Raccoon)
Kernel
7.0.0-38-generic
NVIDIA driver
595.99.02, open kernel modules
Initramfs generator
dracut
gpu-unlock version and install method
1.0.0, make install (Debian DKMS + firmware packages);
af28cbbKernel command line
BOOT_IMAGE=/boot/vmlinuz-7.0.0-38-generic root=UUID=2b693fd2-f0f8-45a8-9b15-a73c010a1f4a ro quiet splash crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M gpu_unlock.targets=0000:01:00.0
Setup
Lenovo Legion 5 laptop, AMD integrated graphics + RTX 3070 Laptop GPU using hybrid graphics. GPU used for local AI/CUDA workloads and not the active display. Stock 115 W GPU limit, 8 GB VRAM, Ubuntu 26.04.1, NVIDIA open kernel modules.
Secure Boot enabled. gpu_unlock DKMS module signed with an enrolled local MOK (verified via modinfo).
Ubuntu uses dracut, but the generated Debian package installed the initramfs-tools configuration instead of the dracut configuration. Manually copied the repository's packaging/boot/dracut.conf to /etc/dracut.conf.d/90-gpu-unlock.conf and rebuilt the initramfs. Verified the signed module and all five firmware files were included.
Activated only for a single boot using a temporary GRUB kernel parameter. Subsequent cold boot without the parameter used for the stock comparison.
Kernel log
Benchmark before and after
PyTorch 2.14.1+cu132, CUDA 13.2, RTX 3070 Laptop GPU (SM 8.6).
8192 x 8192 dense torch.mm GEMM, 10 warmup runs, 20 timed runs, CUDA events, median elapsed time, persistent output buffer. FP16 accumulation disabled; reduced-precision reductions disabled for FP16/BF16. TF32 run using torch.set_float32_matmul_precision('high'); FP32 control using 'highest'.
Initial 4096 x 4096 test also showed negligible change:
FP16 30.88 -> 32.59 TFLOPS; BF16 32.81 -> 32.57; TF32 16.31 -> 16.27; FP32 7.53 -> 7.54.
Benchmark run with unlock active, followed by full power-off and cold boot without gpu_unlock.targets, then the same script run again. Results are consistent with ordinary variation and show no meaningful acceleration.
Suspend and resume
Not tested
Anything else
Boot sequencing appears correct: gpu_unlock reported success at 2.439 seconds, before the NVIDIA open kernel module loaded at 8.696 seconds and nvidia-drm at 8.788 seconds.
Despite the success message, FP16/BF16 and TF32 remain essentially unchanged. Is it possible the NVIDIA driver or laptop power-management firmware resets the speed selectors during initialisation on this GA104M variant (10de:24dd, VBIOS 94.04.3F.00.C6)?
Happy to run additional safe diagnostics or a more targeted CUDA benchmark to check whether the selectors persist. Avoiding undocumented register writes without guidance.
Also worth noting the Debian package/dracut integration mismatch described above, which prevented the module and firmware being included in the initramfs until manually corrected.
@dirtyfrog77 commented on GitHub (Oct 26, 2026):
<head></head>Thanks for linking #135. I've tested the proposed
NVreg_GpuInitOnProbe=1workaround on my RTX 3070 Laptop (10de:24dd), but unfortunately I'm still seeing no performance improvement.Configuration:
NVIDIA 595.99.02 open kernel modules.
Added
options nvidia NVreg_GpuInitOnProbe=1to/etc/modprobe.d/nvidia-gpuinit.conf.Included the configuration in my dracut initramfs and rebuilt it.
Booted with
gpu_unlock.targets=0000:01:00.0.Kernel reports
gpu_unlock: unlockedbefore NVIDIA initialises.modprobe --show-depends nvidiaconfirms the option is configured:No parameter rejection errors appear in the kernel log. However,
GpuInitOnProbeisn't exposed in/proc/driver/nvidia/paramsor/sys/module/nvidia/parameters, so I haven't independently confirmed the effective driver state.8192×8192 PyTorch GEMM results (TFLOPS):
Precision | Stock | Unlock only | Unlock + GpuInitOnProbe=1 -- | -- | -- | -- FP16 | 32.39 | 32.71 | 32.69 BF16 | 32.31 | 32.61 | 32.61 TF32 | 16.23 | 16.31 | 16.14 FP32 | 10.19 | 10.10 | 10.16Unfortunately, the results are still effectively identical.
One potentially relevant detail is that this laptop has
NVreg_PreserveVideoMemoryAllocations=1configured by Ubuntu, althoughEnableS0ixPowerManagement=0.Would a selector readback or a more targeted CUDA instruction benchmark help establish whether NVIDIA is resetting the unlock, or whether this particular GA104M variant behaves differently?
Happy to carry out further diagnostics.
@MiQieR commented on GitHub (Oct 27, 2026):
Independent reproduction on Lenovo Legion R9000P 2021H / Legion 5 Pro 2021 (16 GB VRAM mod)
I can confirm the same result: unlock completes successfully, but no FP16/BF16/TF32 speedup. Reporting details in case they help narrow the root cause.
Card
Same device ID as the original report:
10de:24dd(GA104M / RTX 3070 Laptop GPU), 16 GB VRAM (memory-modified from 8 GB, confirmed bynvidia-smishowing 16384 MiB).10de:24dd/17aa:3a4f/ A10000:01:00.0(audio function0000:01:00.1,10de:228b)94.04.77.00.8D(differs from the94.04.3F.00.C6in the original report)boot_vga=1, no iGPU visible on PCI)Software
Tested on two drivers, both with
gpu-unlockat commit6081407(v1.1.0) built from source viamake deb, installed through the Debian DKMS + firmware packages. Secure Boot disabled, kernel lockdown none.6.8.0-106-generic6.8.0-106-generic590.48.01proprietary (nvidia-driver-590-server)580.196.07proprietary (nvidia-driver-580)NVreg_DynamicPowerManagement0x02(Ubuntu default, runtime D3 on)0x00(runtime D3 off)NVreg_EnableGpuFirmware=0)MODULES=mostThe second run was done specifically to address the two most likely culprits from this issue and #135/#206: runtime D3 powering the GPU off (resetting selectors) and driver GPU-init timing. I used
NVreg_DynamicPowerManagement=0x00andNVreg_EnableGpuFirmware=0, matching the successful ThinkPad P1 config in #206. Note that the580driver does not exposeNVreg_GpuInitOnProbe(that parameter was introduced in 595), so on 580 the GPU should initialize at PCI probe rather than first client open — i.e. the #135 re-latch mechanism should not apply.Kernel log
Unlock completed cleanly on both boots, with
gpu_unlockloading before NVIDIA in the initramfs (confirmed by timestamps: unlock at 33.9 s, NVRM at 35.1 s). Same full sequence as the original report:No Xid errors, NVIDIA driver binds normally afterwards,
nvidia-smihealthy, 16 GB visible.Benchmark
PyTorch 2.8.0+cu128, dense 8192³
torch.mmwith FP32 accumulation, reduced-precision reductions disabled for FP16/BF16, TF32 viaset_float32_matmul_precision('high'), FP32 control via'highest'. 10 warmups + 20 timed runs × 3 rounds, CUDA events, persistent output buffer, median. AC power, GPU stayed in D0 for the whole second run (runtime D3 off).All within ±1% run-to-run noise, no consistent direction. Power/temperature/clocks matched the baseline (~126 W under FP16/BF16, ~1.8 GHz SM, 56 °C, no thermal throttle), so this is not a power-limit artifact. The card is running at ~36 TFLOPS FP16, which is ~95% of the half-rate ceiling for 40 SMs at that clock — i.e. it is solidly at stock half-rate, with no headroom being left on the table by clocks or power.
Interpretation
Since runtime D3 was off, GSP was off, the driver was an older (probe-time-init) branch, and the unlock logged success with SS0/SS1 verified at
0x88888888/0x8across FLR, the "driver re-initialized and re-latched the selectors" explanation from #135 does not appear to account for this card. That leaves two candidates:24ddmobile part the BF16/FP16 double-rate is hard-fused (strap/fuse), so SS0/SS1 are written and read back correctly but have no effect — similar in spirit to #28, where selectors verified held at runtime yet the rate stayed at half.Worth noting: other GA104M laptop SKUs do gain from this unlock (
249d+95% in #101,24dc+65% in #105,249cin #206,24e0+50% in #182). So this does not look like "all GA104M is fused"; it looks specific to24dd(or at least the Lenovo variants of it, since both this report and the original are Lenovo).Hypothesis for testing
If someone with a
24ddcard can run a read-only BAR read of SS0/SS1 after the driver has bound and a CUDA context has been created (as was done in #28), that would cleanly distinguish hypothesis 1 (selectors reverted by driver init) from hypothesis 2 (selectors held but ignored by hardware). I did not do this because I did not want to write an out-of-tree read-only module without more discussion, and #28 already shows that "selectors held" can coexist with "no speedup".Happy to run further read-only diagnostics if someone can point me at a safe way to read those registers on a live card.