<< All versions

Skill v1.0.0

currentLLM-judged scan90/100
codebam/hermes-skills/amdgpu-hang-capture
──Details
PublishedOctober 24, 2026 at 08:39 AM
Content Hashsha256:85ad470d4eb21b04...
Git SHA7ee252ca1d0c
──Files
Files (1 file, 4.3 KB)
SKILL.md4.3 KBactive
SKILL.md · 88 lines · 4.3 KB

name: amdgpu-hang-capture description: Use when capturing an AMDGPU GPU hang (ring timeout). version: 1.0.0 author: Hermes Agent license: MIT metadata: hermes: tags: [gpu, amdgpu, debugging, vulkan, linux, gaming] related_skills: []


AMDGPU GPU-hang capture & triage (Linux)

A deterministic game hang is reclaimable evidence, not a reason to version-roulette. Capture first; change one variable at a time afterwards.

When to Use

  • A game/app hangs the GPU (ring gfx_0.0.0 timeout or any ring) in journalctl.
  • You have an amdgpu devcoredump or a RADV hang-dump directory to analyze.
  • A GPU reset / context loss killed the app and you need evidence for a report.

0. Rule out GPU overclock / tuning first

  • Random ring timeouts across MULTIPLE games/clients on one box (esp. spanning both

vkd3d and native Vulkan titles) is the classic signature of a marginal overclock or undervolt. Check pp_od_clk_voltage, power_dpm_force_performance_level, power1_cap vs power1_cap_default, and any OC service/daemon writing sysfs at boot. Reset to stock and re-test before chasing driver bugs.

1. Kernel side (act immediately - the devcoredump expires fast)

  • journalctl -k -b --no-pager | grep -E "ring .* timeout|amdgpu" - note the

signaled seq / emitted seq pair and the blamed Process ... thread ... (often vkd3d_queue = the game's D3D12 queue thread).

  • On ring timeout the kernel creates a devcoredump under

/sys/class/devcoredump/devcdN/ - root-only, auto-deleted after ~5 min. Save it as root. NixOS has no sudo: use run0 (run0 bash -c 'cat /sys/class/devcoredump/devcdN/data > out.bin') or pre-arm a watcher over the class dir and grab with run0 when it appears.

  • The dump is plain text (amdgpu_dev_coredump format), sections in order:

header (kernel/time/pasid/vmid/process) -> SOC / memory / GDS info -> HW IP versions -> discovery -> firmware -> Ring timed out details -> fault block -> IP Dump (register tables) -> Ring buffer information + full Ring contents (byte offset / value) -> VRAM lost check -> IB #N <address> <n> dw + n hex lines per IB (the hung command buffers).

  • Pitfall: [gfxhub] Page fault observed is printed unconditionally by

the formatter; only treat it as a fault when address/status are nonzero.

  • Extract IBs: after each IB #N header take the next N 0x........ lines

into a file -> feed any PM4 decoder. umr --dump-ib-file works only if the build's database has the asic ($out/share/umr/...); nixpkgs umr can be too old for new GPUs (e.g. navi31.asic missing) - then rely on RADV's own decode in trace.log.

2. Mesa / RADV side

  • Launch options (recipe from mesa issue #16268):

RADV_DEBUG=hang,syncshaders,extra_md VKD3D_CONFIG=breadcrumbs,single_queue plus PROTON_LOG=1 PROTON_LOG_DIR=<dir> for the Proton log.

  • On hang RADV writes ~/radv_dumps_<pid>_<date>/: trace.log (decoded

submission + trace markers), registers.log, pipeline.log (active pipeline + shader dumps/stats), .spv shaders, bo_history.log, addr_binding_report.log, gpu_info.log.

  • In trace.log: search for last trace point that was reached and

NOT reached - the gap between the last reached marker and the first unreached marker isolates the hung command segment (decode labels show the Vulkan API command sequence, e.g. CmdBeginRendering -> DRAW_INDEX_2).

  • pipeline.log shaders -> spirv-dis <hash>.spv; note stage features

(image atomics, discard, bindless) for hypotheses.

  • registers.log: GRBM_STATUS busy bits, CP_CPF_STALLED_STAT1

(RING_FETCHING_DATA = stalled fetch), CP_IB1_BASE (must match the devcd's IB #1), CP_IB1_BUFSZ = dwords left in the running IB (cross-checks how far the trace markers got).

3. Post-hang hygiene

  • Wine can enter a fault-spam loop after the hang and grow PROTON_LOG by

~25 MB/s (GBs). Kill the spamming wine process; keep head/tail samples.

  • Keep the raw devcoredump even though it is text; kernel devs read it.

4. Known mitigation knobs (RDNA3/gfx11 hang family, observed 2026-10)

  • RADV_DEBUG=nohiz eliminated an identical vkd3d_queue gfx_0.0.0 timeout

on an RX 7900 XTX (mesa #16356) - first thing to try.

  • RADV_DEBUG=nodcc is the other classic knob (DCC-related stalls).
  • Trackers to search first: vkd3d-proton #3073, mesa #16356 / #16503.
All versions