GPU: the driver watch counts the Display source's warnings and errors only (#1077) #1101

Closed
github-bot wants to merge 1 commit from github-bot/gh-1101 into main AGit
Owner

@⁠KainanP on GitHub · 2026-11-25 19:27 UTC · original
KainanP:fix/drvwatch-information-entries → main · +100 −7 · 1 files · 1 commits · closed without merging

Fixes #1077.

Problem. The driver watch subscribes to every entry of the Display source. Windows also writes Auto HDR's notices there as information entries: 4125 (#1077) and 4127 (the case #897 suppresses). So the watch trips seconds into runs that lose nothing, and the draw windows stay off for the rest of the run. That also skews any speed measurement of the switches on a machine with Auto HDR on.

Change (crates/victory-gpu/src/drvwatch.rs only). The query is built by a small query(drivers, system):

  • every entry of the vendors' kernel drivers (nvlddmkm, amdkmdag, amdwddmg, igfx, igfxn) still counts, at any level;
  • Display counts from warning level up (Level=1 or Level=2 or Level=3). Its TDR entry, 4101 "display driver stopped responding and has recovered", is a warning, so it still trips the watch.

This covers 4125, 4127 and any future information notice, instead of one suppressed ID at a time. It supersedes the narrower filter in #897 (thanks @⁠Lkxex and @⁠iGoldenNinja for the 4127 data). #897's switch to a QueryList with a null channel is not needed for this.

Tests.

  • the_system_takes_the_subscription now subscribes with the production query, so a malformed XPath fails a plain cargo test.
  • New, #[ignore] like the existing end-to-end test because it writes to the Application log: the_display_source_counts_from_warnings_up_and_a_driver_always. A source of our own name stands for Display in one subscription and for a vendor driver in another. One information entry and one error entry are written under it. Expected: the display-like subscription gets the error alone, and the driver-like one gets both.
    • with this change: passes;
    • with the old provider-only query (Provider[... or @Name='{system}']): fails, the display source's entries: the error alone, left 2, right 1.

Run on Windows 11 26200, RTX 4060 Laptop: cargo test -p victory-gpu --lib drvwatch gives 2 passed, 2 ignored. -- --ignored gives both end-to-end tests passing. cargo clippy -p victory-gpu --all-targets -D warnings reports nothing in drvwatch.rs; the 7 errors it does report are in other files and are also on main (d510ee4).

Not tested: a real Auto HDR notice. This machine's System log has no Display entries, so the level filter is checked through the same query on the Application log.

AI use: Claude Code (Claude Opus 5.5) wrote the change and the tests and ran them.

🤖 Generated with Claude Code

