[GH-ISSUE #184] Compatibility report: Gigabyte RTX 3060 12 GB (10de:2544), VBIOS 94.06.54.00.2E — unlock failed (-22): FWSEC dmem_size 0x980 not 256-aligned; failed unlock then blocks nvidia #168

Open
opened 2026-10-27 06:16:46 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Ronrey66 on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/Zagitta/gpu-unlock/issues/184

Result

Unlock failed (error in the log)

Card

Gigabyte GeForce RTX 3060 12 GB (GA106, subsystem 1458:4074), retail

PCI IDs

(as seen in the guest)

0000:01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106 [GeForce RTX 3060] [10de:2544] (rev a1)
0000:01:00.1 Audio device [0403]: NVIDIA Corporation GA106 High Definition Audio Controller [10de:228e] (rev a1)

VBIOS version

00000000:01:00.0, 94.06.54.00.2E

Is the card modified?

Stock

Distribution

Ubuntu 24.04.5 LTS (Proxmox VM guest)

Kernel

6.8.0-147-generic

NVIDIA driver

595.91.07, open kernel module (Ubuntu prebuilt linux-modules-nvidia-595-server-open; nvidia.ko is not in the initramfs)

Initramfs generator

initramfs-tools

gpu-unlock version and install method

1.0.0, af28cbb, make install (auto-detected install-deb)

Kernel command line

BOOT_IMAGE=/vmlinuz-6.8.0-147-generic root=UUID=... ro console=tty1 console=ttyS0 gpu_unlock.targets=all

Setup

Single RTX 3060 passed through with vfio-pci to a Proxmox q35 VM; gpu-unlock installed inside the guest (as in #17 / #172). Headless, no framebuffer on the card. Stock 200 W power limit. Secure Boot disabled. Entry state was clean (plm=0xffffff8f wpr2_hi=0x0).

Kernel log

pci 0000:01:00.0: entry: plm=0xffffff8f ss0=0x2600112 ss1=0x4 wpr2_hi=0x0
pci 0000:01:00.0: FWSEC: reading PROM at 0x300000
pci 0000:01:00.0: FWSEC: PROM bytes=1048576 signature=0xaa55
gpu_unlock: ROM chain: pos=0x0 data=0x52494350 bytes=65024 type=0x0 last=0
gpu_unlock: ROM chain: pos=0xfe00 data=0x52494350 bytes=83456 type=0x3 last=0
gpu_unlock: ROM chain: pos=0x24400 data=0x5344504e bytes=22016 type=0xe0 last=0
gpu_unlock: ROM chain: pos=0x29a00 data=0x5344504e bytes=399872 type=0xe0 last=128
gpu_unlock: ROM expansion: base=0xfe00 ext=0x24400 adjust=0x14600
gpu_unlock: ROM BIT: offset=0x1b0 size=12 stride=6 tokens=19 adjust=0x14600
gpu_unlock: ROM ucode table: offset=0x8b19e version=1 header=6 stride=6 entries=16
gpu_unlock: FWSEC descriptor: offset=0x414c8 ROM_bytes=1048576 header=0x62c0301
gpu_unlock: FWSEC geometry: image_off=0x41af4 size=0xed00 imem=0xe300 va=0x0 pa=0x0 dmem=0x980 pa=0x0 pkc=0x724 interface=0x1c engine=0x400 ucode=9 signatures=4 versions=0xf bytes=1536
gpu_unlock: FWSEC interface: offset=0x1c version=1 header=4 stride=8 entries=2 FRTS=0x2ffe00000
gpu_unlock: FWSEC mapper: version=3 size=64 cmd_offset=0x940 cmd_size=64
pci 0000:01:00.0: FWSEC fuse: raw=0x3 version=2
gpu_unlock: FWSEC signature selection: versions=0xf fuse_version=2 sig_bytes=384
pci 0000:01:00.0: failure unlock_610.c:364 falcon_hs error=-22 last_mmio=0x8241e0 value=0x3 valid=1 mapped=1 master=1 firmware_started=1 quiesced=0 pages=20606/20606
pci 0000:01:00.0: failure unlock_610.c:1025 unlock_transaction_fwsec error=-22 ...
pci 0000:01:00.0: failure unlock_610.c:534 unlock_transaction_unwind error=-16 ...
pci 0000:01:00.0: firmware did not stop; keeping its DMA buffers until power off
pci 0000:01:00.0: gpu_unlock: unlock failed (-22)
NVRM: request_mem_region failed for 16M @ 0x81000000. This can
NVRM: occur when a driver such as rivatv is loaded and claims
NVRM: ownership of the device's registers.
NVRM: The NVIDIA probe routine failed for 1 device(s).
NVRM: None of the NVIDIA devices were initialized.

/proc/iomem after the failure: 81000000-81ffffff : gpu_unlock (BAR0 still claimed by the module).

Benchmark before and after

Before only (unlock failed). torch 2.8.0+cu128, 8192³ dense GEMM, FP32 accumulation, median of 5 windows, 200 W: FP16 29.06 / BF16 29.04 / TF32 14.68 TFLOPS.

Suspend and resume

Not tested

Anything else

1. Cause of -22: FWSEC DMEM size on this VBIOS is not a multiple of 256.

unlock_transaction_fwsec calls falcon_hs(work, &gsp, 0, fw.imem_size, ..., fw.data_off, fw.dmem_size, fw.dmem_pa, ...) (unlock_610.c:993). falcon_hs validates both transfers with falcon_dma_valid(), which requires !((size | dest | mem_off | src) & 255). With this VBIOS:

  • code: size imem=0xe300, pa/va 0 → passes
  • data: size dmem=0x980, src image + data_off where data_off = imem_size = 0xe300 → 0x980 & 0xff = 0x80 → -EINVAL at line 364

The failure is the pre-check, before falcon_reset() and before any Falcon write or DMA submission (no "Falcon reset done" / "Falcon DMA" lines in the log). The other reports I could find show dmem=0x800 and versions=0x7; this VBIOS has dmem=0x980, versions=0xf, signatures=4. Possibly the data transfer just needs rounding up to the 256-byte DMA block (as long as the rounded range stays inside the image buffer), but I have not tried that and don't know whether the extra bytes are harmless for FWSEC.

2. A preflight failure still leaves the card unusable for nvidia until reboot.

work->firmware_started = true is set at line 992, before falcon_hs() runs its validation, so this pure preflight failure goes down the retention path ("firmware did not stop; keeping its DMA buffers until power off") and the module keeps BAR0. nvidia then fails request_mem_region and no GPU is available for that boot. This looks like the case described in the comment on #38 (setting the retention marker before the first Falcon write). Removing gpu_unlock.targets= and rebooting the VM (no host power cycle) fully recovered the card: GEMM numbers were identical to the stock baseline afterwards.

Happy to test a patch on this card.

Originally created by @Ronrey66 on GitHub (Oct 26, 2026). Original GitHub issue: https://github.com/Zagitta/gpu-unlock/issues/184 ### Result Unlock failed (error in the log) ### Card Gigabyte GeForce RTX 3060 12 GB (GA106, subsystem 1458:4074), retail ### PCI IDs (as seen in the guest) ``` 0000:01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106 [GeForce RTX 3060] [10de:2544] (rev a1) 0000:01:00.1 Audio device [0403]: NVIDIA Corporation GA106 High Definition Audio Controller [10de:228e] (rev a1) ``` ### VBIOS version 00000000:01:00.0, 94.06.54.00.2E ### Is the card modified? Stock ### Distribution Ubuntu 24.04.5 LTS (Proxmox VM guest) ### Kernel 6.8.0-147-generic ### NVIDIA driver 595.91.07, open kernel module (Ubuntu prebuilt `linux-modules-nvidia-595-server-open`; `nvidia.ko` is not in the initramfs) ### Initramfs generator initramfs-tools ### gpu-unlock version and install method 1.0.0, af28cbb, `make install` (auto-detected install-deb) ### Kernel command line ``` BOOT_IMAGE=/vmlinuz-6.8.0-147-generic root=UUID=... ro console=tty1 console=ttyS0 gpu_unlock.targets=all ``` ### Setup Single RTX 3060 passed through with vfio-pci to a Proxmox q35 VM; gpu-unlock installed inside the guest (as in #17 / #172). Headless, no framebuffer on the card. Stock 200 W power limit. Secure Boot disabled. Entry state was clean (`plm=0xffffff8f wpr2_hi=0x0`). ### Kernel log ``` pci 0000:01:00.0: entry: plm=0xffffff8f ss0=0x2600112 ss1=0x4 wpr2_hi=0x0 pci 0000:01:00.0: FWSEC: reading PROM at 0x300000 pci 0000:01:00.0: FWSEC: PROM bytes=1048576 signature=0xaa55 gpu_unlock: ROM chain: pos=0x0 data=0x52494350 bytes=65024 type=0x0 last=0 gpu_unlock: ROM chain: pos=0xfe00 data=0x52494350 bytes=83456 type=0x3 last=0 gpu_unlock: ROM chain: pos=0x24400 data=0x5344504e bytes=22016 type=0xe0 last=0 gpu_unlock: ROM chain: pos=0x29a00 data=0x5344504e bytes=399872 type=0xe0 last=128 gpu_unlock: ROM expansion: base=0xfe00 ext=0x24400 adjust=0x14600 gpu_unlock: ROM BIT: offset=0x1b0 size=12 stride=6 tokens=19 adjust=0x14600 gpu_unlock: ROM ucode table: offset=0x8b19e version=1 header=6 stride=6 entries=16 gpu_unlock: FWSEC descriptor: offset=0x414c8 ROM_bytes=1048576 header=0x62c0301 gpu_unlock: FWSEC geometry: image_off=0x41af4 size=0xed00 imem=0xe300 va=0x0 pa=0x0 dmem=0x980 pa=0x0 pkc=0x724 interface=0x1c engine=0x400 ucode=9 signatures=4 versions=0xf bytes=1536 gpu_unlock: FWSEC interface: offset=0x1c version=1 header=4 stride=8 entries=2 FRTS=0x2ffe00000 gpu_unlock: FWSEC mapper: version=3 size=64 cmd_offset=0x940 cmd_size=64 pci 0000:01:00.0: FWSEC fuse: raw=0x3 version=2 gpu_unlock: FWSEC signature selection: versions=0xf fuse_version=2 sig_bytes=384 pci 0000:01:00.0: failure unlock_610.c:364 falcon_hs error=-22 last_mmio=0x8241e0 value=0x3 valid=1 mapped=1 master=1 firmware_started=1 quiesced=0 pages=20606/20606 pci 0000:01:00.0: failure unlock_610.c:1025 unlock_transaction_fwsec error=-22 ... pci 0000:01:00.0: failure unlock_610.c:534 unlock_transaction_unwind error=-16 ... pci 0000:01:00.0: firmware did not stop; keeping its DMA buffers until power off pci 0000:01:00.0: gpu_unlock: unlock failed (-22) NVRM: request_mem_region failed for 16M @ 0x81000000. This can NVRM: occur when a driver such as rivatv is loaded and claims NVRM: ownership of the device's registers. NVRM: The NVIDIA probe routine failed for 1 device(s). NVRM: None of the NVIDIA devices were initialized. ``` `/proc/iomem` after the failure: `81000000-81ffffff : gpu_unlock` (BAR0 still claimed by the module). ### Benchmark before and after Before only (unlock failed). torch 2.8.0+cu128, 8192³ dense GEMM, FP32 accumulation, median of 5 windows, 200 W: FP16 29.06 / BF16 29.04 / TF32 14.68 TFLOPS. ### Suspend and resume Not tested ### Anything else **1. Cause of -22: FWSEC DMEM size on this VBIOS is not a multiple of 256.** `unlock_transaction_fwsec` calls `falcon_hs(work, &gsp, 0, fw.imem_size, ..., fw.data_off, fw.dmem_size, fw.dmem_pa, ...)` (unlock_610.c:993). `falcon_hs` validates both transfers with `falcon_dma_valid()`, which requires `!((size | dest | mem_off | src) & 255)`. With this VBIOS: - code: size `imem=0xe300`, pa/va 0 → passes - data: size `dmem=0x980`, src `image + data_off` where `data_off = imem_size = 0xe300` → `0x980 & 0xff = 0x80` → `-EINVAL` at line 364 The failure is the pre-check, before `falcon_reset()` and before any Falcon write or DMA submission (no "Falcon reset done" / "Falcon DMA" lines in the log). The other reports I could find show `dmem=0x800` and `versions=0x7`; this VBIOS has `dmem=0x980`, `versions=0xf`, `signatures=4`. Possibly the data transfer just needs rounding up to the 256-byte DMA block (as long as the rounded range stays inside the image buffer), but I have not tried that and don't know whether the extra bytes are harmless for FWSEC. **2. A preflight failure still leaves the card unusable for nvidia until reboot.** `work->firmware_started = true` is set at line 992, before `falcon_hs()` runs its validation, so this pure preflight failure goes down the retention path ("firmware did not stop; keeping its DMA buffers until power off") and the module keeps BAR0. `nvidia` then fails `request_mem_region` and no GPU is available for that boot. This looks like the case described in the comment on #38 (setting the retention marker before the first Falcon write). Removing `gpu_unlock.targets=` and rebooting the VM (no host power cycle) fully recovered the card: GEMM numbers were identical to the stock baseline afterwards. Happy to test a patch on this card.
Author
Owner

@Ronrey66 commented on GitHub (Oct 26, 2026):

Tested #35 on this card: it works.

Build: af28cbb + cherry-pick of fb457b1 (#35), make install (deb + DKMS), Ubuntu 24.04 guest, kernel 6.8.0-147-generic, NVIDIA 595.91.07 open, Proxmox VM with the GPU passed through, Secure Boot off. Cold boot (VM stopped and started) with gpu_unlock.targets=0000:01:00.0.

FWSEC geometry is identical to the ZOTAC board in #35 (size=0xed00 imem=0xe300 dmem=0x980 signatures=4 versions=0xf), so the rounded DMEM fits exactly (0xe300 + 0xa00 = 0xed00).

FWSEC: DMEM load size 0x980 rounded to 0xa00
FWSEC result: scratch=0x0 expected_hi16=0
FWSEC WPR2: low=0x2ffe000 high=0x2ffee00 expected_page=0x2ffe00 end=0x2fff00000
selector write: SS0=0x88888888
selector write: SS1=0x8
pre-FLR selectors: ss0=0x88888888 expected=0x88888888 ss1=0x8 expected=0x8
PCIe FLR returned: result=0
post-FLR SEC2 reset released, GSP halted, BME=0 pending=0 WPR2=1ffffe00:00000000 SS0=88888888 SS1=00000008
gpu_unlock: unlocked

nvidia binds normally, no Xid / NVRM errors.

Stock vs unlocked, same day, 200 W power limit, torch 2.8.0+cu128, FP32 accumulation:

Test Stock Unlocked
FP16 GEMM 8192³ 29.06 TFLOPS 53.75 (+85%)
BF16 GEMM 8192³ 29.04 54.83 (+89%)
TF32 GEMM 8192³ 14.68 27.08 (+85%)
Qwen3.5-4B-Base BF16 forward, 4k tokens 2959 tok/s 4649 (+57%)
llama.cpp Qwen3.6-35B-A3B Q3_K_XL prefill, 12k ~1055 tok/s ~1083 (+3%)

So #35 also covers VBIOS 94.06.54.00.2E (Gigabyte 1458:4074), not only .17. Happy to close this once #35 is merged.

Disclosure: an AI assistant (Claude Code) applied the patch, ran the tests and drafted this comment for the card's owner. The hardware runs and measurements are real.

<!-- gh-comment-id:6425451032 --> @Ronrey66 commented on GitHub (Oct 26, 2026): Tested #35 on this card: **it works.** Build: `af28cbb` + cherry-pick of `fb457b1` (#35), `make install` (deb + DKMS), Ubuntu 24.04 guest, kernel 6.8.0-147-generic, NVIDIA 595.91.07 open, Proxmox VM with the GPU passed through, Secure Boot off. Cold boot (VM stopped and started) with `gpu_unlock.targets=0000:01:00.0`. FWSEC geometry is identical to the ZOTAC board in #35 (`size=0xed00 imem=0xe300 dmem=0x980 signatures=4 versions=0xf`), so the rounded DMEM fits exactly (`0xe300 + 0xa00 = 0xed00`). ``` FWSEC: DMEM load size 0x980 rounded to 0xa00 FWSEC result: scratch=0x0 expected_hi16=0 FWSEC WPR2: low=0x2ffe000 high=0x2ffee00 expected_page=0x2ffe00 end=0x2fff00000 selector write: SS0=0x88888888 selector write: SS1=0x8 pre-FLR selectors: ss0=0x88888888 expected=0x88888888 ss1=0x8 expected=0x8 PCIe FLR returned: result=0 post-FLR SEC2 reset released, GSP halted, BME=0 pending=0 WPR2=1ffffe00:00000000 SS0=88888888 SS1=00000008 gpu_unlock: unlocked ``` nvidia binds normally, no Xid / NVRM errors. Stock vs unlocked, same day, 200 W power limit, torch 2.8.0+cu128, FP32 accumulation: | Test | Stock | Unlocked | |---|---:|---:| | FP16 GEMM 8192³ | 29.06 TFLOPS | 53.75 (+85%) | | BF16 GEMM 8192³ | 29.04 | 54.83 (+89%) | | TF32 GEMM 8192³ | 14.68 | 27.08 (+85%) | | Qwen3.5-4B-Base BF16 forward, 4k tokens | 2959 tok/s | 4649 (+57%) | | llama.cpp Qwen3.6-35B-A3B Q3_K_XL prefill, 12k | ~1055 tok/s | ~1083 (+3%) | So #35 also covers VBIOS `94.06.54.00.2E` (Gigabyte `1458:4074`), not only `.17`. Happy to close this once #35 is merged. Disclosure: an AI assistant (Claude Code) applied the patch, ran the tests and drafted this comment for the card's owner. The hardware runs and measurements are real.
Author
Owner

@Zagitta commented on GitHub (Oct 29, 2026):

Thanks for testing #35 and for the benchmark numbers.

I didn't merge #35 because 2.0 fixes the same problem differently. The FWSEC v3 parser no longer requires dmem_size to be a multiple of 256. It only checks that the size rounded up to 256 still fits in the image. Your card's geometry fits exactly (0xe300 + 0xa00 = 0xed00). The Falcon DMA path also rounds each transfer up to a full 256-byte block, which is what #35 did.

Could you retest on 2.0 (current main)?

  • Build stock 2.0 without the #35 cherry-pick, make install.
  • Cold boot (stop and start the VM) with gpu_unlock.targets=0000:01:00.0.
  • Post dmesg | grep -i gpu_unlock, and say whether nvidia binds and the GEMM numbers match what you got with #35.

If the unlock fails again, please also say whether nvidia still binds afterwards, since that was the second problem in this issue.

If it works, I'll close this issue and #35.

<!-- gh-comment-id:6486420805 --> @Zagitta commented on GitHub (Oct 29, 2026): Thanks for testing #35 and for the benchmark numbers. I didn't merge #35 because 2.0 fixes the same problem differently. The FWSEC v3 parser no longer requires `dmem_size` to be a multiple of 256. It only checks that the size rounded up to 256 still fits in the image. Your card's geometry fits exactly (`0xe300 + 0xa00 = 0xed00`). The Falcon DMA path also rounds each transfer up to a full 256-byte block, which is what #35 did. Could you retest on 2.0 (current `main`)? - Build stock 2.0 without the #35 cherry-pick, `make install`. - Cold boot (stop and start the VM) with `gpu_unlock.targets=0000:01:00.0`. - Post `dmesg | grep -i gpu_unlock`, and say whether nvidia binds and the GEMM numbers match what you got with #35. If the unlock fails again, please also say whether nvidia still binds afterwards, since that was the second problem in this issue. If it works, I'll close this issue and #35.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Zagitta/gpu-unlock#168
No description provided.