mirror of
https://github.com/Zagitta/gpu-unlock.git
synced 2026-12-03 19:44:49 +07:00
[GH-ISSUE #58] Compatibility report: ASUS TUF A15 RTX 3060 Laptop 6GB (10de:2520), Windows UEFI, FP16 +35% / BF16 +49% #41
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Zagitta/gpu-unlock#41
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 @colstone on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/Zagitta/gpu-unlock/issues/58
Result
Unlocked, and FP16/BF16 got faster on an ASUS TUF Gaming A15 FA506QM with an RTX 3060 Laptop GPU 6GB. A custom x64 UEFI adaptation completed the FWSEC/V67 sequence, wrote
SS0=0x88888888, preservedSS1=0x4, completed FLR, and started the existing Windows Boot Manager in the same boot. The NVIDIA Windows driver loaded and the subsequent GEMM measurements showed +35.24% FP16 and +48.89% BF16 throughput.Related: #53 reports this GPU PCI ID on an ASUS G14 under Linux. This report adds an ASUS FA506QM board and a Windows pre-boot implementation.
Hardware and software
0000:01:00.010de:2520, A11043:16a2PMC_BOOT_00xb76000a194.06.17.00.5F28120.3302610.912.7.1+cu128, CUDA12.8610.43.03Booter/GSP/V67, plus FWSEC extracted from this board's PROMThe native UEFI build uses LLVM clang/lld-link 22.1.4 and EDK2 headers. Its transport and transaction implementation were adapted from craftingmod/rtx30-unlock at 5c076dc. The reference checkouts were Zagitta/gpu-unlock at 4189b17 and predator0321/rtx3060-ga106-uefi-experiment at ca3041b.
Benchmark before and after
Dense
8192 × 8192matrix multiplication usingtorch.mm(a, b, out=c), FP32 accumulation, four seconds of warm-up per mode, then five samples of ten iterations each. CUDA events measure GPU time; the tables use the median per-multiply time. Mode order was FP16, BF16, TF32, FP32 in both runs.nvidia-smisampled power after each mode:FP16/BF16 throughput increased with similar end-of-mode power readings. TF32 and FP32 throughput stayed approximately unchanged with this SS0-only configuration.
Adaptation details
1. Initial PCI Command is zero on this hybrid-graphics laptop
The NVIDIA function enters UEFI in D0 with BAR0 assigned, but
Command=0x0000. Its parent bridge already has memory decoding enabled and its memory window covers the entire 16 MiB BAR0.The application resolves the parent bridge chain, obtains exclusive access to the NVIDIA PCI I/O protocol, and enables
EFI_PCI_IO_ATTRIBUTE_MEMORY. This produces matching hardware and protocol state:Command=0x0002, attributes0x200. The firmware transaction subsequently enables Bus Master through the same protocol. After FLR and DMA cleanup, both Command and the original attributes are restored to zero.Using
PciIo->Attributes()for the unlock application's MEM transition keeps the protocol's cached state aligned with the hardware state used by the subsequent Bus Master operation.2. The firmware-provided ROM copy is only 65,024 bytes
PciIo->RomImageexposes the first0xfe00bytes. The complete 1 MiB PROM read through BAR0 contains the extended ROM images and FWSEC. The ROM chain starts at0,0xfe00, and0x15400, with an expansion pointer adjustment of zero.This board's FWSEC data:
0x2c834/0x04ac03010x2cce0/0xe9000xe100/0x8000x400/93/0x70x3/20x1/1The existing parser handles these offsets and lengths directly.
3. The existing layout calculation works with 6GB
The observed layout inputs are
FB=0x1800 MiB, VGA register0x1, and MMU lock registers0x00100000 / 0x016ffff0. The MMU lock's exclusive upper bound is0x170000000, below the framebuffer top, so the existing layout code calculates:The FRTS address matches the 6GB mobile report in #53.
4. Read the current boot's SS0 instead of using a historical constant
This board produced both
0x02436005and0x02434005on separate pre-boot runs, withSS1=0x4. An initial board-specific precheck compared SS0 against the first captured value and returnedEFI_NOT_READYon a later boot.The working implementation reads and records SS0 after the current boot passes the identity, GFW, PLM, WPR, memory and layout checks. The subsequent pre-transaction check compares against that current-boot value. It then applies
SS0=0x88888888while preserving the current SS1 value,0x4.5. Hand Windows the completed transaction in the same boot
The AMD GOP remains the display owner. The application preloads the existing Windows Boot Manager from the internal EFI System Partition, then starts it after selector readback, one FLR, DMA release, restoration of PCI access state, and protocol/log closure.
Successful execution log excerpts
Benchmark core
@rhkmh417-beep commented on GitHub (Oct 27, 2026):
Hi @colstone,
Thank you for sharing your successful RTX 3060 Laptop GPU unlock on Windows!
I’m investigating a similar laptop configuration:
Would you be willing to share the source code or patch for your custom UEFI implementation based on craftingmod/rtx30-unlock?
I’m particularly interested in the 6GB VRAM handling, FWSEC validation, PCI restoration, FLR handling, and any read-only preflight checks.
I’d like to review the implementation and its safety before attempting anything on my laptop.
Thank you very much!
@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.@Feizhai-ball commented on GitHub (Oct 28, 2026):
Card: 发行者 3060m 12GB (memory-modified, GA106M)
PCI ID: 10de:2520
PCI Address: 0000:03:00.0
OS: Ubuntu 24.04.4 LTS
Kernel: 6.8.0-147-generic
NVIDIA Driver: 580.142(https://github.com/arutar/FrankenDriver)
PyTorch: 2.12.1+cu130
gpu-unlock: 1.0.0, locally modified to add PCI ID 0x2520 to the supported IDs, then rebuilt and installed via DKMS
Unlock Target: 0000:03:00.0
Test: PyTorch CUDA GEMM, 8192 × 8192
Warm-up: 20 seconds
Measurement: 5 samples × 20 matmuls per sample; median latency
FP16/BF16 reduced-precision reduction: disabled
TF32: enabled for the TF32 test
Precision | Unlock Enabled | Unlock Disabled | Performance Gain
FP16 | 43.35 TFLOPS | 28.14 TFLOPS | +54.1%
BF16 | 45.07 TFLOPS | 28.40 TFLOPS | +58.7%
TF32 | 23.21 TFLOPS | 14.02 TFLOPS | +65.5%
FP32 (Control) | 9.14 TFLOPS | 9.11 TFLOPS | +0.3%
Kernel Log: gpu_unlock: unlocked
Reported Power Limit: 80 W
Secure Boot: Disabled