open-gpu-kernel-modules icon indicating copy to clipboard operation
open-gpu-kernel-modules copied to clipboard

Xid 109 `CTX SWITCH TIMEOUT` on RTX 5090 / Blackwell GB202 during Forza Horizon 6 via Proton — open kernel module 595.71.05

Open AkihaTatsu opened this issue 6 months ago • 6 comments

NVIDIA Open GPU Kernel Modules Version

595.71.05 (Arch package nvidia-open-dkms 595.71.05-2).

Please confirm this issue does not happen with the proprietary driver (of the same version). This issue tracker is only for bugs specific to the open kernel driver.

  • [x] I confirm that this does not happen with the proprietary driver package.

Operating System and Version

CachyOS Linux (rolling).

Kernel Release

Linux 7.0.6-1-cachyos #1 SMP PREEMPT_DYNAMIC Mon, 11 May 2026 15:10:22 +0000 x86_64 GNU/Linux

Please confirm you are running a stable release kernel (e.g. not a -rc). We do not accept bug reports for unreleased kernels.

  • [x] I am running on a stable kernel release.

Hardware: GPU

GPU 0: NVIDIA GeForce RTX 5090 (UUID: GPU-[REDACTED-UUID])

Describe the bug

Forza Horizon 6 (Steam AppID 2483190, build 354221, run via Proton) hangs the graphics context after ~3 minutes of open-world gameplay. Every occurrence raises an Xid 109 CTX SWITCH TIMEOUT with a byte-identical signature across runs, then the game receives DXGI DEVICE_REMOVED (HRESULT 0x00000102 → WAIT_TIMEOUT) and writes a crash report.

The Xid is the first and only kernel-side fault. The user-mode crash (ACCESS_VIOLATION_WRITE while writing to a device-removed swapchain resource) is a downstream consequence, not the trigger.

Selected kernel log:

May 16 00:00:33 [REDACTED-HOST] kernel: NVRM: GPU at PCI:0000:01:00: GPU-[REDACTED-UUID]
May 16 00:00:33 [REDACTED-HOST] kernel: NVRM: Xid (PCI:0000:01:00): 109, pid=159175, name=forzahorizon6.e, channel 0x00000029, errorString CTX SWITCH TIMEOUT, Info 0x3c03f
May 16 00:05:20 [REDACTED-HOST] kernel: NVRM: Xid (PCI:0000:01:00): 109, pid=174356, name=forzahorizon6.e, channel 0x00000029, errorString CTX SWITCH TIMEOUT, Info 0x30c03f
May 16 00:42:45 [REDACTED-HOST] kernel: NVRM: Xid (PCI:0000:01:00): 109, pid=98371,  name=forzahorizon6.e, channel 0x0000001f, errorString CTX SWITCH TIMEOUT, Info 0x3c02c

(Three confirmed events across two boots — full history in attached log bundle. The channel index varies; Info always has the low byte 0x3f / 0x2c family, suggesting the same fault-class.)

The hang appears to be driver-side rather than a translation-layer artifact:

  • Reproduces under both proton-cachyos-slr (custom Proton with cherry-picked vkd3d-proton commits) and stock Valve Proton (all provided by Valve which can run Forza Horizon 6 is tested; same error produced).
  • VRAM usage at crash is far below budget — last run reported 4.9 GB used out of 29.0 GB budget (see attached CrashReport.xml).
  • Crashes occur both with the in-game High preset and Extreme preset, with DLSS UltraPerformance through Quality, at 4K and 1440p, with/without ray tracing.
  • Re-running with the very-low preset and minimum supported settings did not avoid the crash (history: prior session reproduced with Extreme + DLSS UltraPerformance at 4K, current session reproduced with High + DLSS UltraPerformance at 4K and 72 fps cap).
  • No NVIDIA assert lines, no GPU-Z page-fault, no DPC watchdog trigger — the channel just stops switching context.

The pattern matches general descriptions of GSP-firmware context scheduler stalls reported elsewhere on Blackwell; this filing is intended to give NVIDIA a clean reproducer plus the requested diagnostic bundle.

