[615.78.08] Periodic ~100 ms GPU submission stalls at the start of "[vkrt] Analysis" activity (RTX 5090, vkd3d-proton, UE5 Lumen hardware RT)

Summary

In Silent Hill f (Unreal Engine 5, D3D12 through vkd3d-proton under Proton), setting Indirect Lighting to Lumen Epic causes a frame rate dip and a queue latency spike every ~3 seconds. Lower Lumen settings do not show the dips.

Each dip lines up with the start of an activity period of the driver thread [vkrt] Analysis. During the first 50–100 ms of each period:

  • The application’s submission thread, inside vkQueueSubmit, waits for free space in the driver’s submission ring. It spins in 20 µs pause and clock_gettime backoff steps.
  • GPU completion events drop by 15–31 %.
  • [vkrt] Analysis itself runs at 70–90 % of a core, almost entirely in pthread_rwlock_wrlock, pthread_rwlock_unlock and clock_gettime.

The CPU is not saturated, and the stalled thread is waiting inside the driver, not on application or translation-layer locks. The GPU appears to stop consuming submitted work when an analysis period starts.

System

Item Value
GPU GeForce RTX 5090, PCI 05:00.0, VBIOS 98.02.2E.40.0E
Driver 615.78.08 (proprietary kernel modules and user space)
CPU and memory AMD Ryzen 9 9950X (16 cores, 32 threads), 93 GiB
Kernel 7.2.10-1-cachyos
Desktop KDE Plasma 6.8.0, Wayland session (KWin)
Display One 5120×2160 monitor at 240 Hz on DisplayPort, driven by the RTX 5090
Game Silent Hill f, Steam AppID 2947440, Unreal Engine 5, D3D12

Reproduction

  1. Start Silent Hill f through Proton on the RTX 5090.
  2. In the graphics options, set Indirect Lighting to Lumen Epic.
  3. In gameplay at about 100 FPS, a frame rate overlay shows a dip and a queue latency spike (13 ms rising to about 21 ms) every ~3 seconds.
  4. With a lower Lumen setting, the periodic dips disappear.
  5. It doesn’t happen at every scene. This below screenshot shows the issue using proton-wineland-20261011 and its internal HUD.
  6. Environment variables used: PROTON_HUD=3,newline,fps.graph,latency.queue.graph,latency.display.graph,latency.interval.graph %command%

Measurements

Method

  • Per-thread scheduler statistics: /proc/<pid>/task/<tid>/schedstat was sampled about every 0.64 ms for 15 seconds, giving CPU time and context-switch counts per thread. No debugger or ptrace was used.
  • Whole-process profile: perf record -e task-clock:u -F 2000 -p <pid> for 30 seconds.
  • Call chains: perf record --user-callchains --call-graph dwarf,16384 -e task-clock:u -F 2000 -t <tids> for 12 seconds on [vkrt] Analysis and the busy vkd3d_queue threads.
  • Offsets: all addresses below are file offsets in libnvidia-glcore.so.615.78.08. For that library the first PT_LOAD segment maps file offset equal to virtual address.

1. Timing of [vkrt] Analysis activity

  • Cadence: in the 30-second profile, 20 activity periods start at intervals of 1.05–1.10 s, with every third interval about 3.05–3.15 s instead.

  • What the thread runs:

    Location Samples Share
    __vdso_clock_gettime 1,193
    libc pthread_rwlock_wrlock / pthread_rwlock_unlock 1,036
    together about 90 % of its samples
    libnvidia-glcore itself 223 the remainder
  • Duration: the thread uses 70–90 ms of CPU in the first ~100 ms of a period. In some periods it then stays busy at about 35 ms per 50 ms for up to 2 seconds.

2. Effect on submission and completion

The table uses 50 ms bins from the schedstat samples. vkd3d_queue is the vkd3d-proton thread that calls vkQueueSubmit; vkd3d_fence wakes once per completed GPU timeline value; RHIThread is the engine’s rendering thread.

