Lies of P (PPSA10261) on Windows: freezes on the in-game loading screen (no exception; render thread polling) #5983

Closed
opened 2026-10-14 18:21:30 +00:00 by p3n1cillin · 6 comments
p3n1cillin commented 2026-10-14 18:21:30 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-14T18:21:30Z.


Lies of P (PPSA10261, Unreal Engine 4) on Windows 11, RTX 5070, MinGW GCC 15, Release, main a453108cf, relinked with --windows (title modules from sce_module), driven with Enter presses (Cross).

What happens:

  1. The first run spends about 3 minutes compiling shaders behind a black screen.
  2. It shows the NEOWIZ logo, creates its save (Account1), and reaches the in-game loading screen ("Now Lying ...", with a tip card).
  3. It then never leaves that screen. In a 15-minute run, captures at 400, 550, 700, 850 and 890 s are byte-identical, so even the loading animation has stopped.
  4. There's no exception, FATAL or not implemented line, and the process keeps running.

Thread state at about 420 s:

  • No shader recompilation is running; the recompiler threads are idle.
  • RenderThread 2 alternates between TimedWait::Condition::waitSignal (libkernel) and title code (rip 0x1430889ad, 0x1445302e1), so it's polling rather than blocked.
  • The game thread is parked in TimedWait; the AGC queue workers and the presenter are idle.

This looks like the title waiting for a GPU-side completion (a label, fence or flip) that never arrives, rather than a library stop. I haven't identified which wait it is.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5853245505 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5983). Originally posted by [p3n1cillin](https://github.com/p3n1cillin) on 2026-10-14T18:21:30Z. --- Lies of P (PPSA10261, Unreal Engine 4) on Windows 11, RTX 5070, MinGW GCC 15, Release, `main` `a453108cf`, relinked with `--windows` (title modules from `sce_module`), driven with Enter presses (Cross). **What happens:** 1. The first run spends about 3 minutes compiling shaders behind a black screen. 2. It shows the NEOWIZ logo, creates its save (`Account1`), and reaches the in-game loading screen ("Now Lying ...", with a tip card). 3. It then never leaves that screen. In a 15-minute run, captures at 400, 550, 700, 850 and 890 s are byte-identical, so even the loading animation has stopped. 4. There's no exception, `FATAL` or `not implemented` line, and the process keeps running. **Thread state at about 420 s:** - No shader recompilation is running; the recompiler threads are idle. - `RenderThread 2` alternates between `TimedWait::Condition::waitSignal` (libkernel) and title code (rip `0x1430889ad`, `0x1445302e1`), so it's polling rather than blocked. - The game thread is parked in `TimedWait`; the AGC queue workers and the presenter are idle. This looks like the title waiting for a GPU-side completion (a label, fence or flip) that never arrives, rather than a library stop. I haven't identified which wait it is. AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-10-14 18:33:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T18:33:57Z.


This report is pinned to main a453108cf, so the first useful check is whether the same loading-screen freeze still reproduces on current main. If it does, could you capture a run with APS5_PROFILE_GPU=1 through the stall and attach the final [gputime] lines, along with a fresh RenderThread 2 stack showing the guest caller around the polling loop? The profile includes GPU batch span and per-program time; paired with the caller stack, that should distinguish unfinished GPU work from the title polling after the queue goes idle. The current report does not identify a wait primitive or command, so a generic code change would be guesswork.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6175528247 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5983#issuecomment-6175528247). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-14T18:33:57Z. --- This report is pinned to `main` `a453108cf`, so the first useful check is whether the same loading-screen freeze still reproduces on current `main`. If it does, could you capture a run with `APS5_PROFILE_GPU=1` through the stall and attach the final `[gputime]` lines, along with a fresh `RenderThread 2` stack showing the guest caller around the polling loop? The profile includes GPU batch span and per-program time; paired with the caller stack, that should distinguish unfinished GPU work from the title polling after the queue goes idle. The current report does not identify a wait primitive or command, so a generic code change would be guesswork.
p3n1cillin commented 2026-10-14 18:44:27 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-14T18:44:27Z.


