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

Abierto
#42,283 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
8/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
cpp, linux, ubuntu

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
C++
Estrellas
34.4k
Forks
1.9k
Merge medio
1 d 23 h
PR fusionados (30 d)
166

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/WSL

Todos los issues de microsoft/WSL

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.