GPU hang on Steam Deck running CachyOS (RADV): gfx ring timeout, ring reset fails, MODE2 reset — v2.0.1 / v2.0.3 / v2.0.4 #817
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot#817
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First off, thank you for this project — it's been getting smoother and going further with every version today. Filing this in case the data helps; happy to test builds or pull more logs.
Environment
AMD Custom GPU 0932 (RADV VANGOGH), Vulkan 1.4, driver 0x6802006[0400486024DEC000]v131072, built locally with the Linux AppImage builderHOS_HANDHELD=1(swapchain 1280x720)What happens
Mid-gameplay the picture freezes and the GPU hangs hard: gfx ring timeout, the ring reset fails, and the driver falls back to a full MODE2 reset. The game process dies in the reset. Each version runs smoother and gets further before it happens:
LSFG/frame generation was ruled out: the hang happens with it fully out of the launch path.
v2.0.4 run, with RX_VK_CHECKPOINTS=1
Checkpoints were armed at startup:
Last engine output before the freeze (14:21:00–14:21:09, crash at 14:21:16) — repeated warnings, then a burst of new pipelines:
After that the log goes silent — no "device lost" line and no fault-info readout was printed before the process died in the reset, so I don't have a checkpoint/marker name for the hanging draw. If that readout lands somewhere else, tell me where and I'll fetch it.
Kernel side (amdgpu, 2026-11-08 14:21:16 PT):
…followed at 14:21:19 by
ring comp_1.3.0 timeout(that ring reset succeeded). The kernel did create a devcoredump both times, but it expired before I could copy it — same story on the v2.0.3 crash.v2.0.3's kernel signature was the same family: gfx_0.0.0 timeout → ring reset failed → MODE2 reset, then a comp ring timeout. I have full kernel excerpts and the Steam console log window for both crashes if you want them.
Repro detail from the player: the crash hits at a specific story beat — right after the intro, when Link first reaches the Great Deku Tree and it starts speaking (the opening dialogue in Kokiri Forest). The ~10 minutes before that is the intro and first-boot preparation. After the freeze the game completely exits (process gone, not left frozen on screen). This also looks like the same spot that stopped v2.0.1 early.
Confirming the same mid-gameplay GPU hang on SteamOS (not CachyOS), and adding a data point for v2.0.5, which you had not tested when you filed this.
Setup
6.18.50-valve2-1-neptune-618-gc7289a96b14d26.2.0-devel (git-035ae2f854),vulkan-radeon 26.2.0_devel.222131ultrawide(source50b3813b) and v2.0.5 (c5895377)Same kernel signature, three times in one session
Always
signaled seq=N, emitted seq=N+1— the GPU is exactly one submission behind, and a single command buffer never completes. Always on thePresentation Ththread. The screen shows a rainbow/garbage frame immediately before the reset. Visually it correlates with fast motion — new shaders being hit in quick succession.Where the time goes before a hang (may be relevant)
During a new scene the GPU sits at 0% busy while the process uses ~210% CPU, so the stutter is CPU-side pipeline compilation in the driver, not GPU rendering. Not swap either:
/proc/pressure/memoryreadavg60 ≈ 0.18, and zram was barely touched. So the hang is not obviously a memory-pressure event.Things that did not help (on the
ultrawidebuild)5facf993, which includes the "under 6 GB VRAM → BC3" change (confirmed the.sohash differs): still hangs. VRAM pressure at 3 GiB is therefore probably not the trigger.RX_VK_PRECOMPILE=1: preparation completes fine, hang still occurs.v2.0.5 on this device does not reach gameplay at all — it segfaults in
libvulkan_radeon.soright after shader preparation. That is a separate report (see the RDNA2 SIGSEGV issue), not the hang described here.Given the one-submission-deep stall, a checkpoint/marker name for the hanging draw would be the most useful next artefact — you noted the readout did not print before the process died in the reset. If I can get one out of a run on this device I will add it here.
Same hang on a Steam Deck OLED (VanGogh, SteamOS), and this one comes with the marker data from
RX_VK_CHECKPOINTS=1.15ec28d+ a 10-line local eviction patch (millisecond age instead of presents),RX_VK_PRECOMPILE=0(the prepare is 166 s here and sometimes faults in the driver), 50 % resolution, 4x frame generationNo OOM: VRAM was 3116 of 5867 MB, textures 2340 MB, GPU 52 ms a frame.
RX_VK_KEEP_FINALIZED_MB/ the occlusion value make no difference to it.The older base (
4d7d2f1+ the PR #448 udmabuf branch + the retired-import giveback) does not hang on this machine in the same place — it runs the forest for minutes (slow, ~10 fps, and with the old flicker). So whatever the newer code does differently, this Deck's RADV does not survive it.If the mesh path is the common thread:
RX_VK_NO_MESH=1avoided the startup fault in15ec28d, but I have not yet run the forest long enough with mesh draws skipped to say whether it avoids this hang too. I can do that, or test PR #792'sRX_VK_FORCE_MESH_FALLBACK=1here — that one boots without the startup fault but needs a 5.9 GB program cache, which is its own problem on a 14 GB machine.This answers the two open questions above, which hanging draw it is and whether leaving mesh draws out avoids it, with a workaround that makes the game stable on the Deck.
Same hang here on a Steam Deck OLED, SteamOS 3.9.5 (RADV VANGOGH, Mesa 26.2-devel), v2.0.4 built with the AppImage toolchain. I traced it to one task shader, and skipping the draws that use it makes the game stable on the Deck.
Repro: loading a save inside the Great Deku Tree hangs the GPU within ~30 s:
ring gfx_0.0.0 timeout, ring reset failed, MODE2 reset. Not memory: 6 GB free at the hang.Getting the marker readout: the process is SIGKILLed in the reset before
device lostcan read the buffer markers. I added a watchdog thread that readsmarker_wordswhile the GPU is still stuck: when no marker has finished for 3 s while later ones were set, and again at 6 and 9 s, before the 10 s ring timeout. Patch below.What it shows (headless runs, same save, scripted input):
6f9142def3b6a978(code1:9bcda2a743ed9704 6:2c56dc1006942f74 7:4797e4cd2b870a69), resetRX_VK_SKIP_PROG=…,6f9142def3b6a978636eed4d5000d1c0, reset155b02322a3ee490, then it finishedRX_VK_MESH_OPT=138cdd9d8563b16eb, same pointRX_VK_NO_MESH=1RX_VK_SKIP_CODE=2c56dc1006942f74(below)Every stuck program is a task + mesh program sharing one task shader, NVN code
2c56dc1006942f74; about 30 programs in the Deku Tree and Kokiri Forest use it. Their mesh shaders have no loops. The task shader has two nested loops over a 2D grid, with boundsSMin(SMax(0, F2I(...)), cbuf3[3088] - 1): a culling pass over each object's screen footprint. On RDNA 2 some of these draws run for seconds (one took 9 s and then finished), and the kernel resets the GPU when one passes 10 s. With the optimizer on (RX_VK_MESH_OPT=1) it still stalls.Workaround: a new
RX_VK_SKIP_CODE=<stage code key prefix,...>switch leaves out the draws of every program that has a stage of that code, decided once per program. WithRX_VK_SKIP_CODE=2c56dc1006942f74:Deck settings that worked best for me, for other Deck players (
hookshot_env.txt):preset_caps_memory()only applies them on cards of 4.75 GB or less. Hence the explicit caps: GTT 5.6 vs 6.4 GB after 5 min, about half the swap.Also: PR #792 with
RX_VK_FORCE_MESH_FALLBACK=1crashes insidelibvulkan_radeon.so(null read) fromfallback_recordat the first mesh draw on this GPU.Patch: marker watchdog +
RX_VK_SKIP_CODE(gpu/vk/vk_draw.cpponly; applies to v2.0.4 and to current maind3659c5)This is a workaround, not a fix: what makes that task shader run for seconds on RDNA 2 is still open. I have the IR dumps of the three programs and the logs if they help.
Confirming hardicd's workaround on a second Deck (Steam Deck OLED, RADV VANGOGH, SteamOS).
Build: upstream
15ec28d+ a 10-line millisecond-eviction patch,RX_VK_PRECOMPILE=0, plus theirRX_VK_SKIP_CODE=2c56dc1006942f74patch,HOS_HANDHELD=1,RX_VK_LOW_SPEC=1,RX_VK_MESH_OPT=1, VRAM 1200 / TEX 128 / 1024.device lostwithin seconds, sometimes in the starting room (frame 902,RUNNING aftermarker on a draw), sometimes in Kokiri Forest — same hard recovery as reported above;RX_VK_SKIP_CODE: 2952 draws in Kokiri Forest, 16.9–17.6 fps, GPU 47.9 ms, no device lost over a 5-minute run, and no stall reported by their watchdog.The only remaining visual issue on this build is the icon/object flashing in #798, which is separate. Thanks for the trace and the switch — it turned an unusable build into a playable one here.
Tracked in #1000, follow there. That issue collects every report of Linux / Steam Deck GPU hangs, crashes, low fps and build failures, and this one is linked from it with its GPU, version and log details. If it still happens on v2.0.6 (https://github.com/NotRexed/Hookshot/releases/tag/v2.0.6; Update next to Play in the launcher), please add a comment there with your
hookshot_log.txt.