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

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

@⁠AS-AI-DEV on GitHub · 2026-11-29 03:31 UTC · original
AS-AI-DEV:main → main · +29 −2 · 2 files · 1 commits · open

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

**@⁠AS-AI-DEV** on GitHub · 2026-11-29 03:31 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1938) `AS-AI-DEV:main` → `main` · +29 −2 · 2 files · 1 commits · open 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)
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
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; the reports of
VIctory-NVIDIA #1405, #995 and #515 match it.

The awake job is now left out while Reflex is on (one log line says so);
VICTORY_CARD_AWAKE=always keeps it. Without frame generation nothing
changes.

Measured (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; the same save, scripted starts, 60 s standing):
- VICTORY_CARD_AWAKE=1: 11 of 21 starts locked at 71.4 ms, present call
  8-31 ms (median per start); free starts 0.1-0.8 ms.
- VICTORY_CARD_AWAKE=0: 0 of 6 locked, 15-24 fps, present call 0.1-0.6 ms.
- This change with VICTORY_CARD_AWAKE=1: the job left out (log line),
  not locked, 18.1 fps, present call 0.56 ms.
- Reflex's own report (slReflexGetState) in a locked start: 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).
- Whether the frames went through frame generation did not decide it:
  locked starts had 1 to 76 % of presents through it, free ones 0 to 81 %.

Not measured: frame rate with the job against without it in unlocked
starts (upstream 42c064d found it slower in the game and left it off in
the launchers since).

Co-Authored-By: AS-AI-DEV <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 03:33:36 +00:00
Author
Owner

@⁠dyshay on GitHub · 2026-11-29 13:05 UTC · original

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.

**@⁠dyshay** on GitHub · 2026-11-29 13:05 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1938#issuecomment-7256279946) 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.
Author
Owner

@⁠AS-AI-DEV on GitHub · 2026-11-29 20:16 UTC · original · edited 2026-11-29 21:20 UTC

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** on GitHub · 2026-11-29 20:16 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1938#issuecomment-7261945913) · edited 2026-11-29 21:20 UTC 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.
github-bot force-pushed github-bot/gh-1938 from 54806fb6bc to 811459689c 2026-11-30 22:08:16 +00:00 Compare
Author
Owner

@⁠AS-AI-DEV on GitHub · 2026-11-30 22:06 UTC · original

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.

**@⁠AS-AI-DEV** on GitHub · 2026-11-30 22:06 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1938#issuecomment-7293368103) 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.
github-bot force-pushed github-bot/gh-1938 from 811459689c to 8cf3ca974c 2026-12-01 03:28:16 +00:00 Compare
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/1938/head:github-bot/gh-1938'
git switch 'github-bot/gh-1938'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1938'
git switch 'github-bot/gh-1938'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1938'
git switch 'github-bot/gh-1938'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1938'
git switch 'main'
git merge --squash 'github-bot/gh-1938'
git switch 'main'
git merge --ff-only 'github-bot/gh-1938'
git switch 'main'
git merge 'github-bot/gh-1938'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1938
No description provided.