Skip to content

fix(stl-game-config): pick the gaming GPU by Vulkan device type - #226

Merged
st0nefish-ci[bot] merged 1 commit into
masterfrom
fix/stl-gpu-vulkan-device-type
Oct 10, 2026
Merged

st0nefish-ci[bot] merged 1 commit into
masterfrom
fix/stl-gpu-vulkan-device-type

Conversation

@St0nefish

Copy link
Copy Markdown
Owner

Summary

Follow-up to #225. detect_gpu_vendor treated an AMD GPU with under 2 GiB of
VRAM as an iGPU — an arbitrary cutoff. Vulkan already classifies every device
as discrete or integrated, so use that directly.

  • Parse vulkaninfo --summary per device (10s timeout so a hung ICD can't block
    the report); pick the first DISCRETE_GPU, else the first INTEGRATED_GPU.
    Software renderers (llvmpipe, CPU type) are ignored. Replaces the old
    free-text grep NVIDIA/AMD/Intel fallback.
  • Without Vulkan: vendor-only sysfs ranking (NVIDIA > AMD > Intel) — sysfs has
    no discrete/integrated flag — then nvidia-smi -L, then unknown.
  • Review fix: loop variable t declared local.
  • stl-game-config 1.2.2 → 1.2.3 (Claude + Copilot manifests)

Known limit: without vulkaninfo, an AMD iGPU + Intel Arc dGPU reports amd.
With two discrete GPUs, the first Vulkan enumerates wins.

Test plan

  • tests/stl-game-config/test-system-info.sh — vulkaninfo mock builds fixture
    device lists; 18 cases (7 HDR, 11 GPU: iGPU-listed-first per vendor pair,
    llvmpipe ignored, Vulkan beats sysfs, sysfs/nvidia-smi fallbacks), all passing
  • bash .github/scripts/validate-all.sh — all checks pass
  • Live run (AMD iGPU + RTX 5090): gpu_vendor: nvidia via the Vulkan path

🤖 Generated with Claude Code

Replace the amdgpu VRAM < 2 GiB iGPU heuristic with Vulkan's own
discrete/integrated classification: prefer the first discrete GPU, then the
first integrated one, ignoring software renderers.

- Parse vulkaninfo --summary per device (10s timeout) instead of grepping
  free text for vendor names
- Without Vulkan, fall back to a vendor-only sysfs ranking (NVIDIA > AMD >
  Intel), then nvidia-smi -L
- Tests: vulkaninfo mock with fixture device lists (18 cases)
- Bump stl-game-config to 1.2.3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@st0nefish-ci
st0nefish-ci Bot enabled auto-merge October 10, 2026 14:32
@st0nefish-ci
st0nefish-ci Bot merged commit b902a00 into master Oct 10, 2026
8 checks passed
@st0nefish-ci
st0nefish-ci Bot deleted the fix/stl-gpu-vulkan-device-type branch October 10, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant