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

Closed
KainanP wants to merge 1 commit from upstream-pr/1101 into main
KainanP commented 2026-11-25 19:27:24 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by KainanP on 2026-11-25T19:27:24Z.


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

<!-- greyfinch-sync:fxceless/victory-fork:issue:6612056324 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1101). Originally posted by [KainanP](https://github.com/KainanP) on 2026-11-25T19:27:24Z. --- 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)
ldanyyl commented 2026-11-25 22:07:25 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by ldanyyl on 2026-11-25T21:49:58Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7175595502 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1101#issuecomment-7175595502). Originally posted by [ldanyyl](https://github.com/ldanyyl) on 2026-11-25T21:49:58Z. --- **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.
upstream-sync closed this pull request 2026-11-26 09:08:00 +00:00
KainanP commented 2026-11-26 09:08:06 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by KainanP on 2026-11-26T09:00:14Z.


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).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7187288496 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1101#issuecomment-7187288496). Originally posted by [KainanP](https://github.com/KainanP) on 2026-11-26T09:00:14Z. --- 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

Sign in to join this conversation.
No reviewers
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
fxceless/victory-fork!1098
No description provided.