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

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

@⁠Creaa on GitHub · 2026-11-28 01:30 UTC · original
Creaa:framegen-rearm-stuck → main · +77 −0 · 1 files · 1 commits · open

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** on GitHub · 2026-11-28 01:30 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/592) `Creaa:framegen-rearm-stuck` → `main` · +77 −0 · 1 files · 1 commits · open 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.
After Streamline logs "Couldn't lock the mutex on sync present - will skip the
present", DLSS Frame Generation can stay on with status 0 and show only the
rendered frame for every present until the next switch (about 10 minutes in a
run on an RTX 4070). The presenting thread now counts presents in a row that
show one frame while 2 or more are asked; at VICTORY_FRAMEGEN_REARM of them
(90 unless set, 0: never) it switches frame generation off, as a resize does,
and the next present with an upscaling asks it on again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 01:35:24 +00:00
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/592/head:github-bot/gh-592'
git switch 'github-bot/gh-592'

Merge

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