Repository navigation
Description
On AnyKyty 7de61e3451, ASTRO BOT (PPSA21564) hangs the GPU on a Radeon 780M with RADV a few seconds after the pirate island level (-lvl big_hand_pirate_island) starts, in every run so far (4 of 4). The kernel logs a gfx ring timeout for the title's kytyGpuRecord thread, the ring reset fails and amdgpu resets the GPU; the title then stops on vkQueueSubmit failed: ErrorDeviceLost. Opening a new issue as asked at the end of #98, which had the same kernel lines on an RX 9070 XT.
Setup
- Ubuntu 26.04.1, kernel 7.0.0-38-generic, linux-firmware 20260319, Ryzen 9 PRO 8945HS with Radeon 780M (RADV PHOENIX), Mesa 26.0.8.
AnyKyty7de61e3451, Release,-DANYPS5_GPU_BACKEND=kyty, GCC for AnyPS5 and Clang 21 for Kyty. One local change, to the relinker only:validateRelroCoveragedrops an uncoveredPT_GNU_RELROheader instead of stopping, because this dump's eboot otherwise fails to relink (PT_GNU_RELRO is not covered by PT_LOAD pages; fix(relinker): preserve Linux guest RELRO boykopovar/AnyPS5#20573 reports the same check).- Kyty's defaults (no
KYTY_*set), native ray tracing on. Headless:kwin_wayland --virtual --xwayland,SDL_VIDEODRIVER=x11,SDL_AUDIODRIVER=dummy, game data on a read-only sshfs mount, warm Kyty shader store.
Kernel log (run of 18:30):
amdgpu 0000:c5:00.0: ring gfx_0.0.0 timeout, signaled seq=51305404, emitted seq=51305405
amdgpu 0000:c5:00.0: Process app.elf pid 2320115 thread kytyGpuRecord pid 2320208
amdgpu 0000:c5:00.0: Starting gfx_0.0.0 ring reset
amdgpu 0000:c5:00.0: MES failed to respond to msg=RESET
amdgpu 0000:c5:00.0: failed to reset legacy queue
amdgpu 0000:c5:00.0: reset via MES failed and try pipe reset -110
amdgpu 0000:c5:00.0: Ring gfx_0.0.0 reset failed
amdgpu 0000:c5:00.0: GPU reset begin!. Source: 1
The title then logs radv/amdgpu: The CS has been cancelled because the context is lost. This context is innocent. and vkQueueSubmit failed: ErrorDeviceLost, tick=52547 (commandScheduler.cpp:652).
What RADV_DEBUG=hang shows
- Two runs, two different graphics pipelines bound at the hang: RADV pipeline hash
8b35173ee2053ef8(a mesh shader plus a pixel shader with 17 textures and four loops), then68e48ac71eb024e. So it is not one shader that always hangs. - Neither pipeline uses ray queries.
- The dumps and the SPIR-V are game shaders, so I'm not attaching them; I can answer questions about them or run with other settings.
Other runs
KYTY_NATIVE_RT=0: no hang, but the level doesn't get past loading: black picture, ~23 draws per frame, the GPU 4 % busy and two game threads at 100 %.- The same commit on an RTX 3080 Ti (NVIDIA 615.71.09, Linux) runs this level at ~18 fps without a hang.
- The same level on this 780M with AnyPS5's own driver (
mainof 2026-11-18) ran without a hang.
Happy to run a build or settings you'd like checked on this GPU.
AI-assisted.
Activity
mrfelek commentedon Nov 23, 2026
Narrowed down: the hang needs a cold cache and comes from the graphics pipeline library path. Same machine and commit as above, pirate island, one run per row unless noted. "Both caches cold" means
rt-K/_PipelineCachemoved aside andMESA_SHADER_CACHE_DISABLE=true.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, then plusKYTY_VULKAN_VALIDATION=1KYTY_PIPELINE_LIBRARIES=0KYTY_ASYNC_PIPELINES=0PipelineLibraries::Eligiblereturns false for a meshstages[0])KYTY_TABLE_DESCRIPTOR_WRITES=0,KYTY_DRAW_TEMPLATES=0KYTY_TABLE_XPR=0,KYTY_PIPELINE_LIBRARIES=0,KYTY_ASYNC_PIPELINES=0,KYTY_DRAW_BUFFERS=0,KYTY_TESSELLATION=0So it shows only while pipelines are first linked from libraries during play, and goes away with
KYTY_PIPELINE_LIBRARIES=0. It is not limited to mesh pipelines, which fits the twoRADV_DEBUG=hangdumps above binding two different pipelines. Without the libraries the level runs at ~6 fps on this GPU, with the picture right apart from some blocky patches on the water and sand.The two validation runs logged no
VUID-line, but their frame rate before the hang was the same as without validation, so I'm not sure the layer was active; I can rerun it withVK_LOADER_DEBUG=layerif a clean validation pass on this path would help.KYTY_PIPELINE_LIBRARIES=0works as a workaround here. I didn't find the cause in the library code: whether it is how the four parts are split or RADV's fast link on Mesa 26.0.8 is beyond what I could tell from the dumps.AI-assisted.
mrfelek commentedon Nov 23, 2026
Found the cause and a fix for the hang. The branch is
mrfelek/AnyPS5:fix/kyty-radv-no-pipeline-libraries, one commit onAnyKyty7de61e3451. A PR to this repository can't be opened from our fork, so it's linked here instead.Cause
Some graphics pipelines that AnyKyty fast-links from
VK_EXT_graphics_pipeline_libraryparts hang RADV. The gfx ring times out without a VM fault. Our setup is a Radeon 780M on Mesa 26.0.8.AnyKyty only fast-links while its pipeline cache is cold, which is why the hang needs both caches cold.
Same box, pirate island, both caches cold:
VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXTKYTY_PIPELINE_LIBRARIES=0It is not one bad pipeline. A local filter that fast-links only part of the pipelines still hung with each half, a quarter and an eighth. A 1/32 subset with a single pipeline pair hung, and a 1/16 subset without that pair did not. These did not change it (each tried in full cold runs):
0b46084c9ffor a similar RADV hang.VK_FORMAT_UNDEFINEDcolor slots whole.RADV_DEBUG=shaders,epilogson the isolated pipeline shows valid code in both forms. The fast-linked pixel shader jumps to an epilog that exports the same compacted targets as the optimized link. That points at the state RADV programs for fast-linked pipelines rather than at the shaders. I couldn't go further without a umr wave dump.Plain AnyPS5 builds its pipelines from libraries the same way and runs this title on the same box without hanging. KytyPS5 has no pipeline-library path at all.
Fix
On RADV, AnyKyty no longer enables pipeline libraries, so it builds whole pipelines as with
KYTY_PIPELINE_LIBRARIES=0. Other drivers are unchanged. The two settings docs rows say so.Optimized links would also avoid the hang, but they cost about 75 ms each on the draw thread and gave more stalls than whole pipelines:
KYTY_PIPELINE_LIBRARIES=0Tested on Linux, Radeon 780M, Mesa 26.0.8, with the box's RELRO relinker workaround. The branch also builds on Linux with an RTX 3080 Ti. It wasn't run there; NVIDIA takes the unchanged path.
relativespace2K commentedon Nov 24, 2026
Carried @mrfelek's tested fix here as a PR since it could not be opened from their fork: RADV now builds graphics pipelines whole, as with KYTY_PIPELINE_LIBRARIES=0. The commit keeps the original author and the measurements from the report above. PR: #292