Skip to content

d3d12: DXGI_ERROR_DEVICE_REMOVED (0x887A0005) after 5 to 46 minutes on an RTX 4070 SUPER, every profile #2821

Backlog

Description

@DerSchweigefuchs

What happens

The d3d12 runtime ends with host GPU failure: ... device removed: DXGI_ERROR_DEVICE_REMOVED (0x887A0005) after 5 to 46 minutes in the open world, on Series X and Series S, at 1080, 1080-1440 and 4K output, with and without frame generation. Two of the crashes stop at the same texture (a 1024x1024 BC1, format 71).

Commit

d4fabd3 (one crash also on ffa0f8e the day before)

System

Windows 11 Pro 10.0.26200, Intel Core i9-13900K (8 P-cores + 16 E-cores, 32 threads), 32 GB RAM, NVIDIA GeForce RTX 4070 SUPER 12 GB, driver 621.40 (32.0.16.2140) Built with d3d12\scripts\build-nvidia.ps1 (diag profile)

Where

d3d12/ runtime (leonida.exe), in the running game, not the build.

Command and steps

Runs on 2026-12-01, all with -Log and -More @{LEONIDA_AMBIENT_FLOOR='0.4'; LEONIDA_AMBIENT_ALPHA='1'; LEONIDA_REFLECT_MOST='0.25'}; Smooth Motion off in the F1 menu:

Run Start Length Crash Card memory at the end (budget) Shared with the card Least free RAM
play-X-1080-1440p.ps1 00:39 27 min no (closed) 9261 MB (10605) 3721 MB 556 MB
play-X-1080-1440p.ps1, LEONIDA_OUTPUT=3840x2160 01:06 7 min yes 9874 MB (10955) 4234 MB 622 MB
same, LEONIDA_D3D12_DRED=light 01:19 5.5 min yes 9616 MB (10679) 4513 MB 539 MB
play-nvidia.ps1 -SeriesX -Resolution 1080, LEONIDA_OUTPUT=3840x2160 01:42 46 min (about 10 in the world after an idle half hour) yes 11027 MB (10994) 5427 MB 1359 MB
play-nvidia.ps1 (Series S, DLSS) 02:31 18 min yes about 8700 MB (10975), steady about 4190 MB 2394 MB

It happens every time; only the time to the crash changes.

  • The Series X runs filled the card's memory to its budget before the crash (in the 4th run it went from 1.75 GB to 11.0 GB in the last 10 minutes, and title memory windows placed in the PC's memory alone grew from 2.2 GB to 4.7 GB in the last minute of the 3rd run). The Series S run crashed with about 2.2 GB of the budget free, so a full card is not the whole story.
  • With LEONIDA_D3D12_DRED=light the log says crash tracing on (device-removed data) breadcrumbs=true markers=false, but no device-removed report was written at the crash. In an earlier run with the default DRED setting it was device-removed data; none.
  • Windows' System event log has no nvlddmkm, Display 4101 (TDR) or LiveKernelEvent entry for any of these crashes, and C:\Windows\LiveKernelReports has nothing new.

Output

The last lines of each crashed run (the localized DXGI text replaced by its name):


# 01:06, 4K output
Leonida: host GPU failure: no host list for the compare of host copies in the card's memory; device removed: DXGI_ERROR_DEVICE_REMOVED (0x887A0005); a diagnostics build with LEONIDA_D3D12_DEBUG=1 names the command

# 01:19, 4K output, DRED light
ERROR leonida_gpu::draw: the host device went while textures picked by index were made ready; last: Some(Placed(false, [3, 0, 0, 0, 1024, 0, 1024, 589825, 71, 1, 0, 261, 3145728, 0], [71, 4, 5768, 0, 1, 8, 0, 0, 0, 0, 658526208, 7, 0, 0, 0, 3])) why="DXGI_ERROR_DEVICE_REMOVED (0x887A0005)" slot=70508
Leonida: host GPU failure: no host list for the copies between host copies in the card's memory; device removed: DXGI_ERROR_DEVICE_REMOVED (0x887A0005)