To Reproduce

  1. RTX 5090 / GB202 on the open kernel module 595.71.05, stable linux-cachyos 7.0.6 (Arch-based, KDE Plasma).
  2. Install Forza Horizon 6 (Steam AppID 2483190).
  3. Set Steam Compatibility for FH6 to proton-cachyos-11.0-20260429-slr (or stock Proton-Experimental, GE-Proton10-34, Proton 10.0 -4, etc. — both reproduce). Set launch options to PROTON_LOG="+timestamp,+seh,+loaddll" VKD3D_DEBUG=warn %command%.
  4. Launch the game and reach the open world. Drive any vehicle for 3 to 5 minutes in any region.
  5. The game freezes; dmesg / journalctl -k -g Xid shows Xid 109 CTX SWITCH TIMEOUT. The game writes ~/.../ForzaHorizon6/CrashReport.xml with REASON="Video card" and REASON_INFO="0x0000000000000102".
  6. The system remains responsive; only the FH6 process is wedged. No reboot required.

Bug Incidence

Always

nvidia-bug-report.log.gz

nvidia-bug-report.log.gz

More Info

No response

AkihaTatsu avatar May 15 '26 17:05 AkihaTatsu

Can you please try to use proton-cachyos and pass PROTON_VKD3D_HEAP=1 and see if it works?

ptr1337 avatar May 15 '26 17:05 ptr1337

https://github.com/HansKristian-Work/vkd3d-proton/pull/3029/changes

Maybe also related

ptr1337 avatar May 15 '26 17:05 ptr1337

Can you please try to use proton-cachyos and pass PROTON_VKD3D_HEAP=1 and see if it works?

Extra args like PROTON_VKD3D_HEAP=1, VKD3D_CONFIG=no_upload_hvv,single_queue have been tried out on all available Proton versions on Steam as well as proton-cachyos and proton-cachyos-slr. Same crashes happen during a sudden 100% peak in GPU usage after almost the same ~3 minutes of open-world gameplay, regardless of graphic quality settings.

https://github.com/HansKristian-Work/vkd3d-proton/pull/3029/changes

Maybe also related

I will keep an eye on that.

AkihaTatsu avatar May 16 '26 00:05 AkihaTatsu

Another Xid 109 CTX SWITCH TIMEOUT data point — RTX 5090 (GB202), Proton, open kernel module 610.57.04. One occurrence so far, but the signature matches this thread exactly.

Environment

  • GPU: NVIDIA GeForce RTX 5090 (GB202), PCI 0000:01:00, power-limited to 400 W via nvidia-smi -pl at boot
  • Driver: nvidia-open-dkms 610.57.04-1 (Arch, open kernel module) — UMD/KMD matched (freshly rebooted onto the new module)
  • Kernel: 7.1.8-arch1-3 (stable Arch kernel)
  • Dist: Arch-based (Omarchy), Hyprland (Wayland)
  • Game: Deadlock (Steam AppID 1422450), Proton Experimental 11.0-100, gamescope 3.16.25, launch: gamescope -f -w 5120 -h 2160 --force-grab-cursor, display 5120×2160@100 Hz @ 1.6667 scale

Kernel log (2026-08-15 20:56:07 EDT = 2026-08-16 00:56:07 UTC):

NVRM: GPU at PCI:0000:01:00: GPU-<uuid>
NVRM: GPU Board Serial Number: <redacted>
NVRM: Xid (PCI:0000:01:00): 109, pid=77956, name=MainThrd, channel 0x0000000f, errorString CTX SWITCH TIMEOUT, Info 0x1c016

What happened

  • Mid-match, the game's rendered output froze solid (~1 h into the session; session started 19:49:41 local). Desktop and everything else stayed fully responsive.
  • The Xid above is the only kernel-side fault; no other Xids, no thermal/power Xids, no OOM, no segfault. No minidump was produced; the process tree was still alive and was killed externally ~20 s later (kill of the gamescope window), so this is a GPU-side wedge, not a user-mode crash.
  • Note the Info value 0x1c016 differs from the 0x3c03f/0x30c03f/0x3c02c family in the OP — different low byte, same fault class, for what that's worth.

Context that may matter

  • First heavy game load of the day on 610.57.04: the driver was upgraded 590.48.01 → 610.57.04 that morning (13:13 local) and the new module loaded at the 13:48 reboot. The earlier session under this exact same stack ran ~4.5 h without incident, so it's not immediate-on-load.
  • No other Xid 109 (or any Xid) on this machine since January per journal history.