Follow-up, ruling out one lead:

  • The default run has two WAIT_REG_MEM timeouts on queue 0x20 during start-up:
    queue 0x20 WAIT_REG_MEM at 0x1020f776a0 timed out after 1000ms (function 3 ref 0x1 mask 0xffffffff value 0x20f776c0)
      earlier write by queue 0x0 opcode 0x50 at 0x1020f776a0+0x4
      earlier write by queue 0x0 opcode 0x49 at 0x1020f776a0+0x4
      recorder: ... queue 0 dormant 1, completions pending 0, label due 0
    queue 0x20 WAIT_REG_MEM at 0x1021294d20 timed out after 1000ms (function 3 ref 0x1 mask 0xffffffff value 0x2128bd80)
    
  • With APS5_GPU_WAIT_TIMEOUT_MS=60000 those waits are satisfied (no timeout lines at all), so the label does arrive, just later than 1 s.
  • The title still freezes on the same loading screen. Captures at 200, 300, 400 and 500 s are byte-identical, so those early-running gated dispatches aren't what leaves it stuck.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6175724303 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5983#issuecomment-6175724303). Originally posted by [p3n1cillin](https://github.com/p3n1cillin) on 2026-10-14T18:44:27Z. --- Follow-up, ruling out one lead: - **The default run has two `WAIT_REG_MEM` timeouts on queue `0x20` during start-up:** ``` queue 0x20 WAIT_REG_MEM at 0x1020f776a0 timed out after 1000ms (function 3 ref 0x1 mask 0xffffffff value 0x20f776c0) earlier write by queue 0x0 opcode 0x50 at 0x1020f776a0+0x4 earlier write by queue 0x0 opcode 0x49 at 0x1020f776a0+0x4 recorder: ... queue 0 dormant 1, completions pending 0, label due 0 queue 0x20 WAIT_REG_MEM at 0x1021294d20 timed out after 1000ms (function 3 ref 0x1 mask 0xffffffff value 0x2128bd80) ``` - **With `APS5_GPU_WAIT_TIMEOUT_MS=60000` those waits are satisfied** (no timeout lines at all), so the label does arrive, just later than 1 s. - **The title still freezes on the same loading screen.** Captures at 200, 300, 400 and 500 s are byte-identical, so those early-running gated dispatches aren't what leaves it stuck. AI-assisted: yes (Claude Code)
simonbronk commented 2026-10-14 20:11:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-14T20:11:06Z.


A second title with the same symptom: Onimusha: Way of the Sword (PPSA27836, RE Engine). Same setup: Windows 11 Pro 26200, RTX 5070, driver 617.42, WinLibs GCC 15.2.0, Release. It also happens on a453108cf. I have a good base and a bad base, which may help narrow it down.

Good: a local branch on main 0b97f8b9f plus the title's PRs (#5769). It shows the health warning and the language menu at about 13 FPS. No WAIT_REG_MEM timeout over 15 minutes.

Bad: a453108cf, e34c47921 and ed835aa76, each with the same PRs, rebased. After about 40 s, the screen stays black at 0.3 to 1 FPS, and WAIT_REG_MEM times out on queues 0x20 and 0x28. No exception:

[gpu] queue 0x20 WAIT_REG_MEM_64 at 0x210c841420 timed out after 1000ms (function 3 ref 0x63 mask 0xffffffffffffffff value 0x1)
[gpu]   recorder: table miss (refusal 0), open batch writes it 0, snapshot write overlaps 0, pending completion labels 0, write-back completions 0, pending label age -1.0 ms, write generation 59351 seen 59351, queue 0 dormant 0, completions pending 0, label due 0
[gpu]   preceding packet SET_UCONFIG_REG 00000342 c8020021 0c841420
[gpu]   preceding packet WAIT_REG_MEM_64 00000013 0c841420 00000021 00000063 00000000 ffffffff ffffffff 00000019

The same address pattern repeats on queue 0x28 with value 0x2.

Performance trace on a453108cf + PRs, warm caches (APS5_TRACE_SUMMARY_EVERY=20, window APS5_TRACE_SECONDS=100:20):

  • Intervals 0 to 41 s: p50 16.7 ms. From 41 s: p50 225 ms to 4 s, GPU busy only about 15 ms per present.
  • In the window, Driver.Packet.memory_wait is 1195 ms per frame. Waits run up to 3.1 s on queue worker 0x28 and 1.7 s on 0x0.
  • At the same time, queue worker 0x38 sits in Driver.WorkerWait.dequeue_order: 744 ms per frame, single waits of 1 to 3 s.
  • So one queue waits on a label while another waits for its turn, and the 1 s timeout is what lets them move on.

