Repository navigation
fix(stl-game-config): pick the gaming GPU by Vulkan device type - #226
Merged
Merged
Conversation
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>
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.
Summary
Follow-up to #225.
detect_gpu_vendortreated an AMD GPU with under 2 GiB ofVRAM as an iGPU — an arbitrary cutoff. Vulkan already classifies every device
as discrete or integrated, so use that directly.
vulkaninfo --summaryper device (10s timeout so a hung ICD can't blockthe report); pick the first
DISCRETE_GPU, else the firstINTEGRATED_GPU.Software renderers (llvmpipe,
CPUtype) are ignored. Replaces the oldfree-text
grep NVIDIA/AMD/Intelfallback.no discrete/integrated flag — then
nvidia-smi -L, thenunknown.tdeclaredlocal.Known limit: without
vulkaninfo, an AMD iGPU + Intel Arc dGPU reportsamd.With two discrete GPUs, the first Vulkan enumerates wins.
Test plan
tests/stl-game-config/test-system-info.sh—vulkaninfomock builds fixturedevice 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 passgpu_vendor: nvidiavia the Vulkan path🤖 Generated with Claude Code