Skip to content

fix(stl-game-config): detect primary-display HDR and the gaming GPU correctly - #225

Merged
st0nefish-ci[bot] merged 1 commit into
masterfrom
worktree-bug-kde-hdr-detection-false-negative
Oct 10, 2026
Merged

st0nefish-ci[bot] merged 1 commit into
masterfrom
worktree-bug-kde-hdr-detection-false-negative

Conversation

@St0nefish

Copy link
Copy Markdown
Owner

Summary

Fixes two detection bugs in stl-game-config's system-info.sh.

HDR (#182). check_kde_hdr_enabled always returned false: kscreen-doctor -o
colorizes through a pipe, so HDR: enabled never matched literally, and
head -1 read whichever output was listed first rather than the primary. It now
parses kscreen-doctor -j with jq and reports hdr of the enabled output with
priority == 1.

GPU vendor. detect_gpu_vendor's sysfs checks never matched (ls of the
vendor file instead of cat) and only looked at card0, which is often the
CPU's iGPU (e.g. Ryzen iGPU as card0, RTX 5090 as card1). It now ranks every
/sys/class/drm/cardN: NVIDIA > discrete AMD > Intel > AMD iGPU (amdgpu with
VRAM < 2 GiB), falling back to nvidia-smi -L (proprietary driver without
nvidia-drm) and then vulkaninfo.

Review fixes: the Vulkan fallback grep is now -q (matched lines leaked into
the JSON output), and the nvidia-smi fallback was restored after review.

Note: the format-on-save hook reindented system-info.sh from 4 to 2 spaces —
review it with whitespace hidden (git diff -w).

  • stl-game-config 1.2.1 → 1.2.2 (Claude + Copilot manifests)

Test plan

  • New tests/stl-game-config/test-system-info.sh — 14 cases (7 HDR fixtures via
    a mocked kscreen-doctor -j, 7 GPU fixtures via STL_DRM_ROOT), all passing
  • bash .github/scripts/validate-all.sh — all checks pass
  • Live run on KDE Wayland, AMD iGPU + RTX 5090, HDR on primary:
    {"gpu_vendor":"nvidia","compositor":"kde","kde_hdr_enabled":true}

Fixes #182

🤖 Generated with Claude Code

…orrectly

check_kde_hdr_enabled always returned false (ANSI codes in kscreen-doctor -o
defeated the grep, and head -1 read an arbitrary output). detect_gpu_vendor's
sysfs checks never matched (ls instead of cat) and only looked at card0, which
is often the CPU's iGPU.

- Parse kscreen-doctor -j with jq; report hdr of the enabled priority-1 output
- Rank every /sys/class/drm card: NVIDIA > discrete AMD > Intel > AMD iGPU
  (amdgpu VRAM < 2 GiB = iGPU); nvidia-smi -L and vulkaninfo fallbacks
- Vulkan fallback grep is now -q so matched lines no longer leak into the JSON
- Add tests/stl-game-config/test-system-info.sh (14 cases)
- Bump stl-game-config to 1.2.2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@st0nefish-ci
st0nefish-ci Bot enabled auto-merge October 10, 2026 13:59
@st0nefish-ci
st0nefish-ci Bot merged commit 70c1baa into master Oct 10, 2026
8 checks passed
@st0nefish-ci
st0nefish-ci Bot deleted the worktree-bug-kde-hdr-detection-false-negative branch October 10, 2026 14:03
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.

stl-game-config: check_kde_hdr_enabled always returns false (ANSI codes + wrong output picked)

1 participant