Ruled out on the bad base: #5851, #5484, #5631, a revert of #5592 (videoout buffer labels), and #757/#758 (the stop is already on a453108cf). The queue ordering code (waitFree / orderReleased) didn't change between the two bases, so a change in what the titles submit is more likely, for example a new flip or label path. I haven't bisected the 0b97f8b9f..a453108cf range yet (roughly 120 merges).

Trace and summary lines available on request.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6177372142 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5983#issuecomment-6177372142). Originally posted by [simonbronk](https://github.com/simonbronk) on 2026-10-14T20:11:06Z. --- A second title with the same symptom: Onimusha: Way of the Sword (PPSA27836, RE Engine). Same setup: Windows 11 Pro 26200, RTX 5070, driver 617.42, WinLibs GCC 15.2.0, Release. It also happens on `a453108cf`. I have a good base and a bad base, which may help narrow it down. **Good:** a local branch on `main` 0b97f8b9f plus the title's PRs (#5769). It shows the health warning and the language menu at about 13 FPS. No `WAIT_REG_MEM` timeout over 15 minutes. **Bad:** `a453108cf`, `e34c47921` and `ed835aa76`, each with the same PRs, rebased. After about 40 s, the screen stays black at 0.3 to 1 FPS, and `WAIT_REG_MEM` times out on queues `0x20` and `0x28`. No exception: ``` [gpu] queue 0x20 WAIT_REG_MEM_64 at 0x210c841420 timed out after 1000ms (function 3 ref 0x63 mask 0xffffffffffffffff value 0x1) [gpu] recorder: table miss (refusal 0), open batch writes it 0, snapshot write overlaps 0, pending completion labels 0, write-back completions 0, pending label age -1.0 ms, write generation 59351 seen 59351, queue 0 dormant 0, completions pending 0, label due 0 [gpu] preceding packet SET_UCONFIG_REG 00000342 c8020021 0c841420 [gpu] preceding packet WAIT_REG_MEM_64 00000013 0c841420 00000021 00000063 00000000 ffffffff ffffffff 00000019 ``` The same address pattern repeats on queue `0x28` with value `0x2`. **Performance trace** on `a453108cf` + PRs, warm caches (`APS5_TRACE_SUMMARY_EVERY=20`, window `APS5_TRACE_SECONDS=100:20`): - Intervals 0 to 41 s: p50 16.7 ms. From 41 s: p50 225 ms to 4 s, GPU busy only about 15 ms per present. - In the window, `Driver.Packet.memory_wait` is 1195 ms per frame. Waits run up to 3.1 s on queue worker `0x28` and 1.7 s on `0x0`. - At the same time, queue worker `0x38` sits in `Driver.WorkerWait.dequeue_order`: 744 ms per frame, single waits of 1 to 3 s. - So one queue waits on a label while another waits for its turn, and the 1 s timeout is what lets them move on. **Ruled out** on the bad base: #5851, #5484, #5631, a revert of #5592 (videoout buffer labels), and #757/#758 (the stop is already on `a453108cf`). The queue ordering code (`waitFree` / `orderReleased`) didn't change between the two bases, so a change in what the titles submit is more likely, for example a new flip or label path. I haven't bisected the 0b97f8b9f..a453108cf range yet (roughly 120 merges). Trace and summary lines available on request. AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-10-14 20:13:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T20:13:58Z.