**@⁠KainanP** on GitHub · 2026-11-25 19:27 UTC · [original](https://github.com/fxceless/victory-fork/pull/1101) `KainanP:fix/drvwatch-information-entries` → `main` · +100 −7 · 1 files · 1 commits · closed without merging Fixes #1077. **Problem.** The driver watch subscribes to every entry of the `Display` source. Windows also writes Auto HDR's notices there as *information* entries: 4125 (#1077) and 4127 (the case #897 suppresses). So the watch trips seconds into runs that lose nothing, and the draw windows stay off for the rest of the run. That also skews any speed measurement of the switches on a machine with Auto HDR on. **Change** (`crates/victory-gpu/src/drvwatch.rs` only). The query is built by a small `query(drivers, system)`: - every entry of the vendors' kernel drivers (`nvlddmkm`, `amdkmdag`, `amdwddmg`, `igfx`, `igfxn`) still counts, at any level; - `Display` counts from warning level up (`Level=1 or Level=2 or Level=3`). Its TDR entry, 4101 "display driver stopped responding and has recovered", is a warning, so it still trips the watch. This covers 4125, 4127 and any future information notice, instead of one suppressed ID at a time. It supersedes the narrower filter in #897 (thanks @⁠Lkxex and @⁠iGoldenNinja for the 4127 data). #897's switch to a `QueryList` with a null channel is not needed for this. **Tests.** - `the_system_takes_the_subscription` now subscribes with the production query, so a malformed XPath fails a plain `cargo test`. - New, `#[ignore]` like the existing end-to-end test because it writes to the Application log: `the_display_source_counts_from_warnings_up_and_a_driver_always`. A source of our own name stands for `Display` in one subscription and for a vendor driver in another. One information entry and one error entry are written under it. Expected: the display-like subscription gets the error alone, and the driver-like one gets both. - with this change: passes; - with the old provider-only query (`Provider[... or @Name='{system}']`): fails, `the display source's entries: the error alone`, left 2, right 1. Run on Windows 11 26200, RTX 4060 Laptop: `cargo test -p victory-gpu --lib drvwatch` gives 2 passed, 2 ignored. `-- --ignored` gives both end-to-end tests passing. `cargo clippy -p victory-gpu --all-targets -D warnings` reports nothing in `drvwatch.rs`; the 7 errors it does report are in other files and are also on `main` (`d510ee4`). Not tested: a real Auto HDR notice. This machine's System log has no `Display` entries, so the level filter is checked through the same query on the Application log. AI use: Claude Code (Claude Opus 5.5) wrote the change and the tests and ran them. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Windows writes Auto HDR's notices (4125, 4127) as information entries of
the Display source, which the subscription took for a driver error: the
watch tripped seconds into runs that lost nothing and turned the draw
windows off for the rest of them (#1077). Display's TDR entry (4101) is a
warning, so it still counts; every entry of a vendor's driver still
counts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:57:30 +00:00
Author
Owner

@⁠ldanyyl on GitHub · 2026-11-25 21:49 UTC · original

Tested against a real Auto HDR notice (the case the description lists as not tested).

Windows 11 26300, RTX 5060 Ti 16 GB, Auto HDR on. This machine's System log has 134 Display 4125 information entries (Auto HDR notices, January to today) and 2 nvlddmkm 153 errors. Each query, read with Get-WinEvent -LogName System -FilterXPath:

query entries that would trip the watch
main 136: 134 × Display 4125 (information), 2 × nvlddmkm 153 (error)
this PR's query(&DRIVERS, "Display") 2: the 2 × nvlddmkm 153 alone

In the title on main, the watch tripped 5 s after launch in every run, at the second Windows logged a 4125 notice for the window, so the draw windows were off for the whole run. With the level filter on Display (a local change equivalent to this one for that source), there were 0 trips in 11 runs of about 6 minutes, and no device loss.

With the watch quiet, VICTORY_INDIRECT_WINDOW=1 was measured for real on top of VICTORY_COPY_PLAIN=1 VICTORY_ASYNC_SUBMIT=1 VICTORY_QUEUE2=1 VICTORY_TEXTURE_NO_WAIT=1 (3 runs × 6 min each, warm shader cache, compared by draws per frame): 4.4 against 3.0 fps under 2,000 draws, 3.1 against 3.4 above 3,000, 2.95 against 2.90 median overall. No driver entry and no device loss in any of the 6 runs.

AI-assisted (Claude Code, Claude Opus 5.5): the measurements and this text.

**@⁠ldanyyl** on GitHub · 2026-11-25 21:49 UTC · [original](https://github.com/fxceless/victory-fork/pull/1101#issuecomment-7175595502) **Tested against a real Auto HDR notice** (the case the description lists as not tested). Windows 11 26300, RTX 5060 Ti 16 GB, Auto HDR on. This machine's System log has 134 `Display` 4125 information entries (Auto HDR notices, January to today) and 2 `nvlddmkm` 153 errors. Each query, read with `Get-WinEvent -LogName System -FilterXPath`: | query | entries that would trip the watch | |---|---| | `main` | 136: 134 × `Display` 4125 (information), 2 × `nvlddmkm` 153 (error) | | this PR's `query(&DRIVERS, "Display")` | 2: the 2 × `nvlddmkm` 153 alone | In the title on `main`, the watch tripped 5 s after launch in every run, at the second Windows logged a 4125 notice for the window, so the draw windows were off for the whole run. With the level filter on `Display` (a local change equivalent to this one for that source), there were 0 trips in 11 runs of about 6 minutes, and no device loss. With the watch quiet, `VICTORY_INDIRECT_WINDOW=1` was measured for real on top of `VICTORY_COPY_PLAIN=1 VICTORY_ASYNC_SUBMIT=1 VICTORY_QUEUE2=1 VICTORY_TEXTURE_NO_WAIT=1` (3 runs × 6 min each, warm shader cache, compared by draws per frame): 4.4 against 3.0 fps under 2,000 draws, 3.1 against 3.4 above 3,000, 2.95 against 2.90 median overall. No driver entry and no device loss in any of the 6 runs. AI-assisted (Claude Code, Claude Opus 5.5): the measurements and this text.
github-bot closed this pull request 2026-11-26 09:05:27 +00:00
Author
Owner

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

Superseded by ca8ce8a on main, which applies the same level filter (levels 1-3) to every provider, so #1077 is fixed there. Closing this one. If an end-to-end check of the filter is wanted, this branch's ignored test (writes one information and one error entry to the Application log and checks only the error is delivered) can be ported onto main's QUERY; happy to do it on request.

AI use: Claude Code (Claude Opus 5.5).

**@⁠KainanP** on GitHub · 2026-11-26 09:00 UTC · [original](https://github.com/fxceless/victory-fork/pull/1101#issuecomment-7187288496) Superseded by ca8ce8a on main, which applies the same level filter (levels 1-3) to every provider, so #1077 is fixed there. Closing this one. If an end-to-end check of the filter is wanted, this branch's ignored test (writes one information and one error entry to the Application log and checks only the error is delivered) can be ported onto main's QUERY; happy to do it on request. _AI use: Claude Code (Claude Opus 5.5)._

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.