Happy to run nvidia-bug-report.sh and attach it on the next recurrence, and to test anything specific (closed kernel module at the same version, env vars, different Proton) if that would help isolate. Also appears related to the broader Blackwell presentation-freeze issue #880 (internal bug 5376205)

swein avatar Aug 16 '26 01:08 swein

Additional data point: Xid 109 CTX SWITCH TIMEOUT is decoupled from the application hang (GB203 / RTX 5070 Ti, 595.91.07 and 610.57.04 open)

Reproducing a very similar failure to this thread on GB203 rather than GB202, with a different title (NBA 2K27, D3D12 via vkd3d-proton). Posting because I was able to separate the Xid from the hang, which may mean Xid 109 is a downstream symptom here rather than the fault itself.

System

GPU NVIDIA GeForce RTX 5070 Ti (GB203), VBIOS 98.03.58.00.4F, 16 GB
Driver 595.91.07 and 610.57.04, open kernel modules
Kernel 7.0.0-31-generic (Ubuntu 24.04.5)
CPU Intel Core Ultra 9 285K (8 P + 16 E, 24 threads, no SMT)
Proton experimental-11.0-20260917b, hotfix-20260828-ptr
Session reproduced on both Xorg and Wayland

Xid traces

Sep 18 20:07:01 NVRM: Xid (PCI:0000:02:00): 109, pid=8494,   name=RenderThread, channel 0x0000000d, CTX SWITCH TIMEOUT, Info 0x14c011
Sep 19 15:24:44 NVRM: Xid (PCI:0000:02:00): 109, pid=45252,  name=RenderThread, channel 0x0000000d, CTX SWITCH TIMEOUT, Info 0xc011
Sep 21 15:01:42 NVRM: Xid (PCI:0000:02:00): 109, pid=238459, name=RenderThread, channel 0x0000000b, CTX SWITCH TIMEOUT, Info 0x7c00f
Sep 21 15:43:24 NVRM: Xid (PCI:0000:02:00): 109, pid=25296,  name=RenderThread, channel 0x00000011, CTX SWITCH TIMEOUT, Info 0xdc017

Always name=RenderThread, always this one title. No other workload on this machine has ever produced an Xid.

The hang signature (identical in every occurrence)

