Repository navigation
GPU: display mode changes and devices added or removed go to the log and to the removal report's trail - #1004
Open
PiloteCode wants to merge 2 commits into
Open
PiloteCode wants to merge 2 commits into
PiloteCode wants to merge 2 commits into
Conversation
Moon0755
added a commit
to Moon0755/victory-fork
that referenced
this pull request
Nov 25, 2026
Author
|
Merged Added after the merge: one lint commit for Checked, the branch as it is (
|
SPOOKEXE
pushed a commit
to SPOOKEXE/victory-fork
that referenced
this pull request
Nov 26, 2026
On a test machine Windows reset the card four times in one day (the display driver's "Resetting TDR"), each 2.5 to 4.6 s after a remote-desktop host ended a session and removed its virtual input device (as the system's device log shows), and each reset ended the run under way with its host device lost; nothing in our log showed what came before. Our window now notes the messages the system sends every top-level window: WM_DISPLAYCHANGE with the new size, and WM_DEVICECHANGE's "devices changed".
…ints So the report of a lost device says how long before it a device was added or removed or the display's mode changed (2.5 to 4.6 s for the four card resets on the test machine that day), next to the sweeps and library calls.
PiloteCode
force-pushed
the
pr/window-changes
branch
from
November 27, 2026 00:04
66fa13b to
98fa587
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on
4c604661(main). Two commits, two small changes to the window procedure inhost.rs: about 20 lines.Rebuilt on today's
main: the two clippy fixes it started with are gone (mainis clippy-clean now), and the two commits are re-applied unchanged.Why
On our test machine, Windows reset the card several times in one day ("Resetting TDR" from the display driver), and each reset ended the run under way with its host device lost. The system's own logs showed what came before: each time, 2.5 to 4.6 s earlier, a remote-desktop host had ended its session and removed its virtual input device. Nothing in our log showed it, so the losses first looked like ours.
What changes
Our window now notes two messages the system sends every top-level window:
WM_DISPLAYCHANGE, with the new size and bits per pixel ("the display's mode changed");WM_DEVICECHANGEwithDBT_DEVNODES_CHANGED("a device was added to or removed from the system").Each goes to the log and to the trail (
host::trail). The report of a lost device prints the trail with how long before the loss each entry came, so the report says whether a display or device change preceded the loss.In every build, with no switch: two log lines per change, which is rare. The window procedure otherwise does as before (
DefWindowProcW).Tested
The branch was checked as it is, on
4c604661, on the software adapter:cargo test -p victory-gpu --features diagnostics -- --test-threads=1 --skip stacks_that_mean_nothing_are_walked_without_a_faultwithVICTORY_D3D12_WARP=1: 247 passed, 7 ignored, none failed, as onmain. The skipped test ends the test process with an access violation on this machine, onmaintoo.cargo clippy --workspace --all-targets --locked -- -D warnings, and the same with--all-features: clean.cargo build --release -p victoryandcargo build --profile diag -p victory --features diagnosticspass.cargo xtask policyfails onmainitself:host.rs(534,239 bytes) andemit/lower.rs(546,915) are over the 524,288-byte limit. This branch adds 991 bytes tohost.rsand names no other file.In our tree, these lines have been in every run since they went in. No unit test: the messages come from the system.
Not tested