# 01:42, -Resolution 1080, 4K output
ERROR leonida_gpu::draw: the host device went while textures picked by index were made ready; last: Some(Placed(false, [3, 0, 0, 0, 1024, 0, 1024, 589825, 71, 1, 0, 261, 3145728, 0], [71, 4, 5768, 0, 3, 6, 0, 0, 0, 0, 2585903104, 12, 0, 0, 0, 3])) why="DXGI_ERROR_DEVICE_REMOVED (0x887A0005)" slot=6679
Leonida: host GPU failure: no host list for the compare of host copies in the card's memory; device removed: DXGI_ERROR_DEVICE_REMOVED (0x887A0005)

# 02:31, Series S
Leonida: host GPU failure: no host list to bring host copies in the card's memory up to date; device removed: DXGI_ERROR_DEVICE_REMOVED (0x887A0005)


The full logs quote the title's memory and shader hashes, so they are not attached; I can look up more lines in them on request.

Activity

  1. added
    bug
    on Dec 1, 2026
  2. broveer commented on Dec 1, 2026

    @broveer

    Same crash here on an 8 GB laptop card, with the same driver (621.40), in all six runs today across three builds. The details
    match yours: no TDR / nvlddmkm / LiveKernelReports entry, device-removed data; none, and one crash ends on the same
    the host device went while textures picked by index were made ready line (a different texture: 256x256, format 83).

    System

    Windows 11 Home 26300, Ryzen AI 9 HX 370, 32 GB RAM, RTX 4060 Laptop 8 GB (7188 MB budget), NVIDIA 621.40.
    Built with d3d12\scripts\build-nvidia.ps1 (diag profile). Started with
    play-d3d12.ps1 -SeriesS -FrameGen 2 -Log -Adapter 4060 -More @{LEONIDA_WINDOWS_BAR_MB='1024'; LEONIDA_CARD_BUFFERS_MB='1024'; LEONIDA_SIM_MAX_STEP_MS='100'; LEONIDA_TITLE_GRAPHICS='performance'}.

    Not plain main: each build is upstream main at the commit below plus 15 of the Rust leak fixes from #2569. Those
    fixes didn't change how soon it crashes.

    Runs (2026-12-01, times UTC)

    Upstream main Start Crashed after Card memory peak (7188) Least free RAM At the crash
    640b0d0df 07:52 8.8 min 6903 MB 535 MB a 4.7 s frame just after a cutscene
    427aa19b6 (both pools at 512) 12:23 8.5 min 6116 MB 769 MB 14 submissions not finished; a compute pipeline compiling for 0.9 s
    427aa19b6 12:38 15.8 min 6550 MB 1591 MB a loading moment, 2 draws/frame, nothing compiling, 2 submissions not finished
    427aa19b6 12:54 16.5 min 7124 MB 576 MB a 9.4 s frame; a compute pipeline compiling for 9.6 s, 25 not finished
    e04721c7f 13:59 12.1 min 6883 MB 552 MB a 10.0 s frame; a compute pipeline compiling for 10.1 s, 27 not finished
    e04721c7f 14:11 8.5 min 6738 MB 388 MB a loading moment, 2 draws/frame, nothing compiling, 2 not finished

    Earlier builds since 2026-11-30 did the same after 7.5 to 28 minutes. "Not finished" is the new count from 0695de5
    (submissions of ours started and not yet seen finished).

    What these runs rule out

    • Card memory: the 12:38 run died with about 650 MB of the budget free. With LEONIDA_WINDOWS_BAR_MB and
      LEONIDA_CARD_BUFFERS_MB at 512 (12:23), the card stayed at 4.9-6.1 GB and it still crashed (and the card's own
      time went to 250-290 ms a frame, so 512 isn't a usable setting on this card).
    • RAM: the 12:38 run had 1.6 GB of physical memory and 12.6 GB of commit left.
    • Frame generation: you and the comments on Game crashes when gpu usage reaches 7 GB (on 3070Ti) #2607 already saw it with frame generation off.

    Two shapes, each seen twice

    1. A screen-pass compute pipeline that the driver takes about 10 s to compile. The frame waits the full
      LEONIDA_SCREEN_WAIT_MS (10 s), and the device is gone right after. Different pipelines each time.
    2. A quiet moment: a loading screen or cutscene, 2 draws a frame, nothing compiling, only 2 submissions in the air.

    Both come at transitions: out of a cutscene or load, or into a denser area.

    One more data point

    The same laptop, driver and save ran the VIctory-NVIDIA build (5fabb46ea) for 45 minutes without a device loss, with
    its card at 6.4-6.9 GB of 7188.

    Driver

    Every report of this I can find is on 621.x: 621.40 here, in your post and in #2607's first post; 621.24 in
    Miici0's runs on #2607. The test notes in main's commits say 616.64. Has anyone on 616.x seen this device loss? If
    nobody has, a run on 616.64 would tell driver from runtime, and I can do that run here.

    Related: #2607 (the same signature on 8 GB and 12 GB cards).

    AI-assisted (Claude Code, Claude Opus 5.5): it read the logs and wrote this summary. I ran every game session
    myself and checked the numbers.

  3. Speedbox666 commented on Dec 1, 2026

    @Speedbox666

    d3d12: Repeated DXGI_ERROR_DEVICE_REMOVED (0x887A0005) with GPU fence failure

    What happens

    The D3D12 runtime repeatedly terminates with DXGI_ERROR_DEVICE_REMOVED (0x887A0005). Both recorded crashes report a host GPU failure during fence synchronization.

    In the second run, the runtime crashed after approximately 3 minutes and 9 seconds. The fence returned UINT64_MAX (18446744073709551615) while waiting for fence value 77133.

    Both runs also contain pipeline library lookup failures (E_INVALIDARG / 0x80070057), although the pipelines appear to be recreated successfully.

    Commit

    [commit hash]

    System

    Component | Specification -- | -- OS | Windows 11 26H2 CPU | I9 13900k RAM | 64GB DDR5 GPU | RTX 4080 Super Driver | 621.24

    Observations

    • Both runs terminate with DXGI_ERROR_DEVICE_REMOVED (0x887A0005).

    • Both runs report device-removed data; none.

    • Pipeline library lookups fail with 0x80070057, but subsequent pipeline creation succeeds.

    • In the first run, a vertex/pixel pipeline took 402 ms to create, approximately 7 ms before the reported failure.

    • In the second run, the last recorded pipeline operation was a successful cache load approximately 1.1 seconds before the failure.

    • The second run reports exit code 0 despite the fatal GPU error.

    • It is unclear whether the pipeline library failures are related to the device removal.

    Output

    Run 1 — 21:44 UTC

    3909.8 ms before:
    pipeline library: made [vertex f6da88d93b045912,
    pixel e40174e01d7d84bf] in 144.6 ms
    (the library did not load it: Falscher Parameter. (0x80070057))
    

    3782.6 ms before:
    pipeline library: made [vertex f6da88d93b045912,
    pixel f5531be9af77f7eb] in 262.2 ms
    (the library did not load it: Falscher Parameter. (0x80070057))

    7.0 ms before:
    pipeline library: made [vertex f6da88d93b045912,
    pixel f0f93211f593f37a] in 402.0 ms
    (the library did not load it: Falscher Parameter. (0x80070057))

    4.1 ms before:
    sweep: 2 host copies of windows of title memory
    let go (12288 KiB), held by no list and no slot

    2026-12-01T21:44:03.477756Z ERROR leonida_gpu::host:
    device-removed data; none

    2026-12-01T21:44:03.477837Z ERROR leonida_gpu::host:
    relay: the fence reports the device removed;
    device removed: DXGI_ERROR_DEVICE_REMOVED (0x887A0005)

    Run 2 — 22:33 UTC

    9823.1 ms before:
    pipeline library: made [mesh 581b4c40cb0ca108,
    pixel e819d0b31c213166 masked] in 4.5 ms
    (the library did not load it: Falscher Parameter. (0x80070057))

    9374.9 ms before:
    pipeline library: made [mesh af6d42b80481c3a5,
    pixel 2567ef6bc3625832 masked] in 3.3 ms
    (the library did not load it: Falscher Parameter. (0x80070057))

    1101.1 ms before:
    pipeline library: loaded [vertex d166c341988178de,
    pixel e370f602fa0db9b2] in 0.1 ms

    2026-12-01T22:33:37.125951Z ERROR leonida_gpu::host:
    device-removed data; none

    2026-12-01T22:33:37.125991Z ERROR leonida_gpu::host:
    relay: fence 18446744073709551615 did not reach 77133;
    device removed: DXGI_ERROR_DEVICE_REMOVED (0x887A0005)

    Command finished (exit 0).
    Elapsed: 00:03:09.0417259

    The localized German DXGI error messages have been replaced with their English symbolic name for readability. Log excerpts have been shortened.

    Related issues

    Additional information

  4. Nebekenezzer commented on Dec 2, 2026

    @Nebekenezzer

    System

    • RTX 4070 12 GB (stock clocks), driver 621.40, Windows 11
    • Ryzen 7 7700, 32 GB DDR5-5600, page file fixed at 32–64 GB
    • Mandy main source downloaded 2026-12-01, built with scripts\build-nvidia.ps1 (diag, dlss, mimalloc)
    • Series S profile, DLSS Quality (720 → 1080), DLSS frame generation 2x, fullscreen

    Symptom

    • 8 crashes, each 3–18 minutes into play: DXGI_ERROR_DEVICE_REMOVED (0x887A0005).
      GetDeviceRemovedReason returns 0x887A0005 itself (not HUNG/RESET/INVALID_CALL).
    • No nvlddmkm/Display (TDR) events in the Windows System log at any crash time, and no WHEA errors.
    • LEONIDA_D3D12_DRED=light: breadcrumbs empty, "device-removed data; none" (no page fault).
    • Always when a lot of new scenery streams in at once: arriving/parking at a destination after a drive,
      taking a boat out onto open water, driving fast. Two crashes in the Donnie/Doug deal mission (like d3d12: device removed during the Donnie rescue mission #3023).
    • At the moment of the crash the log says the submitting thread was "preparing a submission", pipeline library: no call running.

    Ruled out (one change at a time)

    Test Result
    Frame generation off (-NoFrameGen -NoSmoothMotion) still crashes
    RAM: Firefox closed, ≥ 5 GB physical RAM free, 20+ GB commit left, 0 s "under pressure" still crashes
    VRAM at crash: 8.7–9.7 GB of ~11.1 GB budget (3.9–5.0 GB shared) under budget
    LEONIDA_LIBRARY_LOCK=1 still crashes (17.5 min)
    Fresh host-pipelines.bin (old one moved aside, #2781 workaround) still crashes (12 min)
    GPU at stock clocks still crashes
    Mandy main of 2026-12-01 13:44 vs later the same day both crash

    Note: even with a freshly built library, 7–25 pipelines per run log
    "the library did not load it: The parameter is incorrect (0x80070057)", so that seems unrelated.

    The interesting one: with the D3D12 debug layer it does NOT crash

    • LEONIDA_D3D12_DEBUG=1 (Windows Graphics Tools installed), same save, same triggers (boat, driving, parking):
      about 1 hour with no crash, while normal runs never got past 18 minutes.
    • It ran at ~18 fps (median frame 56 ms vs 28–44 ms normally).
    • The debug layer reported no errors or corruption, only warnings:
      GetResourceAllocationInfo 4 KB alignment (~44k), CreateDescriptorHeap 4194304 / 2097152 > 1000000 (twice at startup),
      CreateGraphicsPipelineState RTV slot not bound (37), ClearRenderTargetView clear value mismatch (18),
      PipelineLibrary::Load*Pipeline name not stored (a few).

    So the crash disappears when the debug layer serialises/slows things down. To me that points to a timing or
    threading problem at full speed (or something the driver only does when it isn't wrapped), rather than an invalid call.

    For comparison, VIctory 11.30.01 on the same PC, driver and save got through the same mission without crashing.

    I can share full logs if useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions