mirror of
https://github.com/Zagitta/gpu-unlock.git
synced 2026-12-03 19:44:49 +07:00
[GH-ISSUE #17] Compatibility report: works inside a Proxmox VM (vfio-pci passthrough), Ubuntu 22.04 guest / kernel 5.15, 2x RTX 3090 — +65% FP16, +66-67% BF16, +72-74% TF32 GEMM (5.15 build fix included) #15
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Zagitta/gpu-unlock#15
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 @Filaind on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Zagitta/gpu-unlock/issues/17
Compatibility report for a setup not covered yet: 2x RTX 3090 passed through to a Proxmox VM with vfio-pci, with gpu-unlock running inside the guest. The guest is Ubuntu 22.04 with kernel 5.15, which needs a small build fix (patch below).
Result: both cards log
gpu_unlock: unlocked, the NVIDIA driver binds normally in the guest, and there are no Xid/NVRM errors in the guest kernel log. Dense GEMM: +65% FP16, +66-67% BF16, +72-74% TF32, with no power cap (420 W).System
10de:2204, subsystem1569:f278, VBIOS94.02.42.00.9D, power limit 420 W. PCIe Gen3 x8 each (both cards in a consumer X370 board). Hostreset_methodisflr bus.7.0.2-6-pve. Cards bound tovfio-pciviaoptions vfio-pci ids=10de:2204,10de:1aef. Nothing is installed on the host.cpu: host,hostpci0: 0000:08:00,pcie=1andhostpci1: 0000:09:00,pcie=1. In the guest the cards are at0000:01:00.0and0000:02:00.0.5.15.0-198-generic, NVIDIA open kernel module610.57.04(from the.runinstaller, DKMS), dkms 2.8.7. No Secure Boot.a9b0c75(currentmain). Kernel cmdline:gpu_unlock.targets=all.Why inside the guest, not on the host
I did not try installing on the host, for this reason. When the VM starts, the host log shows each GPU reset together with its audio function (
08:00.0and08:00.1reset at the same moment). That looks like a secondary bus reset: the audio function has no FLR, so QEMU falls back to a hot reset of the bus. As I understand it, the unlock is only designed to survive an FLR, so a host-side unlock would probably be wiped on every VM start (not tested).Inside the guest it works because vfio-pci virtualizes the FLR. When the module calls
pcie_flr()in the guest, the host log shows a reset of function 0 only (vfio-pci 0000:08:00.0: resetting/reset done, the same for09:00.0), i.e. a real FLR. The selectors survive it:The second card (
02:00.0) logs the same (entryss0=0x60521132 ss1=0x6). Both cards also logpoll timeout toleratedandFalcon pre-reset timeout tolerated per HW bug 3419321twice; as in #15, this looks informational.No host power cycle was needed. A full VM stop/start (
qm reboot) was enough to get a clean entry state (plm=0xffffff8f,wpr2_hi=0x0) on both cards, even though the cards had been used by the NVIDIA driver in the previous VM boot.Install notes
linux/aperture.hdoesn't exist before 6.0, sounlock_610.cdoesn't build on 5.15. I used the fbdev helperremove_conflicting_pci_framebuffers()(exported in 5.15) on older kernels. On a passthrough card in a VM there is no firmware framebuffer anyway, but the fallback keeps the efifb/vesafb case covered:(The unit tests compile
unlock_610.cagainst the shims intests/unlock_shim, so I ranmake teston the unpatched tree and applied the patch only to the DKMS copy.)firmware/fetch_artifacts.pyuseshashlib.file_digest, which is 3.11+. Ubuntu 22.04 ships 3.10, so I ranmake inputs firmware PYTHON=<python3.12>. All pinned SHA-256 checks passed, andmake testpassed (5/5).make install-deb, because of the patch above and a pinned dkms 2.8.7. Firmware went to/usr/lib/firmware/gpu-unlock/610.43.03, the sources were added to DKMS asgpu-unlock/1.0.0, and I installedpackaging/boot/initramfs-tools.confas/usr/share/initramfs-tools/modules.d/gpu-unlock.conf, then ranupdate-initramfs -u. The rebuilt initramfs containsgpu_unlock.koand all five firmware files.MODULES=most) carries modules but notnvidia.ko, because the.rundriver loads from the root filesystem. So the stockmodules.ddrop-in runsgpu_unlockbeforenvidia. The NVIDIA driver loaded about 1 s afterunlocked.Dense GEMM, 8192x8192
PyTorch
2.14.0+cu130in the guest,torch.matmul, 5 warm-up runs, then 5 windows of 10 matmuls each, median TFLOPS timed with CUDA events.allow_fp16_reduced_precision_reductionandallow_bf16_reduced_precision_reductionwere set toFalse(FP32 accumulation), and TF32 was enabled explicitly withallow_tf32. Power limit 420 W on both cards in both runs.Numerics (unlocked only): relative Frobenius error against an FP64 reference on a 4096x4096 random product: FP16 3.60e-4, BF16 2.88e-3, TF32 2.94e-4. Both GPUs gave identical figures. These are normal for the input precisions, but I did not run the same check in the stock run, so this is not a stock-vs-unlocked parity test like #15.
Caveats
@dv0ps commented on GitHub (Oct 24, 2026):
If you run Ubuntu LXC containers on Proxmox with GPU passthrough, would you need to modify the host in this case?
@Filaind commented on GitHub (Oct 24, 2026):
@dv0ps Yes, you need to install gpu-unlock on the Proxmox host system
@pcfreak30 commented on GitHub (Oct 25, 2026):
Interesting. this is effectively my setup so im curious how doing the state/mem hacks inside the vm matter/affect anything vs outside.
@Zagitta commented on GitHub (Oct 27, 2026):
Thanks for the report! Success reports now live in one place: https://github.com/Zagitta/gpu-unlock/discussions/238. Closing this so the issue tracker stays focused on cards where the unlock fails. Your numbers stay searchable here under the
success-reportlabel. If something stops working later, please open an unlock failure issue.