d3d12: the pipeline library's blobs are refused by the driver on LoadPipeline (0x80070057) after a driver update; every use recompiles (hitches up to 5 s) and a TDR device-removed follows #2781

Open
opened 2026-11-30 19:02:52 +00:00 by KretliJ · 5 comments
KretliJ commented 2026-11-30 19:02:52 +00:00 (Migrated from github.com)
Contributor

Imported from ubiquitarianism/leonida. Originally posted by KretliJ on 2026-11-30T19:02:52Z.


What happens

After the NVIDIA driver updated (616.64 -> 621.01), every run loads pipeline blobs from host-pipelines.bin that the driver now refuses: pipeline library: made [...] (the library did not load it: Parâmetro incorreto. (0x80070057)). Recompiles on first use take up to 5.2 s each (visible hitches), the stale blobs are stored back into the library, and after some minutes of play the GPU times out and the device is removed (0x887A0005, TDR). Deleting host-pipelines.bin fixes the hitches and the crash for the next runs (blobs created by the running driver load fine).

Commit

8f41d7d01 (also reproduced on the tree of 2026-11-29 and 2026-11-30 morning)

System

Windows 11 (26200.0), Ryzen 7 5700X, GeForce RTX 4060 Ti 8 GB (driver 621.01), 32 GB RAM. Series S profile, DLSS quality, frame generation 2x.

Where

pipelines

Command and steps

  1. Play with a library built under driver 616.64, then update the driver to 621.01 (no change to host-pipelines.bin).
  2. Start: scripts/play-d3d12.ps1 -Game <dir> -SeriesS -Dlss quality -FrameGen 2.
  3. In-world, every first bind of an affected pipeline hitches while pipeline library: made [...] runs; the log fills with did not load it: ... 0x80070057. Happens every time with the stale library; gone with the library deleted.

Affected examples seen in one run (mesh+pairs and computes; the "masked" twins of the sample-mask feature fail the same way):

  • made 410-5228 ms: compute 07c6ecf2f7ff4e69, compute 2ef7ed9bfc249bff, compute 43c72d85c4d86ffe
  • made 39-2258 ms: [mesh 12912f0f89809686, pixel 3bb5ca5c841aa2b4] and its masked twin

Output

pipeline library: made [mesh 12912f0f89809686, pixel 3bb5ca5c841aa2b4 masked] in 2258.9 ms (the library did not load it: Parâmetro incorreto. (0x80070057))
pipeline library: made [compute 07c6ecf2f7ff4e69] in 4059.6 ms (the library did not load it: Parâmetro incorreto. (0x80070057))
ERROR leonida_gpu::host: device-removed data; none
ERROR leonida_gpu::host: relay: the fence reports the device removed; device removed: A instância de dispositivo GPU foi suspensa. (0x887A0005)

