mirror of
https://github.com/Zagitta/gpu-unlock.git
synced 2026-12-03 19:44:49 +07:00
[GH-ISSUE #135] Compatibility report: RTX 3060 Laptop 6 GB (10de:2520, Lenovo 17aa:3a5d) - unlocks only with NVreg_GpuInitOnProbe=1, likely root cause for the 'no speedup' reports #99
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Zagitta/gpu-unlock#99
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 @andreas715 on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/Zagitta/gpu-unlock/issues/135
TL;DR: this board unlocks, but only when the NVIDIA driver is told to initialise the GPU
at PCI probe (
NVreg_GpuInitOnProbe=1). With the 595 default (init on first client open) theselectors are written and verified pre-driver, then re-latched during the first client-init and
the rate stays at stock. Related: #53, #125 (boards that gained), #124, #111 (unlock completes,
no speedup).
Result
gpu_unlockcompletes on this board and the selectors verify before the driver binds, but thetensor rate stays at stock. Root cause: the 595 driver's GPU init lifetime. It initialises the
GPU on the first client open and stops it on the last client close, so the device is
initialised (and torn down) again between the module's pre-driver write and the first CUDA
process, which re-latches the selectors.
Setting
NVreg_GpuInitOnProbe=1- initialise at PCI probe, before any client exists - makes theunlock take effect: FP16 +55%, BF16 +56%, TF32 +66%, FP32 control flat. Reproduced four times
across three GEMM sizes, with GSP on and GSP off.
Card
Lenovo laptop (subsystem
17aa:3a5d), AMD Ryzen 7 5800H, RTX 3060 Laptop GPU 6 GB (GA106M),VBIOS
94.06.21.00.23, 30 SMs. Hybrid graphics: the internal panel is driven by the AMD iGPU(
nvidia-drm: Cannot find any crtc or sizes), the dGPU is CUDA-only and never leaves D0.PCI IDs
VBIOS version:
94.06.21.00.23Software
Kali rolling, kernel
7.0.12+kali-amd64, NVIDIA595.91.07proprietary (DKMS), Secure Bootdisabled, kernel lockdown none, initramfs-tools 0.151, power limit 85 W current / 90 W max.
The module is unsigned and taints the kernel.
gpu-unlockataf28cbbplus the one-line local patch adding0x2520tosupported_ids(same approach as #53 / #125), DKMS install, firmware generated locally into
/usr/lib/firmware/gpu-unlock/610.43.03,initramfs-toolsdrop-in, kernel command linegpu_unlock.targets=0000:01:00.0.Measurements
cuBLAS
cublasGemmEx, FP32 accumulate, 8 warm-up + 16 timed, median, AC,platform_profile=performance. Cross-checked withtorch.matmul(reduced-precisionreductions off).
GpuInitOnProbe=1, GSP offGpuInitOnProbe=1, GSP on4096³ with the fix: FP16 38.0, BF16 40.9, TF32 20.9, FP32 6.78.
2048³ with the fix: FP16 40.6, BF16 42.0, TF32 22.8, FP32 6.62.
GSP is irrelevant to the unlock (both columns match). It does cost VRAM:
NVreg_EnableGpuFirmware=1leaves CUDA with 5935 free / 6054 total MiB,=0gives5686 / 5809 - so GSP off is worth ~245 MiB and is the configuration to keep here.
Idle: 9.2 W at 210 MHz with probe init, 11.4 W before - no idle power penalty.
Load: 82-89 W, 1770 MHz, 55 °C.
Kernel log
Pre-driver, with the fix in place (
FEAT_PLMadded by a logging-only local patch):The same log is printed with the default init lifetime, and the rate still stays flat - the
selector write is not the part that fails.
Evidence that the re-latch happens at driver init
SS0=0x31501126(its pre-unlock value),SS1=0x6,FEAT_PLM=0xffffff8f- back to the values the module recorded atentry.(
before 0x31501126 -> after 0x31501126): host access is protected again once the GPU hasbeen initialised.
NVreg_EnableGpuFirmware=1) vs off (=0): identical, before and after. Not theGSP axis.
runtime_suspended_timewas 395 ms over 76 s uptime; the dGPU stays in D0.deepands2idleattempts abortwith
nv_pmops_suspend returns -5becauseNVreg_PreserveVideoMemoryAllocations=1needsthe driver's procfs suspend interface. Suspend-based evidence is void here.
What does not work: nvidia-persistenced
Holding the GPU with
nvidia-persistenced(persistence_mode: Enabled) does not preservethe selectors: 24.48 / 25.78 / 13.14 / 8.66, i.e. stock. Mechanically expected in hindsight -
the daemon is itself the first client, so its client-open init is the very init that re-latches
the selectors. Only initialisation that happens before any client opens the device
(probe-time) keeps them.
Caveat: shutdown/restart can stall while the unlock is active
Correction to my first reading: this is a shutdown stall, not a boot hang. Twice on this
machine, pressing restart produced a dark screen with the power LED still on and no further
progress; the next power-on then worked normally (that "failed boot" never existed - the
machine never finished shutting down, so there was no journal for it). Recovery both times:
hold the power button, cold power-on.
Nothing survives in the journal past
systemd-shutdown: Sending SIGTERM to remaining processes...- journald stops there on this box even on clean shutdowns - so the stalled stepis not directly visible. The prime suspect is the driver's power-management path rather than
the module: this machine has
NVreg_PreserveVideoMemoryAllocations=1andNVreg_EnableS0ixPowerManagement=1set, and the same driver already fails suspend withi.e. those parameters require the procfs suspend integration (
nvidia-persistenced-style/proc/driver/nvidia/suspend), and it is not configured here.Confirmed fix: with both parameters removed, the same restart that had wedged twice shut
down instantly. So the stall was the driver's shutdown/power-management path calling into a
suspend interface that was never set up, not
gpu_unlock- the module only runs at boot.Not yet explained: one boot after that fix came up on a text console instead of the GUI (no
journal entry exists for it at all, so it likely never reached userspace; the panel was showing
the previous shutdown console). Possibly unrelated flakiness on this machine, which the owner
says predates the unlock. Worth flagging only so nobody blames the module for it.
Why other boards and drivers differ
In 595
GpuInitOnProbedefaults to0(init on first client open); in 615 the default becomesAUTO, which initialises at PCI probe for an ordinary PCI GPU. That matches the reports: the2520 boards that gained ran 615.78.08 (#125) and 595.99.02 with open modules (#53), while the
"unlock completes, no speedup" reports (#124 3070 laptop, #111 3050 6GB) are consistent with a
teardown-on-close init lifetime eating the unlock the same way.
Suggested upstream change: check and log this parameter when the unlock verifies but the
driver about to bind is 595 or older with probe-time init disabled - that would turn a silent
no-op into a one-line hint for every mobile report.
Reproducing / reverting
Keep
gpu_unlock.targets=0000:01:00.0on the kernel command line. Removing it (or runningrevert.sh) disables the unlock without touching the driver parameter.