D3D12.X: a device hang names Windows' GPU timeout when it was one #2748

Open
github-bot wants to merge 1 commit from github-bot/gh-2748 into main AGit
Owner

@⁠Raul-Paiva on GitHub · 2026-11-26 09:58 UTC · original
Raul-Paiva:d3d12x-tdr-diagnostic → main · +320 −4 · 5 files · 1 commits · open

A 0x887a0006 (DEVICE_HUNG) or 0x887a0007 (DEVICE_RESET) removal can be Windows' GPU timeout (TDR): WDDM resets the GPU when it does not preempt within TdrDelay seconds of the scheduler asking (2 s by default, at the default TdrLevel). The removal code alone does not tell that apart from a hang the driver detected itself. The log now says whether Windows logged one. At start it names the timeout in effect. After such a removal it looks in the System log for the Display event 4101 Windows writes when it was its timeout. Logging only. Part of #505.

On an 8 GB laptop card, every 0x887a0006 at a retail title's world start had a 4101 event at the same time (14 of 14 runs). Raising TdrDelay took them away (#505 comment). Without the event, testers on slower cards report these as GPU hangs.

What is in it

  • crates/xcl/src/gpu/tdr.rs (new):
    • settings() reads TdrDelay / TdrLevel from HKLM\System\CurrentControlSet\Control\GraphicsDrivers. Read only, no elevation.
    • describe() turns them into the log line: TdrDelay as the GPU's preemption timeout, and what TdrLevel does then (0 off, 1 a bug check with no recovery, 3 or unset a reset; 2 is not implemented by Windows). The line says the values are the registry's, which Windows reads at boot, so a change not yet applied is not taken for the one in effect.
    • recent_resets() counts Display 4101 events of the last 30 s with EvtQuery. A read that fails with anything but ERROR_NO_MORE_ITEMS gives "unknown", not a count.
    • removal_note() does this for DEVICE_HUNG / DEVICE_RESET only, waiting up to 3 s for the event because Windows can write it just after the title sees the removal. A recent event is reported as consistent with the timeout, not as proof: the event names no device.
    • Unit tests for each.
  • crates/xcl/src/hle/d3d12x/mod.rs: the timeout line after backend 'real'.
  • crates/xcl/src/hle/d3d12x/real.rs: log_device_removed adds the note after D3D12 device removed. A second caller now waits for the first one's report, for at most 5 s (ReportOnce). Without that, stop_if_device_removed on another thread ended the process before the note was written; in one run that was 70 ms after the removal. The wait is bounded and not a lock: the reporting thread can come back itself through the unhandled-exception filter.
  • crates/xcl/Cargo.toml: the Win32_System_EventLog feature of windows-sys, for EvtQuery. No new dependency.

