Frame generation stuck at one frame a present is switched off and on again #592

Merged
Creaa merged 1 commit from upstream-pr/592 into main 2026-11-29 08:16:59 +00:00
Creaa commented 2026-11-28 01:30:03 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Creaa on 2026-11-28T01:30:03Z.


DLSS Frame Generation can get stuck showing one frame a present: Streamline keeps it on with status 0x0, but num_frames_actually_presented stays at 1 until the next switch. In one 38-minute run on an RTX 4070 it stayed that way for about 10 minutes (from 1.97x to 1.15x shown frames per rendered frame for the rest of the session). Each time it started right after Streamline's dlfgPresent.cpp:1553 Couldn't lock the mutex on sync present - will skip the present.

What is in it (crates/victory-gpu/src/streamline.rs)

  • present_ends counts presents in a row that show one frame while 2 or more are asked (status read as before). At VICTORY_FRAMEGEN_REARM presents (90 unless set; 0 turns it off) it sets frame generation off, as resizing() does, and the next present with an upscaling asks it on again. Each time is logged as a warning with a running count.
  • stuck_step holds the counting; two unit tests cover the switch at the limit, the reset on a present with 2 frames, and the off / disabled cases.

Tested (RTX 4070 12 GB, driver 617.14, i7-13700F, 32 GB, Windows 11 26300; release build of this branch on 64d4931; Series X 2560x1440, DLSS Quality, -FrameGen)

  • Rebased onto a4d05e7 (the new tests sit beside failing_tests at the end of the file): cargo test -p victory-gpu --lib streamline: 16 passed. The game runs below were on 64d4931.
  • cargo test -p victory-gpu --lib frame_generation: 2 passed. cargo clippy -p victory-gpu --all-targets -- -D warnings: nothing in the new lines (the crate has other, older findings with Rust 1.98).
  • 17-minute run with three short pauses and one 4-minute pause: frame generation got stuck once (02:12:58, 20 s after a mutex warning), was switched again at 02:13:04 and showed 2 frames a present from 02:13:06. Whole run: 1.98x over 7,119 presents, 9 seconds at 1x; 7 mutex warnings; no crash.
  • The run before the change (on 0cef07e, same PC and settings): stuck from 20:23:55 to about 20:33, 1.15x after it.

Not tested

  • RTX 50 multi-frame generation (3x-6x), other drivers, FSR 3 frame generation (not touched).

AI use

  • Claude Code (Claude Opus 5.5) found the cause in the logs, wrote the change and the tests and drafted this description; I ran the game.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5535380274 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/592). Originally posted by [Creaa](https://github.com/Creaa) on 2026-11-28T01:30:03Z. --- DLSS Frame Generation can get stuck showing one frame a present: Streamline keeps it on with status `0x0`, but `num_frames_actually_presented` stays at 1 until the next switch. In one 38-minute run on an RTX 4070 it stayed that way for about 10 minutes (from 1.97x to 1.15x shown frames per rendered frame for the rest of the session). Each time it started right after Streamline's `dlfgPresent.cpp:1553 Couldn't lock the mutex on sync present - will skip the present`. **What is in it** (`crates/victory-gpu/src/streamline.rs`) - `present_ends` counts presents in a row that show one frame while 2 or more are asked (status read as before). At `VICTORY_FRAMEGEN_REARM` presents (90 unless set; `0` turns it off) it sets frame generation off, as `resizing()` does, and the next present with an upscaling asks it on again. Each time is logged as a warning with a running count. - `stuck_step` holds the counting; two unit tests cover the switch at the limit, the reset on a present with 2 frames, and the off / disabled cases. **Tested** (RTX 4070 12 GB, driver 617.14, i7-13700F, 32 GB, Windows 11 26300; release build of this branch on `64d4931`; Series X 2560x1440, DLSS Quality, `-FrameGen`) - Rebased onto `a4d05e7` (the new tests sit beside `failing_tests` at the end of the file): `cargo test -p victory-gpu --lib streamline`: 16 passed. The game runs below were on `64d4931`. - `cargo test -p victory-gpu --lib frame_generation`: 2 passed. `cargo clippy -p victory-gpu --all-targets -- -D warnings`: nothing in the new lines (the crate has other, older findings with Rust 1.98). - 17-minute run with three short pauses and one 4-minute pause: frame generation got stuck once (02:12:58, 20 s after a mutex warning), was switched again at 02:13:04 and showed 2 frames a present from 02:13:06. Whole run: 1.98x over 7,119 presents, 9 seconds at 1x; 7 mutex warnings; no crash. - The run before the change (on `0cef07e`, same PC and settings): stuck from 20:23:55 to about 20:33, 1.15x after it. **Not tested** - RTX 50 multi-frame generation (3x-6x), other drivers, FSR 3 frame generation (not touched). **AI use** - Claude Code (Claude Opus 5.5) found the cause in the logs, wrote the change and the tests and drafted this description; I ran the game.
Creaa commented 2026-11-28 09:22:45 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Creaa on 2026-11-28T09:22:45Z.


Updated (2f4cafc, squashed): the watch now stops after 3 switches in a row that do not bring generated frames back, and starts over at the next present that shows more than one frame.

Why: in a run on 2026-11-28 the game window was not in front for a while. Frame generation showed one frame a present there as it should, and the watch switched it 45 times, every 90 presents, to no effect. Nothing visible came of it, but it should not keep doing that. Once the window was in front it showed 2.00x with no switch at all.

  • New test switching_that_does_not_help_stops_until_frames_come_back (fails without the limit: 10 switches instead of 3). cargo test -p victory-gpu --lib streamline: 17 passed.
  • Not run in the game after this change: the limit only acts in the no-focus case, which the test covers.

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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7237200320 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/592#issuecomment-7237200320). Originally posted by [Creaa](https://github.com/Creaa) on 2026-11-28T09:22:45Z. --- Updated (`2f4cafc`, squashed): the watch now stops after 3 switches in a row that do not bring generated frames back, and starts over at the next present that shows more than one frame. Why: in a run on 2026-11-28 the game window was not in front for a while. Frame generation showed one frame a present there as it should, and the watch switched it 45 times, every 90 presents, to no effect. Nothing visible came of it, but it should not keep doing that. Once the window was in front it showed 2.00x with no switch at all. - New test `switching_that_does_not_help_stops_until_frames_come_back` (fails without the limit: 10 switches instead of 3). `cargo test -p victory-gpu --lib streamline`: 17 passed. - Not run in the game after this change: the limit only acts in the no-focus case, which the test covers. AI use: Claude Code (Claude Opus 5.5) wrote the change and this note.
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
trustno1-coder/VIctory-NVIDIA!592
No description provided.