Card kept awake no more while Reflex paces frames (the 14 fps lock) #1938

Open
AS-AI-DEV wants to merge 1 commit from upstream-pr/1938 into main
AS-AI-DEV commented 2026-11-29 03:31:14 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by AS-AI-DEV on 2026-11-29T03:31:14Z.


Fixes #1405. Also #995 (and the closed #515).

What it changes

What was wrong. With DLSS frame generation set up, Reflex low latency is on. Reflex measures each frame's GPU time from the card's queues, and with VICTORY_CARD_AWAKE=1 it counts the never-ending compute job of crates/victory-gpu/src/host/awake.rs in: the card then looks busy for the whole frame, Reflex takes the frame for GPU-bound and sleeps the CPU inside each present to match it, which keeps the frame that long. A start that falls into this stays at 14.0 fps (71.4 ms a frame) for the whole session, with the time spent inside the present call (the stack in #250: Present → sl.interposer → NVAPI → driver Sleep).

What this does. host::awake::sent leaves the job out while Reflex is on (streamline::reflex_on(), set where Reflex low latency is asked for), and says so once in the log. VICTORY_CARD_AWAKE=always keeps the old behaviour. Without frame generation nothing changes. Two files, +29 / −2.

Since 42c064d the launchers leave VICTORY_CARD_AWAKE off, so default starts no longer hit this; it still happens to anyone who turns it back on with frame generation (as 42c064d suggests "where it helps"), and in launchers and builds that still set it.

How it was tested

  • GPU and profile: RTX 5060 Ti 16 GB, Ryzen 7 5800X, 32 GB, Windows 11, driver 621.24, Streamline 2.14.16. Series X, 1080p to 1440p, DLSS Performance, frame generation 2x, ray tracing off. The same save each time, scripted starts, 60 s standing in the world, classified locked when most 5 s frame lines sat at 70.5–72.5 ms.
  • Before (VICTORY_CARD_AWAKE=1): 11 of 21 starts locked at 71.4 ms; present call 8–31 ms (median per start) when locked, 0.1–0.8 ms when free.
  • With VICTORY_CARD_AWAKE=0 set by hand: 0 of 6 locked, 15–24 fps, present call 0.1–0.6 ms.
  • After (this change, VICTORY_CARD_AWAKE=1 still set by the launcher): the job left out (log line), not locked, 18.1 fps, present call 0.56 ms.
  • Why: Reflex's own report (slReflexGetState) in a locked start gave GPU active 71–73 ms a frame, equal to the frame step; in free starts 19–41 ms. Windows' GPU counter: 95–96 % busy with the job, 52–64 % without, at the same power (104–119 W).
  • Not the cause: whether frames went through frame generation (locked starts had 1–76 % of presents through it, free ones 0–81 %), and the latency markers (foxhound 7c53527's markers at the title's own points still locked 2 of 2).
  • For shader changes, the wave sizes tested: no shader change.
  • cargo test passed for the crates it touches: yes, victory-gpu (550 passed, 0 failed, 43 ignored), on d4b5d51 with this change. The branch here is the same commit applied on 568c5e5, where it applies cleanly; it was not rebuilt on 568c5e5.
  • Not measured: frame rate with the job against without it in starts that do not lock (42c064d and #825 cover that side).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #825 (also changes host/awake.rs: keeps the card awake only through frames of many submissions, for #771; the two changes are independent and should merge either way), #542 (launcher default, superseded by 42c064d), #250 (Reflex only while frame generation is on; with this change the awake job no longer feeds Reflex at all).

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5547201140 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1938). Originally posted by [AS-AI-DEV](https://github.com/AS-AI-DEV) on 2026-11-29T03:31:14Z. --- Fixes #1405. Also #995 (and the closed #515). ## What it changes **What was wrong.** With DLSS frame generation set up, Reflex low latency is on. Reflex measures each frame's GPU time from the card's queues, and with `VICTORY_CARD_AWAKE=1` it counts the never-ending compute job of `crates/victory-gpu/src/host/awake.rs` in: the card then looks busy for the whole frame, Reflex takes the frame for GPU-bound and sleeps the CPU inside each present to match it, which keeps the frame that long. A start that falls into this stays at 14.0 fps (71.4 ms a frame) for the whole session, with the time spent inside the present call (the stack in #250: `Present → sl.interposer → NVAPI → driver Sleep`). **What this does.** `host::awake::sent` leaves the job out while Reflex is on (`streamline::reflex_on()`, set where Reflex low latency is asked for), and says so once in the log. `VICTORY_CARD_AWAKE=always` keeps the old behaviour. Without frame generation nothing changes. Two files, +29 / −2. Since 42c064d the launchers leave `VICTORY_CARD_AWAKE` off, so default starts no longer hit this; it still happens to anyone who turns it back on with frame generation (as 42c064d suggests "where it helps"), and in launchers and builds that still set it. ## How it was tested - GPU and profile: RTX 5060 Ti 16 GB, Ryzen 7 5800X, 32 GB, Windows 11, driver 621.24, Streamline 2.14.16. Series X, 1080p to 1440p, DLSS Performance, frame generation 2x, ray tracing off. The same save each time, scripted starts, 60 s standing in the world, classified locked when most 5 s frame lines sat at 70.5–72.5 ms. - Before (`VICTORY_CARD_AWAKE=1`): **11 of 21 starts locked** at 71.4 ms; present call 8–31 ms (median per start) when locked, 0.1–0.8 ms when free. - With `VICTORY_CARD_AWAKE=0` set by hand: **0 of 6 locked**, 15–24 fps, present call 0.1–0.6 ms. - After (this change, `VICTORY_CARD_AWAKE=1` still set by the launcher): the job left out (log line), not locked, 18.1 fps, present call 0.56 ms. - Why: Reflex's own report (`slReflexGetState`) in a locked start gave GPU active 71–73 ms a frame, equal to the frame step; in free starts 19–41 ms. Windows' GPU counter: 95–96 % busy with the job, 52–64 % without, at the same power (104–119 W). - Not the cause: whether frames went through frame generation (locked starts had 1–76 % of presents through it, free ones 0–81 %), and the latency markers (foxhound 7c53527's markers at the title's own points still locked 2 of 2). - For shader changes, the wave sizes tested: no shader change. - `cargo test` passed for the crates it touches: yes, `victory-gpu` (550 passed, 0 failed, 43 ignored), on d4b5d51 with this change. The branch here is the same commit applied on 568c5e5, where it applies cleanly; it was not rebuilt on 568c5e5. - Not measured: frame rate with the job against without it in starts that do not lock (42c064d and #825 cover that side). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #825 (also changes `host/awake.rs`: keeps the card awake only through frames of many submissions, for #771; the two changes are independent and should merge either way), #542 (launcher default, superseded by 42c064d), #250 (Reflex only while frame generation is on; with this change the awake job no longer feeds Reflex at all). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
dyshay commented 2026-11-29 13:05:20 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dyshay on 2026-11-29T13:05:20Z.


Merged into our fork's integration branch for testing (dyshay/VIctory-NVIDIA, branch janus-prs, on top of 829188e9 plus a couple of local fixes). Read the full diff first: no network, process spawning, binaries, build/CI/dependency changes or game data. Builds with --profile diag --features diagnostics; adapted to our tree: Reflex is switched on and off with frame generation here (set_reflex), so REFLEX_ON follows set_reflex instead of staying on for the whole process, and VICTORY_CARD_AWAKE=always was added to the existing parser. Targeted tests pass. In-game runs on an RTX 4090 are queued; I'll report the frame rate here.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7256279946 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1938#issuecomment-7256279946). Originally posted by [dyshay](https://github.com/dyshay) on 2026-11-29T13:05:20Z. --- Merged into our fork's integration branch for testing ([dyshay/VIctory-NVIDIA](https://github.com/dyshay/VIctory-NVIDIA), branch `janus-prs`, on top of 829188e9 plus a couple of local fixes). Read the full diff first: no network, process spawning, binaries, build/CI/dependency changes or game data. Builds with `--profile diag --features diagnostics`; adapted to our tree: Reflex is switched on and off with frame generation here (`set_reflex`), so `REFLEX_ON` follows `set_reflex` instead of staying on for the whole process, and `VICTORY_CARD_AWAKE=always` was added to the existing parser. Targeted tests pass. In-game runs on an RTX 4090 are queued; I'll report the frame rate here.
AS-AI-DEV commented 2026-11-29 20:16:21 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by AS-AI-DEV on 2026-11-29T20:16:21Z.


Thanks for reviewing and testing it. I made the same adaptation when I moved my own tree to 829188e (and since to f889bb0): REFLEX_ON is set inside set_reflex, so it follows Reflex being switched on and off with frame generation, and VICTORY_CARD_AWAKE=always goes through the same parser as 1. On f889bb0 it rebased without other changes.

Looking forward to the RTX 4090 numbers. The case it fixes shows as frames held at exactly 71.4 ms (14.0 fps) for a whole session with frame generation and Reflex on while the card-awake job runs; with the change, the log line "the card is not kept awake while Reflex paces frames" appears once at the start. If this PR should be rebased onto the current main, say so and I will update it.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7261945913 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1938#issuecomment-7261945913). Originally posted by [AS-AI-DEV](https://github.com/AS-AI-DEV) on 2026-11-29T20:16:21Z. --- Thanks for reviewing and testing it. I made the same adaptation when I moved my own tree to 829188e (and since to f889bb0): `REFLEX_ON` is set inside `set_reflex`, so it follows Reflex being switched on and off with frame generation, and `VICTORY_CARD_AWAKE=always` goes through the same parser as `1`. On f889bb0 it rebased without other changes. Looking forward to the RTX 4090 numbers. The case it fixes shows as frames held at exactly 71.4 ms (14.0 fps) for a whole session with frame generation and Reflex on while the card-awake job runs; with the change, the log line "the card is not kept awake while Reflex paces frames" appears once at the start. If this PR should be rebased onto the current main, say so and I will update it.
AS-AI-DEV commented 2026-11-30 22:06:46 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by AS-AI-DEV on 2026-11-30T22:06:46Z.


Rebased onto the current main (e1251c3); the conflicts are gone.

What changed in the rebase, nothing else: REFLEX_ON is now set inside set_reflex, so it follows Reflex being switched on and off with frame generation, and VICTORY_CARD_AWAKE=always goes through the existing parser (the same adaptation described above for 829188e). The change is still 29 lines added and 2 removed in crates/victory-gpu/src/host/awake.rs and crates/victory-gpu/src/streamline.rs.

The measurements in the description are from the original base. On e1251c3 I have built it, run cargo test for victory-gpu, and played 35 minutes with frame generation on; the session did not lock at 71.4 ms.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7293368103 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1938#issuecomment-7293368103). Originally posted by [AS-AI-DEV](https://github.com/AS-AI-DEV) on 2026-11-30T22:06:46Z. --- Rebased onto the current main (e1251c3); the conflicts are gone. What changed in the rebase, nothing else: `REFLEX_ON` is now set inside `set_reflex`, so it follows Reflex being switched on and off with frame generation, and `VICTORY_CARD_AWAKE=always` goes through the existing parser (the same adaptation described above for 829188e). The change is still 29 lines added and 2 removed in `crates/victory-gpu/src/host/awake.rs` and `crates/victory-gpu/src/streamline.rs`. The measurements in the description are from the original base. On e1251c3 I have built it, run `cargo test` for `victory-gpu`, and played 35 minutes with frame generation on; the session did not lock at 71.4 ms.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1938:upstream-pr/1938'
git switch 'upstream-pr/1938'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1938'
git switch 'upstream-pr/1938'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1938'
git switch 'upstream-pr/1938'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1938'
git switch 'main'
git merge --squash 'upstream-pr/1938'
git switch 'main'
git merge --ff-only 'upstream-pr/1938'
git switch 'main'
git merge 'upstream-pr/1938'
git push origin 'main'
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!1938
No description provided.