[WSL / D3D12, NVIDIA] GPU timeouts (TDR, DXGI_ERROR_DEVICE_HUNG) after a depth-stencil CopyResource under sustained load

Open
#42,283 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
8/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp, linux, ubuntu

Research direction

Start with the first comment's write-up and the attached 02-attachments.zip, especially the depthcopy/ stress program that loops the exact depth CopyResource sequence; run it under WSLg to confirm it still does not hang alone. Then compare the same workload on Windows with the same driver to isolate the WSL D3D12 passthrough path (/usr/lib/wsl/lib/libd3d12.so). Match the nvlddmkm event 153 timestamps to the WriteBufferImmediate breadcrumbs to see which barrier pair stalls. Done means a minimal reproducer that hangs under WSL and not on Windows.

Written by the indexing model from the issue text.

Description

GPU wsl2
Windows Version

Windows 11 25H2, build 26200.9711

WSL Version

WSL 3.0.5.0, kernel 6.18.58.1-1, WSLg 1.0.79

Are you using WSL 1, WSL 2, or WSLC?
  • WSL 2
  • WSL 1
  • WSLC
Kernel Version

6.18.58.1-1

Distro Version

Ubuntu 24.04

Other Software
  • Windows 11 25H2 (26200.9711), WSL 3.0.5.0, kernel 6.18.58.1-1, WSLg 1.0.79

  • Direct3D (WSL) 1.611.1-81528511, DXCore 10.0.26100.1

  • NVIDIA RTX PRO 500 Blackwell Generation Laptop GPU, driver 32.0.15.9595 (also the Intel iGPU, not used)

  • The translation layer: Wine/Proton 11 with a D3D12 passthrough to the WSL runtime (patches available)

Repro Steps

There is no standalone reproduction yet; the hang happens in a game.

  1. WSL2 with WSLg on an NVIDIA GPU (versions above), Ubuntu 24.04.
  2. Steam for Linux in WSL, running Diablo IV (Steam build) through Wine/Proton 11 with a D3D12 passthrough: every D3D12 call is forwarded unchanged to /usr/lib/wsl/lib/libd3d12.so (no vkd3d, no Vulkan).
  3. Play normally (town, open world, dungeons) at 3440x1440 or 1920x1200.
  4. After 8–45 minutes the GPU times out: all displays freeze for ~2–5 s, Windows logs nvlddmkm event 153 (usually two, 3–4 s apart), and the game's device reports DXGI_ERROR_DEVICE_HUNG (0x887A0006).

Seen 16 times on 2026-11-13 and 7 times on 2026-11-14 (session table in the attached report). No GPU timeouts in the 30 days before, outside these sessions.

Where the GPU stops (our own breadcrumbs via WriteBufferImmediate; DRED returns no data on WSL), in all 7 captured hangs, on the direct queue:
DrawIndexedInstanced xN into depth A (R24G8_TYPELESS, 128x128 or 256x256)
ResourceBarrier A DEPTH_WRITE -> COPY_SOURCE, B SRV -> COPY_DEST
CopyResource(B, A) <- GPU stops here
ResourceBarrier B COPY_DEST -> SRV <- or here
A standalone program looping exactly this sequence (attached, depthcopy/)
ran >8 million iterations on WSL without a hang, so it does not reproduce alone.

Expected Behavior

The same workload runs without GPU timeouts, as it does on Windows with the
same GPU and driver.

Actual Behavior

A GPU timeout (TDR) every 8–45 minutes of play: nvlddmkm event 153, all
displays freeze for a few seconds, DXGI_ERROR_DEVICE_HUNG.
Copying the depth texture per subresource, or through a buffer
(texture -> buffer -> texture), does not prevent it.
Recovering takes 15 s to over 3 minutes, because the game has to release tens
of thousands of objects through the WSL runtime first (details in the report);
after more than about a minute the game's online session is lost.

Diagnostic Logs

Attachments: GPU timeout events (nvlddmkm 153), passthrough removal logs, and the standalone stress program (depthcopy). Full write-up in the first comment.

02-attachments.zip

Dominant language
C++
Stars
34.4k
Forks
1.9k
Avg merge
1d 23h
Merged PRs (30d)
166

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/WSL

All issues in microsoft/WSL

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.