One narrow candidate for the reported good/bad comparison: 17984f8c53695578b1f437598ff6f4d5b4fed659 (perf(agc): start no collect epoch at a wait its own queue's stored label satisfies) is inside 0b97f8b9f..a453108cf and changes two returns in Driver::waitMemory: when storedSince finds a write from the waiting queue, it now leaves the collection epoch unbumped. That may be unrelated, and it is not a queue-ordering change; I mention it because the new trace shows WAIT_REG_MEM_64 timeouts. If you can cheaply do one controlled comparison on the bad base with only this commit reverted, the timeout/present metrics would tell us whether this wait-path optimization belongs in the bisect range. It would not establish a fix by itself.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6177427667 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5983#issuecomment-6177427667). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-14T20:13:58Z. --- One narrow candidate for the reported good/bad comparison: `17984f8c53695578b1f437598ff6f4d5b4fed659` (`perf(agc): start no collect epoch at a wait its own queue's stored label satisfies`) is inside `0b97f8b9f..a453108cf` and changes two returns in `Driver::waitMemory`: when `storedSince` finds a write from the waiting queue, it now leaves the collection epoch unbumped. That may be unrelated, and it is not a queue-ordering change; I mention it because the new trace shows `WAIT_REG_MEM_64` timeouts. If you can cheaply do one controlled comparison on the bad base with only this commit reverted, the timeout/present metrics would tell us whether this wait-path optimization belongs in the bisect range. It would not establish a fix by itself.
p3n1cillin commented 2026-10-14 20:24:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-14T20:24:42Z.


@MarcZX100 thanks. Results on current main 4c1de0c0c, same setup:

  • It still reproduces. It reaches the same loading screen, and captures at 300, 400 and 460 s are byte-identical.
  • APS5_PROFILE_GPU=1 stops it much earlier, before any window exists. The log ends 150 lines in, right after the shader registry's start-up messages, and no swapchain is created in 460 s. The same build without the variable starts normally. So I couldn't get the [gputime] lines through the stall; that looks like a separate start-up interaction with the GPU profiler.
  • RenderThread 2 during the freeze. Six samples a second apart: one in title code at 0x14048fb7d (test %r14d,%r14d), the other five in ZwWaitForMultipleObjects under libkernel's TimedWait::Condition::waitSignal. gdb can't unwind past waitSignal into the title. I scanned the stack for return addresses in the title's image, but the candidates don't follow call instructions, so I'm not reporting them as callers.

If there's another profiler variable that doesn't affect start-up, I'll run it through the stall.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6177659958 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5983#issuecomment-6177659958). Originally posted by [p3n1cillin](https://github.com/p3n1cillin) on 2026-10-14T20:24:42Z. --- @MarcZX100 thanks. Results on current `main` `4c1de0c0c`, same setup: - **It still reproduces.** It reaches the same loading screen, and captures at 300, 400 and 460 s are byte-identical. - **`APS5_PROFILE_GPU=1` stops it much earlier, before any window exists.** The log ends 150 lines in, right after the shader registry's start-up messages, and no swapchain is created in 460 s. The same build without the variable starts normally. So I couldn't get the `[gputime]` lines through the stall; that looks like a separate start-up interaction with the GPU profiler. - **`RenderThread 2` during the freeze.** Six samples a second apart: one in title code at `0x14048fb7d` (`test %r14d,%r14d`), the other five in `ZwWaitForMultipleObjects` under libkernel's `TimedWait::Condition::waitSignal`. gdb can't unwind past `waitSignal` into the title. I scanned the stack for return addresses in the title's image, but the candidates don't follow call instructions, so I'm not reporting them as callers. If there's another profiler variable that doesn't affect start-up, I'll run it through the stall. AI-assisted: yes (Claude Code)
simonbronk commented 2026-10-15 10:05:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-15T10:05:56Z.


Update for Onimusha: Way of the Sword (PPSA27836): the black screen is gone on main 0afa6a607. Same machine as before: Windows 11, RTX 5070, NVIDIA 617.42.

With the same PRs on top, the title shows its start-up screens and the main menu, and reaches the New Game scene load. A few runs still log 1 to 4 WAIT_REG_MEM timeouts of 1000 ms during start-up, but presentation continues.

So something between a453108cf and 0afa6a607 fixed it for this title. It may be worth retrying Lies of P on 0afa6a607 or later.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6189559575 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5983#issuecomment-6189559575). Originally posted by [simonbronk](https://github.com/simonbronk) on 2026-10-15T10:05:56Z. --- Update for Onimusha: Way of the Sword (PPSA27836): the black screen is gone on `main` 0afa6a607. Same machine as before: Windows 11, RTX 5070, NVIDIA 617.42. With the same PRs on top, the title shows its start-up screens and the main menu, and reaches the New Game scene load. A few runs still log 1 to 4 `WAIT_REG_MEM` timeouts of 1000 ms during start-up, but presentation continues. So something between `a453108cf` and `0afa6a607` fixed it for this title. It may be worth retrying Lies of P on 0afa6a607 or later.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#5983
No description provided.