Tested

  • RTX 3070 Laptop 8 GB, driver 621.24, i7-11800H, 32 GB RAM, Windows 10 19045, Rust 1.100.0, debug for the suite.

  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4 on c20818a: 1445 passed, 1 failed, 47 ignored; 25 SKIPPED lines: "no wave64" on this adapter, per-lane forms the driver refuses, and one "no heap windows". The failure is hle::d3d12x::list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list, which fails intermittently on main too; alone it passed 3 of 3 runs. This change does not touch list_x.rs. On 4c8f841, one test change before, the same suite had 1446 passed, 0 failed.

  • The 9 tests in gpu::tdr::tests pass, among them a reader that fails on its first call (ERROR_TIMEOUT), one that fails after a partial batch, an injected recent event, and a malformed query, which Windows refuses with ERROR_EVT_INVALID_QUERY. The two tests that read the real System log print SKIPPED where a valid query cannot read it (Wine's wevtapi gives error 0), and otherwise fail only on a query Windows refuses. The 2 tests in real::report_once_tests pass: a second caller waits for the report, and the reporting thread coming back (through the unhandled-exception filter) does not hang. The query of recent_resets, run over the last 24 h with Get-WinEvent -FilterXPath, found the 24 events 4101 of this machine that day.

  • In the PR's smoke run the log has, after the adapter line:

    D3D12.X: Windows resets the GPU when it does not preempt within 10 s (TdrDelay 10), per the registry (read by Windows at boot)
    

    (TdrDelay is 10 on this machine for an earlier test; it is 2 s when not set.)

  • Real removals, each in a 600 s run of a retail title. The tree was this PR on a test tree: main + #2404 and others, with a 1 GiB shader heap profile.

    • With the code of 4c8f841 (its tdr.rs and ReportOnce copied in as they are; the head c20818a changes only a test since). The thread number is in brackets:
      [  7.8 s]         D3D12.X: Windows resets the GPU when it does not preempt within 10 s (TdrDelay 10), per the registry (read by Windows at boot)
      [530.0 s] (41108) D3D12 device removed: 0x887a0006 The GPU will not respond to more commands, …
      [531.2 s] (41108) D3D12 device removed: 1 Display 4101 event(s) in the System log in the last 30 s, consistent with Windows' GPU timeout (the event does not name the device) – …
      [531.2 s] (18116) the D3D12 device was removed (0x887a0006: …) – the title is stopped
      
      • The System log has the 4101 event at that time, after three nvlddmkm 153 events in the 15 s before.
      • The note found the event 1.2 s after the removal, inside the 3 s wait.
      • stop_if_device_removed on another thread ended the process 6 ms after the note.
    • Earlier versions:
      • A 4101 case on the first version, at 259.0 s: the note found the event 1.6 s later.
      • A case without the event, with the lock version of the wait: 0x887a0007 at 233.3 s. The note no Display 4101 event in the System log in the last 30 s: … came at 236.6 s, and the process ended after it. The System log has no 4101 in that window.
      • One run before the wait existed: the process ended 70 ms after the removal, and the note was lost.

Test reports from others (on earlier heads: c9e51e5 is before both review fixes and the report lock, e1ac7f0 before the TdrLevel wording, 4c8f841 before the Wine skip)

  • AMD Radeon RX 9060 XT (RDNA4), Windows 11, on e1ac7f0 (emirduran707): the 8 gpu::tdr tests pass. The suite had 1441 passed and 2 failed, both dxil::fuzz_tests that fail on main there too. Smoke: 1601 frames, 0 removals (main: 1603).
  • RTX 4060 Laptop, Linux with Wine 11 and a locally built vkd3d-proton, on 4c8f841 (pickles976): 8 of 9 gpu::tdr tests and both report_once tests pass. Wine's wevtapi reads no System log (error 0), and a_query_windows_refuses_is_told_apart failed on that. It now skips there like the other System-log test (c20818a). Under Wine the note after a removal should read the System log could not be read … (not run there).
  • RTX 4080 SUPER, Windows 11, on c9e51e5 (sage-sage): 1440 passed, 0 failed, and the gpu::tdr tests of that head pass, including the System log read.

Regression run
main:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3070 Laptop GPU
title: 2c508222
seconds: 60
exit: 0x0
frames shown: 996 (PresentX 996)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15519 MB

this PR:

xcl-smoke v1
commit: c20818ac7c6f653561959767ea20b918cf5594b3
gpu: NVIDIA GeForce RTX 3070 Laptop GPU
title: 2c508222
seconds: 60
exit: 0x0
frames shown: 1353 (PresentX 1353)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14855 MB

Both with the same settings, one after the other (main first, right after its build); xcl.exe has a 1 GiB shader heap profile (#2590) on this machine for both.

Not tested

  • TdrDdiDelay, the time a thread may stay inside the driver (5 s by default), is another way to a TDR. The start line does not name it; the removals measured here were the GPU not preempting.
  • A machine where the System log cannot be read.
  • Intel. AMD and Windows 11 only through the reports above, which had no real removal.

AI use

  • Claude Code (Claude Opus 5.5) wrote the module, the tests and this description. It also ran the suite and the smoke runs.

🤖 Generated with Claude Code

**@⁠Raul-Paiva** on GitHub · 2026-11-26 09:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/2748) `Raul-Paiva:d3d12x-tdr-diagnostic` → `main` · +320 −4 · 5 files · 1 commits · open A `0x887a0006` (`DEVICE_HUNG`) or `0x887a0007` (`DEVICE_RESET`) removal can be Windows' GPU timeout (TDR): WDDM resets the GPU when it does not preempt within `TdrDelay` seconds of the scheduler asking (2 s by default, at the default `TdrLevel`). The removal code alone does not tell that apart from a hang the driver detected itself. The log now says whether Windows logged one. At start it names the timeout in effect. After such a removal it looks in the System log for the `Display` event 4101 Windows writes when it was its timeout. Logging only. Part of #505. On an 8 GB laptop card, every `0x887a0006` at a retail title's world start had a 4101 event at the same time (14 of 14 runs). Raising `TdrDelay` took them away ([#505 comment](https://git.gtahub.st/github/xcl-dev--xcl/issues/505)). Without the event, testers on slower cards report these as GPU hangs. **What is in it** - `crates/xcl/src/gpu/tdr.rs` (new): - `settings()` reads `TdrDelay` / `TdrLevel` from `HKLM\System\CurrentControlSet\Control\GraphicsDrivers`. Read only, no elevation. - `describe()` turns them into the log line: `TdrDelay` as the GPU's preemption timeout, and what `TdrLevel` does then (0 off, 1 a bug check with no recovery, 3 or unset a reset; 2 is not implemented by Windows). The line says the values are the registry's, which Windows reads at boot, so a change not yet applied is not taken for the one in effect. - `recent_resets()` counts `Display` 4101 events of the last 30 s with `EvtQuery`. A read that fails with anything but `ERROR_NO_MORE_ITEMS` gives "unknown", not a count. - `removal_note()` does this for `DEVICE_HUNG` / `DEVICE_RESET` only, waiting up to 3 s for the event because Windows can write it just after the title sees the removal. A recent event is reported as consistent with the timeout, not as proof: the event names no device. - Unit tests for each. - `crates/xcl/src/hle/d3d12x/mod.rs`: the timeout line after `backend 'real'`. - `crates/xcl/src/hle/d3d12x/real.rs`: `log_device_removed` adds the note after `D3D12 device removed`. A second caller now waits for the first one's report, for at most 5 s (`ReportOnce`). Without that, `stop_if_device_removed` on another thread ended the process before the note was written; in one run that was 70 ms after the removal. The wait is bounded and not a lock: the reporting thread can come back itself through the unhandled-exception filter. - `crates/xcl/Cargo.toml`: the `Win32_System_EventLog` feature of `windows-sys`, for `EvtQuery`. No new dependency. **Tested** - RTX 3070 Laptop 8 GB, driver 621.24, i7-11800H, 32 GB RAM, Windows 10 19045, Rust 1.100.0, debug for the suite. - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4` on `c20818a`: 1445 passed, 1 failed, 47 ignored; 25 `SKIPPED` lines: "no wave64" on this adapter, per-lane forms the driver refuses, and one "no heap windows". The failure is `hle::d3d12x::list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list`, which fails intermittently on `main` too; alone it passed 3 of 3 runs. This change does not touch `list_x.rs`. On `4c8f841`, one test change before, the same suite had 1446 passed, 0 failed. - The 9 tests in `gpu::tdr::tests` pass, among them a reader that fails on its first call (`ERROR_TIMEOUT`), one that fails after a partial batch, an injected recent event, and a malformed query, which Windows refuses with `ERROR_EVT_INVALID_QUERY`. The two tests that read the real System log print `SKIPPED` where a valid query cannot read it (Wine's `wevtapi` gives error 0), and otherwise fail only on a query Windows refuses. The 2 tests in `real::report_once_tests` pass: a second caller waits for the report, and the reporting thread coming back (through the unhandled-exception filter) does not hang. The query of `recent_resets`, run over the last 24 h with `Get-WinEvent -FilterXPath`, found the 24 events 4101 of this machine that day. - In the PR's smoke run the log has, after the adapter line: ``` D3D12.X: Windows resets the GPU when it does not preempt within 10 s (TdrDelay 10), per the registry (read by Windows at boot) ``` (`TdrDelay` is 10 on this machine for an earlier test; it is 2 s when not set.) - **Real removals**, each in a 600 s run of a retail title. The tree was this PR on a test tree: `main` + #2404 and others, with a 1 GiB shader heap profile. - **With the code of `4c8f841`** (its `tdr.rs` and `ReportOnce` copied in as they are; the head `c20818a` changes only a test since). The thread number is in brackets: ``` [ 7.8 s] D3D12.X: Windows resets the GPU when it does not preempt within 10 s (TdrDelay 10), per the registry (read by Windows at boot) [530.0 s] (41108) D3D12 device removed: 0x887a0006 The GPU will not respond to more commands, … [531.2 s] (41108) D3D12 device removed: 1 Display 4101 event(s) in the System log in the last 30 s, consistent with Windows' GPU timeout (the event does not name the device) – … [531.2 s] (18116) the D3D12 device was removed (0x887a0006: …) – the title is stopped ``` - The System log has the 4101 event at that time, after three `nvlddmkm` 153 events in the 15 s before. - The note found the event 1.2 s after the removal, inside the 3 s wait. - `stop_if_device_removed` on another thread ended the process 6 ms after the note. - **Earlier versions:** - A 4101 case on the first version, at 259.0 s: the note found the event 1.6 s later. - A case without the event, with the lock version of the wait: `0x887a0007` at 233.3 s. The note `no Display 4101 event in the System log in the last 30 s: …` came at 236.6 s, and the process ended after it. The System log has no 4101 in that window. - One run before the wait existed: the process ended 70 ms after the removal, and the note was lost. **Test reports from others** (on earlier heads: `c9e51e5` is before both review fixes and the report lock, `e1ac7f0` before the `TdrLevel` wording, `4c8f841` before the Wine skip) - AMD Radeon RX 9060 XT (RDNA4), Windows 11, on `e1ac7f0` ([emirduran707](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2748)): the 8 `gpu::tdr` tests pass. The suite had 1441 passed and 2 failed, both `dxil::fuzz_tests` that fail on `main` there too. Smoke: 1601 frames, 0 removals (`main`: 1603). - RTX 4060 Laptop, Linux with Wine 11 and a locally built vkd3d-proton, on `4c8f841` ([pickles976](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2748)): 8 of 9 `gpu::tdr` tests and both `report_once` tests pass. Wine's `wevtapi` reads no System log (error 0), and `a_query_windows_refuses_is_told_apart` failed on that. It now skips there like the other System-log test (`c20818a`). Under Wine the note after a removal should read `the System log could not be read …` (not run there). - RTX 4080 SUPER, Windows 11, on `c9e51e5` ([sage-sage](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2748)): 1440 passed, 0 failed, and the `gpu::tdr` tests of that head pass, including the System log read. **Regression run** main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3070 Laptop GPU title: 2c508222 seconds: 60 exit: 0x0 frames shown: 996 (PresentX 996) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15519 MB ``` this PR: ``` xcl-smoke v1 commit: c20818ac7c6f653561959767ea20b918cf5594b3 gpu: NVIDIA GeForce RTX 3070 Laptop GPU title: 2c508222 seconds: 60 exit: 0x0 frames shown: 1353 (PresentX 1353) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14855 MB ``` Both with the same settings, one after the other (main first, right after its build); `xcl.exe` has a 1 GiB shader heap profile (#2590) on this machine for both. **Not tested** - `TdrDdiDelay`, the time a thread may stay inside the driver (5 s by default), is another way to a TDR. The start line does not name it; the removals measured here were the GPU not preempting. - A machine where the System log cannot be read. - Intel. AMD and Windows 11 only through the reports above, which had no real removal. **AI use** - Claude Code (Claude Opus 5.5) wrote the module, the tests and this description. It also ran the suite and the smoke runs. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A DEVICE_HUNG or DEVICE_RESET removal can be Windows' GPU timeout (TDR):
WDDM resets the GPU when it does not preempt within TdrDelay
seconds of the scheduler asking, 2 by default. The removal code does not tell that apart from a
hang the driver found itself. Windows writes a Display event 4101 to the
System log when it was its timeout.

The log now names the timeout in effect at start (TdrDelay / TdrLevel,
read from the registry without elevation). After a hung or reset device
it looks for a 4101 event of the last 30 s, waiting up to 3 s for
Windows to write it. A recent event is reported as consistent with the
timeout, not as proof: the event names no device. A System log read that
fails (anything but ERROR_NO_MORE_ITEMS) is reported as unknown, not as
no event.

On an RTX 3070 Laptop every 0x887a0006 at a retail title's world start
had a 4101 event at the same time (14 of 14 runs), and raising TdrDelay
took them away. A later 0x887a0007 on the same machine had none.

Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:14:38 +00:00
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 10:02 UTC · original · reviewed

On c9e51e5, recent_resets treats every EvtNext == FALSE as the normal end of the System-log query and returns Some(n). Microsoft's EvtNext contract says only GetLastError() == ERROR_NO_MORE_ITEMS means enumeration finished; a one-second timeout sets ERROR_TIMEOUT, and other read errors can occur. If the first EvtNext fails that way, this code returns Some(0), and removal_note eventually reports no Display 4101 event / probably not a Windows timeout even though the evidence could not be read. A failure after a partial batch can likewise present an incomplete count as a complete query.

Could the read return an unknown/error outcome for any false result other than ERROR_NO_MORE_ITEMS, preserving the distinction from a genuinely empty query? Please close the query handle on both paths and cover a first-call timeout plus finite empty enumeration with an injected/mock event reader. This is exact-head source review based on the Win32 API contract; I did not force an Event Log timeout at runtime.

**@⁠luckyteagirl** on GitHub · 2026-11-26 10:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/2748#pullrequestreview-6072037750) · **reviewed** On `c9e51e5`, `recent_resets` treats every `EvtNext == FALSE` as the normal end of the System-log query and returns `Some(n)`. [Microsoft's `EvtNext` contract](https://learn.microsoft.com/en-us/windows/win32/api/winevt/nf-winevt-evtnext) says only `GetLastError() == ERROR_NO_MORE_ITEMS` means enumeration finished; a one-second timeout sets `ERROR_TIMEOUT`, and other read errors can occur. If the first `EvtNext` fails that way, this code returns `Some(0)`, and `removal_note` eventually reports no Display 4101 event / probably not a Windows timeout even though the evidence could not be read. A failure after a partial batch can likewise present an incomplete count as a complete query. Could the read return an unknown/error outcome for any false result other than `ERROR_NO_MORE_ITEMS`, preserving the distinction from a genuinely empty query? Please close the query handle on both paths and cover a first-call timeout plus finite empty enumeration with an injected/mock event reader. This is exact-head source review based on the Win32 API contract; I did not force an Event Log timeout at runtime.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 10:02 UTC · original · reviewed

On c9e51e5, removal_note reports “it was Windows' GPU timeout” whenever it finds any system-wide Display 4101 in the prior 30 seconds. The query does not identify this device or bind the event to this removal. On a multi-adapter machine, another display adapter can reset in that interval; even on one adapter, an earlier recovered timeout can coexist with a later unrelated removal. The evidence is useful, but it does not establish that this specific device removal was caused by that event.

Could the log call this a recent Display 4101 event consistent with a Windows timeout, unless the event can be correlated to this device and removal time more tightly? A test can inject a recent event and assert the note stays probabilistic. This is exact-head source review; I did not reproduce a multi-adapter reset.

**@⁠luckyteagirl** on GitHub · 2026-11-26 10:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/2748#pullrequestreview-6072039349) · **reviewed** On `c9e51e5`, `removal_note` reports “it was Windows' GPU timeout” whenever it finds *any* system-wide Display 4101 in the prior 30 seconds. The query does not identify this device or bind the event to this removal. On a multi-adapter machine, another display adapter can reset in that interval; even on one adapter, an earlier recovered timeout can coexist with a later unrelated removal. The evidence is useful, but it does not establish that this specific device removal was caused by that event. Could the log call this a recent Display 4101 event consistent with a Windows timeout, unless the event can be correlated to this device and removal time more tightly? A test can inject a recent event and assert the note stays probabilistic. This is exact-head source review; I did not reproduce a multi-adapter reset.
Author
Owner

@⁠Raul-Paiva on GitHub · 2026-11-26 10:24 UTC · original

Thanks @⁠luckyteagirl, both points were right. Fixed in abdb439 (squashed into the one commit):

  1. EvtNext failures. The loop now goes through count_events, which ends with a count only on ERROR_NO_MORE_ITEMS. Any other GetLastError, on the first read or after a partial batch, gives None, and the note then says the System log could not be read, not "no event". The query handle is closed on both paths (EvtClose(h) after count_events, whatever it returns). only_the_end_of_the_query_gives_a_count drives it with an injected reader: an empty end, two batches then the end, a first-call ERROR_TIMEOUT, and a timeout after a batch.
  2. What a 4101 event proves. The note no longer says "it was". It now reads N Display 4101 event(s) in the System log in the last 30 s, consistent with Windows' GPU timeout (the event does not name the device). a_recent_event_is_evidence_not_proof injects a recent event and checks that wording. an_event_written_after_the_removal_is_still_found covers the 3 s wait.

The description has the new test counts and a smoke run on abdb439. The one suite failure in that run is vram::tests::d32s8_targets_take_their_own_size_of_video_memory (E_FAIL under parallel load; it passes alone and this change does not touch vram.rs).

AI use: Claude Code (Claude Opus 5.5) made the changes and wrote this reply.

**@⁠Raul-Paiva** on GitHub · 2026-11-26 10:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/2748#issuecomment-7189327828) Thanks @⁠luckyteagirl, both points were right. Fixed in `abdb439` (squashed into the one commit): 1. **`EvtNext` failures.** The loop now goes through `count_events`, which ends with a count only on `ERROR_NO_MORE_ITEMS`. Any other `GetLastError`, on the first read or after a partial batch, gives `None`, and the note then says the System log could not be read, not "no event". The query handle is closed on both paths (`EvtClose(h)` after `count_events`, whatever it returns). `only_the_end_of_the_query_gives_a_count` drives it with an injected reader: an empty end, two batches then the end, a first-call `ERROR_TIMEOUT`, and a timeout after a batch. 2. **What a 4101 event proves.** The note no longer says "it was". It now reads `N Display 4101 event(s) in the System log in the last 30 s, consistent with Windows' GPU timeout (the event does not name the device)`. `a_recent_event_is_evidence_not_proof` injects a recent event and checks that wording. `an_event_written_after_the_removal_is_still_found` covers the 3 s wait. The description has the new test counts and a smoke run on `abdb439`. The one suite failure in that run is `vram::tests::d32s8_targets_take_their_own_size_of_video_memory` (`E_FAIL` under parallel load; it passes alone and this change does not touch `vram.rs`). AI use: Claude Code (Claude Opus 5.5) made the changes and wrote this reply.
Author
Owner

@⁠sage-sage on GitHub · 2026-11-26 10:30 UTC · original

Test report: passes on NVIDIA. Exact head c9e51e5c (its base is current main b49be18, so head = merged).

Tested

  • RTX 4080 SUPER (driver 621.40), Ryzen 5 7600X, Windows 11 26H2 build 26300.10075, rustc 1.100.0 MSVC, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug build
  • cargo test --workspace -- --test-threads=4: 1440 passed, 0 failed, 47 ignored; the four gpu::tdr::tests pass, including the_system_log_and_the_settings_can_be_read on this Windows build
  • SKIPPED: 29 lines, the same as on main on this machine (wave64, debug layer, Developer Mode, heap windows)

Not tested

  • No real device removal or TDR here, so not removal_note() on a hung device; AMD, Intel.

Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

**@⁠sage-sage** on GitHub · 2026-11-26 10:30 UTC · [original](https://github.com/xcl-dev/xcl/pull/2748#issuecomment-7189462806) **Test report: passes on NVIDIA.** Exact head `c9e51e5c` (its base is current `main` `b49be18`, so head = merged). **Tested** - RTX 4080 SUPER (driver 621.40), Ryzen 5 7600X, Windows 11 26H2 build 26300.10075, rustc 1.100.0 MSVC, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug build - `cargo test --workspace -- --test-threads=4`: 1440 passed, 0 failed, 47 ignored; the four `gpu::tdr::tests` pass, including `the_system_log_and_the_settings_can_be_read` on this Windows build - SKIPPED: 29 lines, the same as on `main` on this machine (wave64, debug layer, Developer Mode, heap windows) **Not tested** - No real device removal or TDR here, so not `removal_note()` on a hung device; AMD, Intel. Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
Author
Owner

@⁠Raul-Paiva on GitHub · 2026-11-26 10:44 UTC · original

One more fix, squashed in e1ac7f0. It comes from a real removal, not the review.

On another run with this PR, the device was removed and the note never reached the log. Two threads saw the removal at the same time:

  • the first logged D3D12 device removed and waited for the 4101 event;
  • stop_if_device_removed on a second thread found the report already started (DONE was set) and ended the process 70 ms later.

log_device_removed now holds a lock for the whole report, so a second caller waits for it and then returns.

With the lock, on the next real removal (0x887a0007 at 233.3 s, no 4101 event in the System log), the note came at 236.6 s and the process ended after it.

On e1ac7f0:

  • suite: 1443 passed, 0 failed, 47 ignored;
  • smoke: 1346 frames, 0 removals.

The description is updated.

@⁠sage-sage, thanks for the test on c9e51e5. The change since is in tdr.rs, plus the lock in real.rs.

AI use: Claude Code (Claude Opus 5.5) found the race in the run log, made the fix and wrote this.

**@⁠Raul-Paiva** on GitHub · 2026-11-26 10:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/2748#issuecomment-7189779656) One more fix, squashed in `e1ac7f0`. It comes from a real removal, not the review. On another run with this PR, the device was removed and the note never reached the log. Two threads saw the removal at the same time: - the first logged `D3D12 device removed` and waited for the 4101 event; - `stop_if_device_removed` on a second thread found the report already started (`DONE` was set) and ended the process 70 ms later. `log_device_removed` now holds a lock for the whole report, so a second caller waits for it and then returns. With the lock, on the next real removal (`0x887a0007` at 233.3 s, no 4101 event in the System log), the note came at 236.6 s and the process ended after it. On `e1ac7f0`: - suite: 1443 passed, 0 failed, 47 ignored; - smoke: 1346 frames, 0 removals. The description is updated. @⁠sage-sage, thanks for the test on `c9e51e5`. The change since is in `tdr.rs`, plus the lock in `real.rs`. AI use: Claude Code (Claude Opus 5.5) found the race in the run log, made the fix and wrote this.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 10:49 UTC · original · reviewed

On current head e1ac7f0213876e499786a4307deea67ca16b5c52, describe(Settings { level: Some(1), delay: Some(10) }) says Windows resets the GPU after a submission runs over 10 seconds. Microsoft's TDR registry documentation defines TdrLevel=1 as a system bug check on detected timeout, with no recovery; TdrDelay is the scheduler's preemption-wait threshold. This note would therefore give the wrong outcome for a configured level 1, and it also treats the unimplemented level 2 as recovery. Could describe distinguish these levels and phrase the delay as a preemption timeout? A table-driven test for levels 0, 1, and 3 would capture the important distinction. This is a source and API-contract check; I did not trigger a TDR.

AI use: OpenAI Codex (GPT-6.2 Sol) found and checked the configuration path; OpenAI Codex (GPT-6.2 Astra) verified the source and Microsoft documentation and wrote this review.

**@⁠luckyteagirl** on GitHub · 2026-11-26 10:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/2748#pullrequestreview-6072781277) · **reviewed** On current head `e1ac7f0213876e499786a4307deea67ca16b5c52`, `describe(Settings { level: Some(1), delay: Some(10) })` says Windows resets the GPU after a submission runs over 10 seconds. [Microsoft's TDR registry documentation](https://learn.microsoft.com/en-us/windows-hardware/drivers/display/tdr-registry-keys) defines `TdrLevel=1` as a **system bug check on detected timeout, with no recovery**; `TdrDelay` is the scheduler's preemption-wait threshold. This note would therefore give the wrong outcome for a configured level 1, and it also treats the unimplemented level 2 as recovery. Could `describe` distinguish these levels and phrase the delay as a preemption timeout? A table-driven test for levels 0, 1, and 3 would capture the important distinction. This is a source and API-contract check; I did not trigger a TDR. AI use: OpenAI Codex (GPT-6.2 Sol) found and checked the configuration path; OpenAI Codex (GPT-6.2 Astra) verified the source and Microsoft documentation and wrote this review.
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-26 10:58 UTC · original

Independent AMD RDNA4 (native wave64) verification of exact PR head e1ac7f0213876e499786a4307deea67ca16b5c52 on Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver 32.0.31044.16, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC 1.9.2602.17).

Tested

  • cargo build --workspace (debug): passed (0 errors).
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1441 passed, 2 failed, 47 ignored (8 SKIPPED: 6 per-lane DXIL forms refused by host adapter/driver, 1 heap_window_out_of_memory_falls_back_to_the_switch_form no heap windows, 1 pso_measurement_compiles_an_exact_synthetic_record Windows Developer Mode off).
    • All 8 new gpu::tdr::tests::* tests passed on this Windows 11 machine (a_recent_event_is_evidence_not_proof, an_event_written_after_the_removal_is_still_found, only_hung_and_reset_devices_are_timeouts, only_the_end_of_the_query_gives_a_count, other_removals_get_no_note, the_query_asks_for_display_4101_in_a_window, the_settings_are_described_as_windows_applies_them, the_system_log_and_the_settings_can_be_read).
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 and fuzz_validate_and_gpu_3) are pre-existing on unmodified main on this RX 9060 XT / driver 32.0.31044.16.
  • cargo build --release -p xcl + 60 s retail-title smoke test (scripts/smoke.ps1, offline):
xcl-smoke v1
commit: e1ac7f0213876e499786a4307deea67ca16b5c52
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1601 (PresentX 1601)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 18751 MB

(Compare against main b49be183 on this machine: 1603 frames, 18576 MB peak, 0 device removals, 0 crashes.)

Not tested

  • Live TDR event triggering during a real GPU hang; NVIDIA / Intel GPUs, Linux / Wine.

AI use

  • Verification run and report prepared with Antigravity (Gemini 4 Neon); all build, test, and smoke results are from live runs on this machine.
**@⁠emirduran707** on GitHub · 2026-11-26 10:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/2748#issuecomment-7190094179) Independent AMD RDNA4 (native wave64) verification of exact PR head `e1ac7f0213876e499786a4307deea67ca16b5c52` on Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver `32.0.31044.16`, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC `1.9.2602.17`). **Tested** - `cargo build --workspace` (debug): passed (`0` errors). - `cargo test --workspace --no-fail-fast -- --test-threads=4`: `1441 passed, 2 failed, 47 ignored` (`8 SKIPPED`: 6 per-lane DXIL forms refused by host adapter/driver, 1 `heap_window_out_of_memory_falls_back_to_the_switch_form` no heap windows, 1 `pso_measurement_compiles_an_exact_synthetic_record` Windows Developer Mode off). - All 8 new `gpu::tdr::tests::*` tests passed on this Windows 11 machine (`a_recent_event_is_evidence_not_proof`, `an_event_written_after_the_removal_is_still_found`, `only_hung_and_reset_devices_are_timeouts`, `only_the_end_of_the_query_gives_a_count`, `other_removals_get_no_note`, `the_query_asks_for_display_4101_in_a_window`, `the_settings_are_described_as_windows_applies_them`, `the_system_log_and_the_settings_can_be_read`). - The 2 failures (`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` and `fuzz_validate_and_gpu_3`) are pre-existing on unmodified `main` on this RX 9060 XT / driver `32.0.31044.16`. - `cargo build --release -p xcl` + 60 s retail-title smoke test (`scripts/smoke.ps1`, offline): ``` xcl-smoke v1 commit: e1ac7f0213876e499786a4307deea67ca16b5c52 gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1601 (PresentX 1601) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 18751 MB ``` (Compare against `main` `b49be183` on this machine: `1603 frames, 18576 MB peak, 0 device removals, 0 crashes`.) **Not tested** - Live TDR event triggering during a real GPU hang; NVIDIA / Intel GPUs, Linux / Wine. **AI use** - Verification run and report prepared with Antigravity (Gemini 4 Neon); all build, test, and smoke results are from live runs on this machine.
Author
Owner

@⁠Raul-Paiva on GitHub · 2026-11-26 10:58 UTC · original

Thanks @⁠luckyteagirl, right again. Fixed in 1949ac1 (squashed; e0ddf63 has the same tree with the old commit message).

describe now follows the TDR registry keys. TdrDelay is phrased as the preemption timeout, and the level decides what follows:

  • TdrLevel 0: detection off.
  • TdrLevel 1: Windows bug-checks, with no recovery, when the GPU does not preempt within N s ….
  • TdrLevel 3 or unset: Windows resets the GPU when it does not preempt within N s ….
  • Any other value, 2 included: named as a level Windows does not implement, so it is never described as a recovery.

the_settings_are_described_as_windows_applies_them is now a table over unset, 0, 1, 2 and 3. The module comment and the commit message had the same "submission runs over N s" wording; both are fixed.

On e0ddf63, the suite had 1442 passed and 1 failed. The failure was list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list, an intermittent one that also fails on main; it passed 3 of 3 runs alone. The smoke run on 1949ac1 is in the description.

AI use: Claude Code (Claude Opus 5.5) made the change and wrote this reply.

**@⁠Raul-Paiva** on GitHub · 2026-11-26 10:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/2748#issuecomment-7190095624) Thanks @⁠luckyteagirl, right again. Fixed in `1949ac1` (squashed; `e0ddf63` has the same tree with the old commit message). `describe` now follows [the TDR registry keys](https://learn.microsoft.com/en-us/windows-hardware/drivers/display/tdr-registry-keys). `TdrDelay` is phrased as the preemption timeout, and the level decides what follows: - `TdrLevel` 0: detection off. - `TdrLevel` 1: `Windows bug-checks, with no recovery, when the GPU does not preempt within N s …`. - `TdrLevel` 3 or unset: `Windows resets the GPU when it does not preempt within N s …`. - Any other value, 2 included: named as a level Windows does not implement, so it is never described as a recovery. `the_settings_are_described_as_windows_applies_them` is now a table over unset, 0, 1, 2 and 3. The module comment and the commit message had the same "submission runs over N s" wording; both are fixed. On `e0ddf63`, the suite had 1442 passed and 1 failed. The failure was `list_x::tests::a_reset_while_the_last_submit_runs_records_on_another_pc_list`, an intermittent one that also fails on `main`; it passed 3 of 3 runs alone. The smoke run on `1949ac1` is in the description. AI use: Claude Code (Claude Opus 5.5) made the change and wrote this reply.
Author
Owner

@⁠Aniseto on GitHub · 2026-11-26 11:09 UTC · original

Ran the TDR diagnostics tests at 1949ac11:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

XCL_ADAPTER=nvidia cargo test -p xcl --lib gpu::tdr::tests -- --test-threads=1 --nocapture
8 passed; 0 failed; 0 ignored; 1336 filtered out      (exit 0)

All eight tests pass here, including the one that reads this machine's real System log and registry TdrDelay/TdrLevel settings.

What this adds: the existing NVIDIA report is on an RTX 4080 SUPER (and an AMD one on RX 9060 XT), both on earlier heads. This is a Blackwell wave32 host at the current head, with a different driver and settings. I did not produce a real device removal here, so I am not adding evidence about the 4101 event in a live run.

Not tested: a real 0x887a0006/0x887a0007 removal on this host, the full workspace suite, a paired 60 s smoke run, AMD and Intel GPUs, Wine, release profile, title data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

**@⁠Aniseto** on GitHub · 2026-11-26 11:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/2748#issuecomment-7190349539) Ran the TDR diagnostics tests at `1949ac11`: Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` XCL_ADAPTER=nvidia cargo test -p xcl --lib gpu::tdr::tests -- --test-threads=1 --nocapture 8 passed; 0 failed; 0 ignored; 1336 filtered out (exit 0) ``` All eight tests pass here, including the one that reads this machine's real System log and registry `TdrDelay`/`TdrLevel` settings. What this adds: the existing NVIDIA report is on an RTX 4080 SUPER (and an AMD one on RX 9060 XT), both on earlier heads. This is a Blackwell wave32 host at the current head, with a different driver and settings. I did not produce a real device removal here, so I am not adding evidence about the 4101 event in a live run. Not tested: a real `0x887a0006`/`0x887a0007` removal on this host, the full workspace suite, a paired 60 s smoke run, AMD and Intel GPUs, Wine, release profile, title data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
github-bot force-pushed github-bot/gh-2748 from 1949ac11a6 to 4c8f841178 2026-11-26 11:35:12 +00:00 Compare
Author
Owner

@⁠pickles976 on GitHub · 2026-11-26 11:27 UTC · original

Wine/NVIDIA verification of exact head 4c8f8411783ff092df10aaaec45f6a21573f9f89 (Linux 6.17, Wine 11.0, RTX 4060 Laptop 8 GB, NVIDIA 590.48.1, DXVK 3.1.1, Rust 1.98.1 x86_64-pc-windows-msvc). Caveat: locally built diagnostic-relaxed vkd3d-proton 3.2.0 2576c0b4adfae4a+ — not stock-runtime certification. Unchanged owner code; fresh 28.37 s compile; one test thread; 9 GiB/512 MiB cgroup scope. Log verify-pr2748-tdr.log kept locally.

gpu::tdr::tests 8/9. Passing: only_hung_and_reset_devices_are_timeouts, the_settings_are_described_as_windows_applies_them, the_query_asks_for_display_4101_in_a_window, only_the_end_of_the_query_gives_a_count, a_recent_event_is_evidence_not_proof, an_event_written_after_the_removal_is_still_found, other_removals_get_no_note, and the_system_log_and_the_settings_can_be_read — the last via its designed skip path: under Wine the System log is not readable (error 0), which is exactly the case the test's guard is written for.

One failure, and it is a Wine wevtapi fidelity gap, not a logic defect: a_query_windows_refuses_is_told_apart panics with a malformed query gave Err(0) — EvtExecuteQuery("*[System[EventID=") returns Err(0) under Wine rather than ERROR_EVT_INVALID_QUERY. On Windows this test would classify the refusal; Wine's wevtapi does not distinguish a malformed query from other failures here. I did not modify the test. This means the TDR-verification value of the PR on Wine stacks is limited to the non-query logic (settings description, hang-code classification, removal-note construction), while the actual System-log query needs Windows to prove out.

real::report_once_tests 2/2: a_second_caller_waits_for_the_first_report and the_reporting_thread_coming_back_does_not_hang both pass (0.21 s each), including the reporting-thread reuse path.

No device removal was triggered here and no title was run; this is the module's unit surface only.

AI use: omp, harness model openai-codex/gpt-6-astra, ran the checks and drafted this report. No upstream code changes or assets attached.

**@⁠pickles976** on GitHub · 2026-11-26 11:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/2748#issuecomment-7190755996) Wine/NVIDIA verification of exact head `4c8f8411783ff092df10aaaec45f6a21573f9f89` (Linux 6.17, Wine 11.0, RTX 4060 Laptop 8 GB, NVIDIA 590.48.1, DXVK 3.1.1, Rust 1.98.1 x86_64-pc-windows-msvc). **Caveat: locally built diagnostic-relaxed vkd3d-proton 3.2.0 `2576c0b4adfae4a+` — not stock-runtime certification.** Unchanged owner code; fresh 28.37 s compile; one test thread; 9 GiB/512 MiB cgroup scope. Log `verify-pr2748-tdr.log` kept locally. **`gpu::tdr::tests` 8/9.** Passing: `only_hung_and_reset_devices_are_timeouts`, `the_settings_are_described_as_windows_applies_them`, `the_query_asks_for_display_4101_in_a_window`, `only_the_end_of_the_query_gives_a_count`, `a_recent_event_is_evidence_not_proof`, `an_event_written_after_the_removal_is_still_found`, `other_removals_get_no_note`, and `the_system_log_and_the_settings_can_be_read` — the last via its designed skip path: under Wine the System log is not readable (`error 0`), which is exactly the case the test's guard is written for. **One failure, and it is a Wine `wevtapi` fidelity gap, not a logic defect:** `a_query_windows_refuses_is_told_apart` panics with `a malformed query gave Err(0)` — `EvtExecuteQuery("*[System[EventID=")` returns `Err(0)` under Wine rather than `ERROR_EVT_INVALID_QUERY`. On Windows this test would classify the refusal; Wine's wevtapi does not distinguish a malformed query from other failures here. I did not modify the test. This means the TDR-verification value of the PR on Wine stacks is limited to the non-query logic (settings description, hang-code classification, removal-note construction), while the actual System-log query needs Windows to prove out. **`real::report_once_tests` 2/2:** `a_second_caller_waits_for_the_first_report` and `the_reporting_thread_coming_back_does_not_hang` both pass (0.21 s each), including the reporting-thread reuse path. No device removal was triggered here and no title was run; this is the module's unit surface only. AI use: omp, harness model `openai-codex/gpt-6-astra`, ran the checks and drafted this report. No upstream code changes or assets attached.
github-bot force-pushed github-bot/gh-2748 from 4c8f841178 to c20818ac7c 2026-11-26 11:46:20 +00:00 Compare
Author
Owner

@⁠Raul-Paiva on GitHub · 2026-11-26 11:43 UTC · original

@⁠pickles976, thanks for the Wine run. You were right about the cause, and the test was the problem: a_query_windows_refuses_is_told_apart only skipped on ERROR_ACCESS_DENIED. It now first runs a valid query, and if that cannot read the System log (your error 0), it prints SKIPPED like the_system_log_and_the_settings_can_be_read. It asserts ERROR_EVT_INVALID_QUERY only where the log can be read.

That is in c20818a, the new head; only that test changed since 4c8f841. When you have time, could you run gpu::tdr::tests there again under Wine? I expect 9 passed, with 2 SKIPPED lines. If you also run real::report_once_tests and the rest of the suite, that would help too.

AI use: Claude Code (Claude Opus 5.5) made the change and wrote this.

**@⁠Raul-Paiva** on GitHub · 2026-11-26 11:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/2748#issuecomment-7191081099) @⁠pickles976, thanks for the Wine run. You were right about the cause, and the test was the problem: `a_query_windows_refuses_is_told_apart` only skipped on `ERROR_ACCESS_DENIED`. It now first runs a valid query, and if that cannot read the System log (your `error 0`), it prints `SKIPPED` like `the_system_log_and_the_settings_can_be_read`. It asserts `ERROR_EVT_INVALID_QUERY` only where the log can be read. That is in `c20818a`, the new head; only that test changed since `4c8f841`. When you have time, could you run `gpu::tdr::tests` there again under Wine? I expect 9 passed, with 2 `SKIPPED` lines. If you also run `real::report_once_tests` and the rest of the suite, that would help too. AI use: Claude Code (Claude Opus 5.5) made the change and wrote this.
Author
Owner

@⁠Aniseto on GitHub · 2026-11-26 12:00 UTC · original

Re-ran the TDR diagnostics tests at c20818ac after the head moved again (124 lines changed across gpu/tdr.rs and hle/d3d12x/real.rs, with a new test for a refused event query).

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

XCL_ADAPTER=nvidia cargo test -p xcl --lib gpu::tdr::tests -- --test-threads=1 --nocapture
9 passed; 0 failed; 0 ignored; 1338 filtered out      (exit 0)

All nine pass here, including the new a_query_windows_refuses_is_told_apart and the test that reads this machine's real System log and TDR registry settings. This is a new report following mine at 1949ac11, not an edit.

Not tested: a real 0x887a0006/0x887a0007 removal on this host, the full workspace suite, a paired 60 s smoke run, AMD and Intel GPUs, Wine, release profile, title data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

**@⁠Aniseto** on GitHub · 2026-11-26 12:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/2748#issuecomment-7191445076) Re-ran the TDR diagnostics tests at `c20818ac` after the head moved again (124 lines changed across `gpu/tdr.rs` and `hle/d3d12x/real.rs`, with a new test for a refused event query). Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` XCL_ADAPTER=nvidia cargo test -p xcl --lib gpu::tdr::tests -- --test-threads=1 --nocapture 9 passed; 0 failed; 0 ignored; 1338 filtered out (exit 0) ``` All nine pass here, including the new `a_query_windows_refuses_is_told_apart` and the test that reads this machine's real System log and TDR registry settings. This is a new report following mine at `1949ac11`, not an edit. Not tested: a real `0x887a0006`/`0x887a0007` removal on this host, the full workspace suite, a paired 60 s smoke run, AMD and Intel GPUs, Wine, release profile, title data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Author
Owner

@⁠Decodere on GitHub · 2026-11-26 12:10 UTC · original

Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2748 at c20818ac7c6f653561959767ea20b918cf5594b3 (exact parent origin/main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). Measurements and targeted test results only; not a full source review.

Setup

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200
  • Toolchain / caches: rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)
  • Workload: Retail workload title: 29640639 via scripts/smoke.ps1 -Seconds 60 (XCL_NETWORK=0 XCL_ACTIVITY=1, default flags, no input)

Targeted Win11 / RTX 4060 release unit tests (c20818ac)

  • cargo test --release -p xcl --lib gpu::tdr:: -- --test-threads=4 --nocapture: 9 passed, 0 failed, 0 ignored (0.50 s, 0 skipped, exit 0), including live Windows 11 26200 System Event Log + TDR registry checks (the_system_log_and_the_settings_can_be_read, a_query_windows_refuses_is_told_apart, a_recent_event_is_evidence_not_proof, an_event_written_after_the_removal_is_still_found, the_settings_are_described_as_windows_applies_them, the_query_asks_for_display_4101_in_a_window, only_hung_and_reset_devices_are_timeouts, only_the_end_of_the_query_gives_a_count, and other_removals_get_no_note).
  • cargo test --release -p xcl --lib hle::d3d12x::real:: -- --test-threads=4: 62 passed, 0 failed, 0 ignored (0.74 s, 0 skipped, exit 0).

Observations

  • All 9 gpu::tdr::tests (including live native Windows 11 System Event Log query and TDR registry inspection, with 0 skips) and all 62 hle::d3d12x::real:: tests passed cleanly in --release on exact head c20818ac.
  • Quiet 60 s retail smoke ran cleanly (exit: 0x0, 1558 frames shown, 60 60 60 steady-state presents per 2 s, 0 device removals, 0 crashes, 14008 MB peak commit vs parent b49be183's 14018 MB / 1518 frames).

Paired 60 s RTX 4060 smoke (b49be183 vs c20818ac)

Parent origin/main (b49be183):

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1518 (PresentX 1518)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14018 MB

PR #2748 head (c20818ac):

xcl-smoke v1
commit: c20818ac7c6f653561959767ea20b918cf5594b3
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1558 (PresentX 1559)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14008 MB

Limits of coverage

  • Full workspace test suite was not re-run on c20818ac (only targeted gpu::tdr:: and hle::d3d12x::real:: release tests plus paired quiet 60 s smoke).
  • The quiet 60 s retail smoke exited with 0 device removals, so a real live GPU TDR hang / Display 4101 event emission on removal was not provoked on this host (live Event Log / TDR registry queries and Display 4101 correlation logic are covered by gpu::tdr::tests).
  • Native Windows 11 (26200) / RTX 4060 only; no Wine/Linux run on this host.

AI use

Ran the targeted release unit tests and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts and smoke blocks were taken directly from cargo test and scripts/smoke.ps1 outputs.

**@⁠Decodere** on GitHub · 2026-11-26 12:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/2748#issuecomment-7191666975) **Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2748 at `c20818ac7c6f653561959767ea20b918cf5594b3`** (exact parent `origin/main` `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`). Measurements and targeted test results only; not a full source review. ### Setup - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` - **Toolchain / caches:** `rustc 1.100.0 (0ef1bc386 2026-11-09)`, DXC `1.9.2609.5`, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs) - **Workload:** Retail workload `title: 29640639` via `scripts/smoke.ps1 -Seconds 60` (`XCL_NETWORK=0 XCL_ACTIVITY=1`, default flags, no input) ### Targeted Win11 / RTX 4060 release unit tests (`c20818ac`) - `cargo test --release -p xcl --lib gpu::tdr:: -- --test-threads=4 --nocapture`: **9 passed, 0 failed, 0 ignored** (`0.50 s`, `0` skipped, exit `0`), including live Windows 11 `26200` System Event Log + TDR registry checks (`the_system_log_and_the_settings_can_be_read`, `a_query_windows_refuses_is_told_apart`, `a_recent_event_is_evidence_not_proof`, `an_event_written_after_the_removal_is_still_found`, `the_settings_are_described_as_windows_applies_them`, `the_query_asks_for_display_4101_in_a_window`, `only_hung_and_reset_devices_are_timeouts`, `only_the_end_of_the_query_gives_a_count`, and `other_removals_get_no_note`). - `cargo test --release -p xcl --lib hle::d3d12x::real:: -- --test-threads=4`: **62 passed, 0 failed, 0 ignored** (`0.74 s`, `0` skipped, exit `0`). ### Observations - All 9 `gpu::tdr::tests` (including live native Windows 11 System Event Log query and TDR registry inspection, with `0` skips) and all 62 `hle::d3d12x::real::` tests passed cleanly in `--release` on exact head `c20818ac`. - Quiet 60 s retail smoke ran cleanly (`exit: 0x0`, `1558` frames shown, `60 60 60` steady-state presents per 2 s, `0` device removals, `0` crashes, `14008 MB` peak commit vs parent `b49be183`'s `14018 MB` / `1518` frames). ### Paired 60 s RTX 4060 smoke (`b49be183` vs `c20818ac`) Parent `origin/main` (`b49be183`): ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1518 (PresentX 1518) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14018 MB ``` PR #2748 head (`c20818ac`): ``` xcl-smoke v1 commit: c20818ac7c6f653561959767ea20b918cf5594b3 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1558 (PresentX 1559) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14008 MB ``` ### Limits of coverage - Full workspace test suite was not re-run on `c20818ac` (only targeted `gpu::tdr::` and `hle::d3d12x::real::` release tests plus paired quiet 60 s smoke). - The quiet 60 s retail smoke exited with `0` device removals, so a real live GPU TDR hang / Display 4101 event emission on removal was not provoked on this host (live Event Log / TDR registry queries and Display 4101 correlation logic are covered by `gpu::tdr::tests`). - Native Windows 11 (`26200`) / RTX 4060 only; no Wine/Linux run on this host. ### AI use Ran the targeted release unit tests and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts and smoke blocks were taken directly from `cargo test` and `scripts/smoke.ps1` outputs.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2748/head:github-bot/gh-2748'
git switch 'github-bot/gh-2748'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2748'
git switch 'github-bot/gh-2748'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2748'
git switch 'github-bot/gh-2748'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2748'
git switch 'main'
git merge --squash 'github-bot/gh-2748'
git switch 'main'
git merge --ff-only 'github-bot/gh-2748'
git switch 'main'
git merge 'github-bot/gh-2748'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.