Repository navigation
fix(amd): name consumer Radeons instead of showing their PCI device ID - #2
Merged
an80sPWNstar merged 1 commit intoAug 12, 2026
Merged
Conversation
The sysfs collector reports an RX 9070 XT as "AMD GPU 7550". product_name is an Instinct/Pro sysfs field. Consumer Radeons do not populate it -- the file is absent, not empty -- so parseSysfs never sets a name and the uevent fallback prints the second half of PCI_ID=1002:7550. Every consumer AMD card is affected; the better the telemetry looks, the odder the label reads. A lookup table cannot fix this. 1002:7550 is shared by the RX 9070, 9070 XT and 9070 GRE, which is why pci.ids lists all three on one line. rocm-smi is the only thing on the box that resolves the actual board, via Card Series. parseRocmSmi already reads Card Series -- it just discarded PCI Bus. It now keeps it as pciBus, and amd-names.js joins rocm-smi's cards to the sysfs cards ON THAT BUS. The bus join is the load-bearing part. rocm-smi enumerates from card0 while DRM numbering is sparse: on the box this was found on, the only GPU is /sys/class/drm/card1 and rocm-smi calls it card0. Joining on the cardN key or on array position would put the wrong name on the wrong card -- precisely the sparse-numbering case amd-sysfs.js already carries a comment about. The two-card fixture in the test pins that down: it reverses rocm-smi order against DRM order and fails if either name lands on the wrong card. Cost is one extra rocm-smi call per host, cached forever after (names are static), with a narrower flag set than ROCM_CMD so it stays clear of the --showallinfo abort path. enrich() skips the call entirely when every card already has a real name, so Instinct/Pro hosts never pay it. Failure is always silent: rocm-smi missing, or present and aborting -- which this repo has already met on real hardware -- resolves to an empty map and the ID-based name stands. A naming fix must not be able to take a host offline. Verified on the card in question: "AMD GPU 7550" -> "AMD Radeon RX 9070 XT", telemetry unchanged. K=1 on real hardware -- one AMD GPU, so the multi-card join is covered by the synthesized fixture only. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
an80sPWNstar
pushed a commit
that referenced
this pull request
Aug 10, 2026
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017dX6iMejh5R28hLDjRNcKf
Owner
|
Merged, and shipped as v0.3.14 with a full set of installers — thanks for the fix and for the write-up, the bus-join reasoning and the K=1 caveat made this an easy review. The only thing added on top was pinning ROCM_NAME_CMD off the OD-clock crash path in real-hardware.test.js, same guard the main query carries. On the pci.ids fallback: agreed it's better left out for now; if a no-ROCm gaming-rig report ever comes in, that's the moment to revisit it. |
an80sPWNstar
pushed a commit
that referenced
this pull request
Aug 12, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vqfu9c17yP3Ls421mRC77b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branched off
main, so it's independent of #1 — no file overlap, either can merge first.The bug
The sysfs collector reports an RX 9070 XT as "AMD GPU 7550".
/sys/class/drm/cardN/device/product_nameis an Instinct/Pro field. Consumer Radeons don't populate it — the file is absent, not empty — soparseSysfsnever sets a name and the uevent fallback prints the second half ofPCI_ID=1002:7550. This hits every consumer AMD card. All the telemetry around it is correct, which makes the label look odder than it is.Why a lookup table can't fix it
1002:7550is shared by the RX 9070, the 9070 XT and the 9070 GRE — that's whypci.idslists all three on one line:No device-ID table can tell you which board you have, however current it is.
rocm-smiis the only thing on the machine that knows:The fix
parseRocmSmialready readCard Series— it just threw awayPCI Bus. It now keeps it aspciBus, andamd-names.jsjoins rocm-smi's cards to the sysfs cards on that bus.The bus join is the load-bearing part. rocm-smi enumerates from
card0; DRM numbering is sparse. On the box this was found on, the only GPU is/sys/class/drm/card1and rocm-smi calls itcard0. Joining on thecardNkey or on array position would put the wrong name on the wrong card — exactly the sparse-numbering caseamd-sysfs.jsalready carries a comment about ("a real capture had a lone GPU at card1").The two-card fixture in the test pins this down: it reverses rocm-smi order against DRM order and fails if either name lands on the wrong card.
Cost and failure behaviour
ROCM_CMD(--showproductname --showbusonly) so it stays well clear of the--showallinfoabort path you documented.enrich()skips the call entirely when every card already has a real name, so Instinct/Pro hosts never pay for it.Verification
On the card in question:
AMD GPU 7550→AMD Radeon RX 9070 XT, telemetry byte-for-byte unchanged around it.10/10 test files passed, 15 new assertions.K=1 on real hardware — I have one AMD GPU, so the multi-card bus join is covered by the synthesized fixture only, not by a real two-card box. Worth saying plainly since that's the part most likely to matter to someone else.
Deliberately not included
A
pci.idsfallback for hosts that haveamdgpubut no ROCm installed — probably the common case for gaming rigs. It would turn "AMD GPU 7550" into "Radeon RX 9070/9070 XT/9070 GRE", which is better but still can't name the board, and it needs a 1.5 MB file parse with distro-dependent paths that don't exist on your primary Windows target. Happy to add it as a follow-up if you want the breadth; I left it out to keep this reviewable.