mirror of
https://github.com/Zagitta/gpu-unlock.git
synced 2026-12-03 19:44:49 +07:00
[PR #6] [MERGED] Claim cards on older kernels and behind BME-setting firmware #122
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Zagitta/gpu-unlock#122
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?
📋 Pull Request Information
Original PR: https://github.com/Zagitta/gpu-unlock/pull/6
Author: @foureight84
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @Zagitta
Base:
main← Head:fix-pre-driver-claim📝 Commits (1)
d04f5a0Claim cards on older kernels and behind BME-setting firmware📊 Changes
4 files changed (+37 additions, -11 deletions)
View changed files
📝
README.md(+5 -3)📝
kernel/gpu_unlock/unlock_610.c(+16 -3)📝
tests/test_unlock_adapter.c(+15 -5)📝
tests/unlock_shim/compat.h(+1 -0)📄 Description
Fixes #3. Fixes #5.
Two checks in
unlock_transaction_claim()refused every card on a Supermicro X11SPi-TF running Ubuntu 24.04 (6.8.0-31-generic):current_stateisPCI_UNKNOWN(5) on older kernels (#3: also seen on 6.14). No driver has enabled the card yet, so the kernel hasn't recorded a power state. NowPCI_UNKNOWNis accepted only whenpm_capis present, so the existing PMCSR read still confirms the card is in D0. Without a PM capability, the claim still refuses (-EOPNOTSUPP).0x0147before Linux starts, even with the slot's OPROM and the BIOS's "Bus Master Enable" option both disabled. The claim now clears BME, reads it back, and saves the cleared value asoriginal_cmd. A card whose BME won't clear is still refused with-EBUSY, and the WPR2 check still refuses a card a driver has initialised.The README sentence about skipping bus-mastering cards is updated to match.
Tests
Four new full-transaction scenarios in
test_unlock_adapter.c, withPCI_UNKNOWNadded to the shim:power-unknown: PCI_UNKNOWN with a PM capability → unlockspower-unknown-no-pm: PCI_UNKNOWN without one →-EOPNOTSUPP, nothing allocatedfirmware-bme: command0x6at claim → BME cleared, unlocksfirmware-bme-stuck: BME won't clear →-EBUSY, nothing allocated, card left as foundpython3 -m unittest discover -s testspasses 5/5 with the installed 610.43.03 firmware, including the full mocked transaction. The module builds against 6.8.0-31-generic.Hardware
4x RTX 3090 (10de:2204) behind a PLX switch, VBIOS 94.02.59.00.94 x3 and 94.02.59.00.DD x1, NVIDIA open 610.57.04, cold boot with
gpu_unlock.targets=all. All four loggpu_unlock: unlockedwith SS00x88888888after the FLR. BF16 per SM clock went from ~0.043 to ~0.082 TFLOPS/MHz. The before/after table is in #5.The hardware run used an earlier version of change 1 that didn't have the
pm_capcondition, and change 2 without the0xffffreadback check. On these cards (pm_cap=0x60, real readback) the code paths are the same.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.