Run, period start vkd3d_queue CPU per 50 ms vkd3d_queue wake-ups vkd3d_fence wake-ups RHIThread CPU per 50 ms
Normal bins (median) 5.4 ms about 250 about 470–490 about 37–38 ms
Run A, 0.6 s 23.0 ms 117 335 (−29 %) 26.1 ms
Run A, 2.8 s 27.2 ms 111 324 (−31 %) 26.7 ms
Run B, 6.1 s 21.0 ms 139 367 (−25 %) 29.4 ms
Run B, 9.2 s 21.1 ms 144 353 (−28 %) 28.5 ms
Run B, 12.7 s 15.9 ms 173 415 (−15 %) 31.0 ms

Only the first one or two bins of each analysis period show the effect. Later bins of a long analysis period don’t affect submission or completion.

3. The submitting thread during the stall

DWARF-unwound call chains from the vkd3d_queue thread, inside vkQueueSubmit:

  • 0xab5a00 takes the next slot of a ring buffer and finds it full (next index equals the read index).
  • While the ring is full, it alternates between two calls (return addresses 0xab5a59 and 0xab5a61):
    • 0x1029ed0: a backoff of about 20 µs, made of pause instructions and repeated clock reads through 0xa055a0 (clock_gettime(CLOCK_MONOTONIC) converted to µs). Return addresses: 0x1029f03, 0x1029f4d.
    • 0xae03f0 → 0xae0060: checks whether the read index has advanced. Return addresses: 0xae041e, 0xae00fe.
  • Further up the stack: 0xaca1f3 (function 0xac9d60), and in other chains 0xe82601 (function 0xe81c10), 0xe895c3 (function 0xe88ef0) and 0x91e673.

During activity periods this thread’s __vdso_clock_gettime samples rise from 0.45 to 5.8 per 50 ms bin. pthread_rwlock_* accounts for only about 0.4 % of its samples. So it is not blocked on the analysis thread’s locks; it is waiting for the GPU to drain the submission ring.

4. The analysis thread

  • Creation: created at 0xe31bd8 with entry function 0xe4b610. A second [vkrt] Analysis creation site is at 0xe3175d (entry 0xe46f90), and the sibling threads [vkcf] Analysis and [vkps] Update are created at 0xe30b77 and 0xe30f7b. The thread starts from 0x9f5853.

  • Hot call sites:

    Call From
    pthread_rwlock_wrlock 0xe4b919, 0xe4b993
    pthread_rwlock_unlock 0xe4b967, 0xe4b9ce
    Clock reads through 0xa055a0 0xe4b755 (215 samples), 0xe4b975 (246 samples)
  • Loop shape: a tight polling loop. Each iteration takes a work item and puts it back under a rwlock and reads the clock twice. It doesn’t sleep while items remain active, and the activity periods end about one second after the last activity.

  • Subsystem hint: strings referenced from this code region include vkpgoContext::DumpCounters, “- Analyzing”, “- Optimized” and “Recompiles %u (%u)”. That suggests the runtime shader-optimisation subsystem.

Interpretation

At the start of each [vkrt] Analysis period, the GPU stops consuming the application’s submitted work for about 50–100 ms. The submitting thread fills the ring and then waits for space, so frames finish late and the frame rate dips.

What the GPU waits on during that time can’t be seen from CPU samples. The analysis pass might require GPU-side synchronisation (counter readback, instrumentation, or replacing pipelines), but that is a guess.

Separately, the analysis thread’s busy polling costs up to one core while it is active.

Ruled out

  • CPU saturation: the system has 16 cores. The analysis thread uses at most one, and the game’s other threads keep running normally.
  • Locks in the application or translation layer: the stalled thread is inside the driver’s ring-space wait, not in Wine or vkd3d-proton synchronisation.
  • Compositor or presentation: GPU completions themselves slow down (fewer vkd3d_fence wake-ups), before any presentation step.
  • Unrelated game-side cost: the game has a constant contended lock in Unreal’s ray-tracing geometry tracking, costing about half a core every frame. It isn’t periodic and doesn’t explain the dips.

Questions for NVIDIA

  1. What does [vkrt] Analysis do, and is a GPU-side stall expected when one of its passes starts?
  2. Is there a supported setting, either an environment variable or an application-profile key, to disable this analysis for testing?
  3. Could the pass avoid stalling the submission ring, and could the thread block instead of busy-polling with pthread_rwlock and clock_gettime?