Extra observations (may help)

  • New blobs created under 621.01 load fine: after deleting the library the same pipelines (RTX 4060 Ti, same title spot) run without the 0x80070057 lines and without the device-removed, 22k+ frames. So the refusal is of the stored blob, not of the shader.
  • The runtime already detects the stall case (RT-PIPELINE-CACHE-GROWTH-STALL). A sibling check that keys the library file by the driver version (or drops entries whose LoadPipeline fails with 0x80070057 instead of storing them back) would prevent both the hitches and the follow-up TDR.
  • Also seen in the same runs (possibly unrelated): CS_RaytracingResolve_* compute dispatches (hashes 2ef7ed9bfc249bff, 07c6ecf2f7ff4e69 under this build) time the GPU out on first execute under 621.01 even when freshly created; left out via LEONIDA_SKIP_PIPELINES as a workaround.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:6703996142 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2781). Originally posted by [KretliJ](https://github.com/KretliJ) on 2026-11-30T19:02:52Z. --- ### What happens After the NVIDIA driver updated (616.64 -> 621.01), every run loads pipeline blobs from `host-pipelines.bin` that the driver now refuses: `pipeline library: made [...] (the library did not load it: Parâmetro incorreto. (0x80070057))`. Recompiles on first use take up to 5.2 s each (visible hitches), the stale blobs are stored back into the library, and after some minutes of play the GPU times out and the device is removed (0x887A0005, TDR). Deleting `host-pipelines.bin` fixes the hitches and the crash for the next runs (blobs created by the running driver load fine). ### Commit 8f41d7d01 (also reproduced on the tree of 2026-11-29 and 2026-11-30 morning) ### System Windows 11 (26200.0), Ryzen 7 5700X, GeForce RTX 4060 Ti 8 GB (driver 621.01), 32 GB RAM. Series S profile, DLSS quality, frame generation 2x. ### Where pipelines ### Command and steps 1. Play with a library built under driver 616.64, then update the driver to 621.01 (no change to `host-pipelines.bin`). 2. Start: `scripts/play-d3d12.ps1 -Game <dir> -SeriesS -Dlss quality -FrameGen 2`. 3. In-world, every first bind of an affected pipeline hitches while `pipeline library: made [...]` runs; the log fills with `did not load it: ... 0x80070057`. Happens every time with the stale library; gone with the library deleted. Affected examples seen in one run (mesh+pairs and computes; the "masked" twins of the sample-mask feature fail the same way): - made 410-5228 ms: compute 07c6ecf2f7ff4e69, compute 2ef7ed9bfc249bff, compute 43c72d85c4d86ffe - made 39-2258 ms: [mesh 12912f0f89809686, pixel 3bb5ca5c841aa2b4] and its masked twin ### Output ``` pipeline library: made [mesh 12912f0f89809686, pixel 3bb5ca5c841aa2b4 masked] in 2258.9 ms (the library did not load it: Parâmetro incorreto. (0x80070057)) pipeline library: made [compute 07c6ecf2f7ff4e69] in 4059.6 ms (the library did not load it: Parâmetro incorreto. (0x80070057)) ERROR leonida_gpu::host: device-removed data; none ERROR leonida_gpu::host: relay: the fence reports the device removed; device removed: A instância de dispositivo GPU foi suspensa. (0x887A0005) ``` ### Extra observations (may help) - New blobs created under 621.01 **load fine**: after deleting the library the same pipelines (RTX 4060 Ti, same title spot) run without the 0x80070057 lines and without the device-removed, 22k+ frames. So the refusal is of the stored blob, not of the shader. - The runtime already detects the stall case (RT-PIPELINE-CACHE-GROWTH-STALL). A sibling check that keys the library file by the driver version (or drops entries whose LoadPipeline fails with 0x80070057 instead of storing them back) would prevent both the hitches and the follow-up TDR. - Also seen in the same runs (possibly unrelated): `CS_RaytracingResolve_*` compute dispatches (hashes 2ef7ed9bfc249bff, 07c6ecf2f7ff4e69 under this build) time the GPU out on first execute under 621.01 even when freshly created; left out via `LEONIDA_SKIP_PIPELINES` as a workaround.
zmasi commented 2026-11-30 21:08:45 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-30T21:08:45Z.


Opened #2789 stamping host-pipelines.driver beside host-pipelines.bin so open() discards a previous driver's library upfront, and self-healing already-unstamped caches when both Load*Pipeline and StorePipeline fail with 0x80070057 (E_INVALIDARG) on a stale on-disk entry.

AI-assisted: Claude Fable 5.2, reviewed with Gemini 4 Neon (XHigh), verified with Gemini 4 Carbon (High).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7291979155 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2781#issuecomment-7291979155). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-30T21:08:45Z. --- Opened #2789 stamping `host-pipelines.driver` beside `host-pipelines.bin` so `open()` discards a previous driver's library upfront, and self-healing already-unstamped caches when both `Load*Pipeline` and `StorePipeline` fail with `0x80070057` (`E_INVALIDARG`) on a stale on-disk entry. AI-assisted: Claude Fable 5.2, reviewed with Gemini 4 Neon (XHigh), verified with Gemini 4 Carbon (High).
KelboLive commented 2026-12-01 01:08:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T01:08:56Z.


Independent run report on the same driver (621.01), Windows 11, RTX 4070 Ti SUPER, 8f41d7d01, Series X profile, 2560x1440, no frame generation. Nine sessions today, on a machine that had never run the port before; every one ended in 0x887A0005.

The removal is not a TDR. With LEONIDA_D3D12_DEBUG=1 the debug layer's reason is Plug-and-play stop has been exercised on this adapter; DRED (breadcrumbs + markers) is empty; there is no Display/TDR, Kernel-PnP or WHEA event, no minidump and no LiveKernelReport. The submit thread is idle when it surfaces: when the host device went: the submitting thread was between submissions (nothing of ours was running on the card), of 0 lists. A 1 Hz probe (nvidia-smi pstate/power/clocks/memory, adapter PnP status, monitor state) read OK/P0 at every sample, including after the removal, so the card did not leave the bus.

Times to removal. 8.7, 8.2, 11.2, 19.8, 27.5, 49.1, 27.7, 35.7, 19.6 min. The only setting that made a difference is LEONIDA_D3D12_BACKGROUND=0 (driver's background shader work off): the runs with it average ~33 min against ~15 without.

Ruled out here:

  • Memory: LEONIDA_TEXTURE_BUDGET_MB=2048 moved host copies 4,833 -> 1,959 MB and the physical-memory floor 515 -> 1,226 MB; card memory stayed 10.9-13.3 of 15.3 GB; 0 refused passes, 0 failed allocations. Same crash.
  • Focus loss: alt-tabbing in and out in-world several times did not reproduce it.
  • Display power: with the display timeout set to never it still crashed (19.6 min).
  • A specific pipeline: the shader hashes next to the removal differ every run.
  • A stale library: this machine's host-pipelines.bin was created fresh under 621.01 today, and the first run crashed with it, so deleting it is not a cure here.

Closest correlations: the removal lands within a second or two of bursts of new pipelines (38 made in 13 s, eight threads in CreateGraphicsPipelineState, single builds to 1.2 s / 2.1 s / 2.4 s), while the driver is still reworking shaders in the background; and the session's private memory is 28-36 GB of a 32 GB machine at the end (2.4-4.5 GB free physical). The next test here is a rollback to 616.64.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7297142832 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2781#issuecomment-7297142832). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T01:08:56Z. --- Independent run report on the same driver (621.01), Windows 11, RTX 4070 Ti SUPER, `8f41d7d01`, Series X profile, 2560x1440, no frame generation. Nine sessions today, on a machine that had never run the port before; every one ended in `0x887A0005`. **The removal is not a TDR.** With `LEONIDA_D3D12_DEBUG=1` the debug layer's reason is `Plug-and-play stop has been exercised on this adapter`; DRED (breadcrumbs + markers) is empty; there is no Display/TDR, Kernel-PnP or WHEA event, no minidump and no LiveKernelReport. The submit thread is idle when it surfaces: `when the host device went: the submitting thread was between submissions (nothing of ours was running on the card), of 0 lists`. A 1 Hz probe (`nvidia-smi` pstate/power/clocks/memory, adapter PnP status, monitor state) read `OK`/`P0` at every sample, including after the removal, so the card did not leave the bus. **Times to removal.** 8.7, 8.2, 11.2, 19.8, 27.5, 49.1, 27.7, 35.7, 19.6 min. The only setting that made a difference is `LEONIDA_D3D12_BACKGROUND=0` (driver's background shader work off): the runs with it average ~33 min against ~15 without. **Ruled out here:** - Memory: `LEONIDA_TEXTURE_BUDGET_MB=2048` moved host copies 4,833 -> 1,959 MB and the physical-memory floor 515 -> 1,226 MB; card memory stayed 10.9-13.3 of 15.3 GB; 0 refused passes, 0 failed allocations. Same crash. - Focus loss: alt-tabbing in and out in-world several times did not reproduce it. - Display power: with the display timeout set to never it still crashed (19.6 min). - A specific pipeline: the shader hashes next to the removal differ every run. - A stale library: this machine's `host-pipelines.bin` was created fresh under 621.01 today, and the first run crashed with it, so deleting it is not a cure here. **Closest correlations**: the removal lands within a second or two of bursts of new pipelines (38 made in 13 s, eight threads in `CreateGraphicsPipelineState`, single builds to 1.2 s / 2.1 s / 2.4 s), while the driver is still reworking shaders in the background; and the session's private memory is 28-36 GB of a 32 GB machine at the end (2.4-4.5 GB free physical). The next test here is a rollback to 616.64.
ninjalegxd commented 2026-12-02 01:20:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by ninjalegxd on 2026-12-02T01:20:23Z.


Same on RTX 3090 (driver 621.14), Ryzen 9 9950X3D, 48 GB, Win11, -SeriesS.

Before: 4 runs in a row lost the device (0x887A0005) after 3-5.5 min in the world,
with 38-74 "the library did not load it ... (0x80070057)" per run and 2-5 s hitches.

Moved cache-2\pipelines\host-pipelines.bin (609 MB) aside, so the next start built a new one:

  • the world ran ~20 min instead of 3-5 (FPS 23-42, only 3 hitches over 1 s)
  • but 12 x 0x80070057 came back in the last ~30 s, then device removed again
    ("device-removed data; none", no Windows event 4101)

So a fresh library delays it a lot, but the refusals and the device loss come back.
Logs attached (before / after).

play-1202-020756-trimmed.log
(trimmed: first 300 + last 8000 lines; the middle was 22 min idle in the menu)
play-1202-015005.log

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7331584099 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2781#issuecomment-7331584099). Originally posted by [ninjalegxd](https://github.com/ninjalegxd) on 2026-12-02T01:20:23Z. --- Same on RTX 3090 (driver 621.14), Ryzen 9 9950X3D, 48 GB, Win11, -SeriesS. Before: 4 runs in a row lost the device (0x887A0005) after 3-5.5 min in the world, with 38-74 "the library did not load it ... (0x80070057)" per run and 2-5 s hitches. Moved cache-2\pipelines\host-pipelines.bin (609 MB) aside, so the next start built a new one: - the world ran ~20 min instead of 3-5 (FPS 23-42, only 3 hitches over 1 s) - but 12 x 0x80070057 came back in the last ~30 s, then device removed again ("device-removed data; none", no Windows event 4101) So a fresh library delays it a lot, but the refusals and the device loss come back. Logs attached (before / after). [play-1202-020756-trimmed.log](https://github.com/user-attachments/files/35715571/play-1202-020756-trimmed.log) (trimmed: first 300 + last 8000 lines; the middle was 22 min idle in the menu) [play-1202-015005.log](https://github.com/user-attachments/files/35715499/play-1202-015005.log)
ninjalegxd commented 2026-12-02 01:42:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by ninjalegxd on 2026-12-02T01:42:23Z.


Possibly related: VIctory-Neo turned the driver's background shader work off on NVIDIA
(KyleS98/VIctory-Neo@9230ed4: "the world's load no longer stops for half a minute").
On the same PC and save, Neo never loses the device, while mandy does within 3-20 min.
Given the correlation above (removal right after pipeline bursts while the driver reworks
shaders in the background), the same might help here.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7332009011 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2781#issuecomment-7332009011). Originally posted by [ninjalegxd](https://github.com/ninjalegxd) on 2026-12-02T01:42:23Z. --- Possibly related: VIctory-Neo turned the driver's background shader work off on NVIDIA (KyleS98/VIctory-Neo@9230ed4: "the world's load no longer stops for half a minute"). On the same PC and save, Neo never loses the device, while mandy does within 3-20 min. Given the correlation above (removal right after pipeline bursts while the driver reworks shaders in the background), the same might help here.
dannyhashim08 commented 2026-12-02 06:05:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ubiquitarianism/leonida. Originally posted by dannyhashim08 on 2026-12-02T06:05:05Z.


Another report, on Blackwell. Here it ends in a real hang (0x887A0006 DEVICE_HUNG), not the idle 0x887A0005 reported above.

System: RTX 5080 Laptop GPU, driver 621.47 (32.0.16.2147), Intel iGPU also present. Windows 11, build 26300. TdrDelay/TdrDdiDelay = 60. Series S profile, 1080p, render scale 0.75, FG 2x. Reproduced on 8422def75 and 0ae5a2664.

What happens: every run on the same save and route hangs 2–3 minutes in. The submitting thread waits 60–145 s on a 7-list submission. Then: host GPU device removed after a submission of 7 lists ... (0x887A0006), device-removed data; none. The log shows hundreds of the library did not load it: ... (0x80070057) lines, plus host mesh pipeline refused error=... (0x80070057), even with LEONIDA_LIBRARY_MAP=0.

What didn't help (five runs): LEONIDA_RELAY=0, LEONIDA_LIBRARY_MAP=0, LEONIDA_WINDOWS_BAR_MB=0 (all together), and adding 20b78ee12ecdb57d to LEONIDA_SKIP_PIPELINES. With LEONIDA_D3D12_DEBUG=1 the debug layer gave no validation errors before the removal, just DXGI_ERROR_DEVICE_HUNG ... TDR. I haven't tried moving the library aside yet.

Timing: in all five crashes, the hung submission starts 0.2–3.4 s after the first bind of compute 20b78ee12ecdb57d. Compute f133e35efed2a48a is first bound 6.5–9.6 s after the hang starts, so it isn't the trigger. At the time of removal, the library make for both computes is still listed as running, for 135–173 s (from shortly after launch):

when the host device went: the submitting thread was waiting for the card to run a submission, of 7 lists, for 86773.1 ms; pipeline library: make of afbd784ddf89793d8a4d682f406900dc [compute f133e35efed2a48a] running for 146632.8 ms on thread 19396, make of cd85bc0917b93c4d463ef5554402fb1b [compute 20b78ee12ecdb57d] running for 146306.5 ms on thread 16572; its file is not mapped

In the skip-list run, an indirect execution (stride 12, args [2, 9, 0, 0]) was dropped 2 ms after that first bind. The per-frame stats have no skip counter, so I can't tell whether LEONIDA_SKIP_PIPELINES caught any dispatch of 20b78ee12ecdb57d. Does the skip list cover indirect dispatches?

This fits the background-shader-work theory above: two library builds stuck for minutes, and the hang starts right at the first use of one of those pipelines. I'm happy to test #2789 or a "no background compile" switch on this machine. Logs available on request.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7336617507 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/issues/2781#issuecomment-7336617507). Originally posted by [dannyhashim08](https://github.com/dannyhashim08) on 2026-12-02T06:05:05Z. --- Another report, on Blackwell. Here it ends in a real hang (`0x887A0006` DEVICE_HUNG), not the idle `0x887A0005` reported above. **System:** RTX 5080 Laptop GPU, driver 621.47 (32.0.16.2147), Intel iGPU also present. Windows 11, build 26300. `TdrDelay`/`TdrDdiDelay` = 60. Series S profile, 1080p, render scale 0.75, FG 2x. Reproduced on `8422def75` and `0ae5a2664`. **What happens:** every run on the same save and route hangs 2–3 minutes in. The submitting thread waits 60–145 s on a 7-list submission. Then: `host GPU device removed after a submission of 7 lists ... (0x887A0006)`, `device-removed data; none`. The log shows hundreds of `the library did not load it: ... (0x80070057)` lines, plus `host mesh pipeline refused error=... (0x80070057)`, even with `LEONIDA_LIBRARY_MAP=0`. **What didn't help (five runs):** `LEONIDA_RELAY=0`, `LEONIDA_LIBRARY_MAP=0`, `LEONIDA_WINDOWS_BAR_MB=0` (all together), and adding `20b78ee12ecdb57d` to `LEONIDA_SKIP_PIPELINES`. With `LEONIDA_D3D12_DEBUG=1` the debug layer gave **no validation errors** before the removal, just `DXGI_ERROR_DEVICE_HUNG ... TDR`. I haven't tried moving the library aside yet. **Timing:** in all five crashes, the hung submission starts 0.2–3.4 s after the **first bind of compute `20b78ee12ecdb57d`**. Compute `f133e35efed2a48a` is first bound 6.5–9.6 s *after* the hang starts, so it isn't the trigger. At the time of removal, the library `make` for both computes is still listed as running, for 135–173 s (from shortly after launch): ``` when the host device went: the submitting thread was waiting for the card to run a submission, of 7 lists, for 86773.1 ms; pipeline library: make of afbd784ddf89793d8a4d682f406900dc [compute f133e35efed2a48a] running for 146632.8 ms on thread 19396, make of cd85bc0917b93c4d463ef5554402fb1b [compute 20b78ee12ecdb57d] running for 146306.5 ms on thread 16572; its file is not mapped ``` In the skip-list run, an indirect execution (stride 12, args `[2, 9, 0, 0]`) was dropped 2 ms after that first bind. The per-frame stats have no skip counter, so I can't tell whether `LEONIDA_SKIP_PIPELINES` caught any dispatch of `20b78ee12ecdb57d`. Does the skip list cover indirect dispatches? This fits the background-shader-work theory above: two library builds stuck for minutes, and the hang starts right at the first use of one of those pipelines. I'm happy to test #2789 or a "no background compile" switch on this machine. Logs available on request.
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
ProjectLeonida/mandy#2781
No description provided.