Captured live from /proc/<pid>/task/*:

249-306 jiffies/5s   NBA2K27.exe   wchan=0  (syscall=running)   <-- main thread, userspace spin
 24 (or 8) PsoJob    futex_wait_multiple                         <-- workers parked
 24 (or 8) LoadJob   futex_wait_multiple
 10 vkd3d_fence      futex_do_wait     (most with 0 jiffies ever accumulated)
 10 vkd3d_queue      futex_do_wait
GPU: 2-4% util, 500-900 MHz, ~22 W

The main thread spins in userspace — syscall=running across repeated samples, never entering the kernel — while every job-system worker sits parked having completed its work, and the vkd3d fence/queue threads are idle. Audio threads (VCAUDIO3, FAudio, OpusDecoder) keep accumulating CPU throughout, so the process is alive; only the render/main loop is stuck.

Why I think the Xid is an effect, not the cause

Setting the following launch options:

VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains VKD3D_CONFIG=nodxr,force_host_cached

stopped Xid 109 from being logged entirely (2 subsequent runs, no new Xid in journalctl -k) — while the hang persisted completely unchanged, same thread signature, same GPU idle state.

The one behavioural difference: without those options the main thread spins tight at ~100% of a core and the Xid fires; with them it spins at ~50% with a yield in the loop (wchan=poll_schedule_timeout) and no Xid is logged. That is consistent with the GPU context being starved by a CPU-side stall for long enough to trip the context-switch watchdog — i.e. the Xid reports the consequence of the application already being wedged.

Eliminated by direct test

Each tested individually, hang reproduced in all cases:

  • Driver 595.91.07 → 610.57.04 (open) — Xid 109 on both
  • Xorg → Wayland
  • Proton Experimental → Hotfix
  • fsync → esync (PROTON_NO_FSYNC=1) — workers move futex_wait_multiple → anon_pipe_read, hang identical, so not a Wine sync-primitive lost wakeup
  • Shader/PSO cache: empty, and fully rebuilt (2.9 GB) — hang identical
  • iGPU excluded (VK_DRIVER_FILES=.../nvidia_icd.json, verified zero Intel/anv libs in /proc/<pid>/maps)
  • DLSS off, VSync off, RT off (nodxr)
  • CPU affinity taskset -c 0-7 (P-cores only) — worker pools drop 24 → 8, hang identical

Hardware ruled out

  • PCIe negotiates Gen5 x16 under load (Gen1 at idle is normal downclock); Replays Since Reset: 0, no AER events
  • 60 s sustained GPU compute (llama.cpp/Ollama inference, 2550 MHz) — completely clean, no Xid
  • Thermals 30–37 °C; HW Thermal Slowdown, HW Power Brake counters both 0 µs; stock 300 W limit, no OC, no clock offsets

Happy to provide full thread dumps, 1 Hz nvidia-smi dmon telemetry covering the approach to the hang, or to test patches.

bgrice86-hash avatar Sep 21 '26 21:09 bgrice86-hash

Additional data point: Xid 109 CTX SWITCH TIMEOUT is decoupled from the application hang (GB203 / RTX 5070 Ti, 595.91.07 and 610.57.04 open)

Reproducing a very similar failure to this thread on GB203 rather than GB202, with a different title (NBA 2K27, D3D12 via vkd3d-proton). Posting because I was able to separate the Xid from the hang, which may mean Xid 109 is a downstream symptom here rather than the fault itself.

System

GPU NVIDIA GeForce RTX 5070 Ti (GB203), VBIOS 98.03.58.00.4F, 16 GB
Driver 595.91.07 and 610.57.04, open kernel modules
Kernel 7.0.0-31-generic (Ubuntu 24.04.5)
CPU Intel Core Ultra 9 285K (8 P + 16 E, 24 threads, no SMT)
Proton experimental-11.0-20260917b, hotfix-20260828-ptr
Session reproduced on both Xorg and Wayland

Xid traces

Sep 18 20:07:01 NVRM: Xid (PCI:0000:02:00): 109, pid=8494,   name=RenderThread, channel 0x0000000d, CTX SWITCH TIMEOUT, Info 0x14c011
Sep 19 15:24:44 NVRM: Xid (PCI:0000:02:00): 109, pid=45252,  name=RenderThread, channel 0x0000000d, CTX SWITCH TIMEOUT, Info 0xc011
Sep 21 15:01:42 NVRM: Xid (PCI:0000:02:00): 109, pid=238459, name=RenderThread, channel 0x0000000b, CTX SWITCH TIMEOUT, Info 0x7c00f
Sep 21 15:43:24 NVRM: Xid (PCI:0000:02:00): 109, pid=25296,  name=RenderThread, channel 0x00000011, CTX SWITCH TIMEOUT, Info 0xdc017

Always name=RenderThread, always this one title. No other workload on this machine has ever produced an Xid.

The hang signature (identical in every occurrence)

Captured live from /proc/<pid>/task/*:

249-306 jiffies/5s   NBA2K27.exe   wchan=0  (syscall=running)   <-- main thread, userspace spin
 24 (or 8) PsoJob    futex_wait_multiple                         <-- workers parked
 24 (or 8) LoadJob   futex_wait_multiple
 10 vkd3d_fence      futex_do_wait     (most with 0 jiffies ever accumulated)
 10 vkd3d_queue      futex_do_wait
GPU: 2-4% util, 500-900 MHz, ~22 W

The main thread spins in userspace — syscall=running across repeated samples, never entering the kernel — while every job-system worker sits parked having completed its work, and the vkd3d fence/queue threads are idle. Audio threads (VCAUDIO3, FAudio, OpusDecoder) keep accumulating CPU throughout, so the process is alive; only the render/main loop is stuck.

Why I think the Xid is an effect, not the cause

Setting the following launch options:

VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains VKD3D_CONFIG=nodxr,force_host_cached

stopped Xid 109 from being logged entirely (2 subsequent runs, no new Xid in journalctl -k) — while the hang persisted completely unchanged, same thread signature, same GPU idle state.

The one behavioural difference: without those options the main thread spins tight at ~100% of a core and the Xid fires; with them it spins at ~50% with a yield in the loop (wchan=poll_schedule_timeout) and no Xid is logged. That is consistent with the GPU context being starved by a CPU-side stall for long enough to trip the context-switch watchdog — i.e. the Xid reports the consequence of the application already being wedged.

Eliminated by direct test

Each tested individually, hang reproduced in all cases:

  • Driver 595.91.07 → 610.57.04 (open) — Xid 109 on both
  • Xorg → Wayland
  • Proton Experimental → Hotfix
  • fsync → esync (PROTON_NO_FSYNC=1) — workers move futex_wait_multiple → anon_pipe_read, hang identical, so not a Wine sync-primitive lost wakeup
  • Shader/PSO cache: empty, and fully rebuilt (2.9 GB) — hang identical
  • iGPU excluded (VK_DRIVER_FILES=.../nvidia_icd.json, verified zero Intel/anv libs in /proc/<pid>/maps)
  • DLSS off, VSync off, RT off (nodxr)
  • CPU affinity taskset -c 0-7 (P-cores only) — worker pools drop 24 → 8, hang identical

Hardware ruled out

  • PCIe negotiates Gen5 x16 under load (Gen1 at idle is normal downclock); Replays Since Reset: 0, no AER events
  • 60 s sustained GPU compute (llama.cpp/Ollama inference, 2550 MHz) — completely clean, no Xid
  • Thermals 30–37 °C; HW Thermal Slowdown, HW Power Brake counters both 0 µs; stock 300 W limit, no OC, no clock offsets

Happy to provide full thread dumps, 1 Hz nvidia-smi dmon telemetry covering the approach to the hang, or to test patches.


Update: 1 Hz telemetry captured across two further hangs — Xid fires after the GPU is already unresponsive

Instrumented with nvidia-smi dmon -s pucvmet -d 1 plus 10 s per-thread CPU sampling, and captured two more hangs. This tightens the decoupling claim above.

Hang A — 16:39:51, Xid 109 fired (channel 0x14, Info 0x198019):

16:38:50-16:39:30   sm 46-51%   pwr 103-107W   pclk 2887   fb ~10800MB   rxpci ~1300-1800MB/s   (healthy)
16:39:31            rxpci 3637 MB/s                                                             (burst)
16:39:32-37         fb 10813 -> 11182MB   sm 47->44   rxpci 1983->1046                          (decay begins)
16:39:38-44         sm 44->37   rxpci 805->555   mem util 9%->7%                                (13s drain)
16:39:45            sm 37->6    pwr 95->79
16:39:46            sm 4        pwr 56      fb 11094->10312MB  (-782MB freed)
16:39:47-51         *** 5 second gap - nvidia-smi dmon could not sample the GPU at all ***
16:39:51            Xid 109 logged
16:39:52+           sm 2-3%, mclk 13801 -> 810 -> 405 MHz

The GPU stops responding to sampling ~5 s before the Xid is logged, and the application-side stall begins ~14 s before that.

Hang B — 16:47:44, no Xid at all, same application-level outcome:

16:47:30-43   sm 37-39%   pwr 93W   pclk 2842   rxpci 0   (healthy)
16:47:44      sm 3        pwr 82                rxpci 0   (abrupt cliff, no precursor)
16:47:45      sm 3        pwr 39    pclk 1935   rxpci 0
16:48:02+     txpci 350 -> 12 MB/s
16:49:00      all process CPU stops (78 jiffies/10s, audio threads only)

Hang B ran with reduced texture detail and shows zero host-to-device traffic for the entire session, so the rxpci burst in Hang A was coincidental rather than causal. Both hangs produce the identical thread state (main thread spinning in userspace at 50-100% of a core, all PsoJob/LoadJob workers parked, vkd3d_fence/vkd3d_queue idle).

Also worth noting: in Hang B the game subsequently reported "network connection lost" and entered a reconnect loop. Per-thread CPU sampling shows the render stall begins ~75 s before the session drop, so the network error is downstream of the stall (heartbeats stop being pumped), not a cause of it.

Summary: on this hardware Xid 109 is neither necessary nor sufficient for the hang. It appears only when the CPU-side stall happens to leave work in flight long enough to trip the context-switch watchdog.

pviol, tviol, sbecc, dbecc and PCIe error counters are 0 throughout every capture. BAR1 usage is flat at 38 MB.

bgrice86-hash avatar Sep 21 '26 21:09 bgrice86-hash