launcher: honor -NoFrameGen across settings and restart #2647

Closed
louisdibiasi wants to merge 1 commit from upstream-pr/2647 into main
louisdibiasi commented 2026-11-29 21:40:34 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by louisdibiasi on 2026-11-29T21:40:34Z.


Claimed in the coordination issue as: Keep -NoFrameGen effective after saved F1 settings and through F1 restart

What and why

Saved F1 settings and -More can set LEONIDA_FRAME_GEN after the launcher has handled -NoFrameGen. The F1 restart command also drops the switch. Apply the DLSS frame generation opt-out after settings are loaded and carry it into the restart arguments. An explicit -FsrFrameGen remains available with the DLSS opt-out.

Tested

  • python -I tests/test_play_nvidia_no_frame_gen.py -v reproduced the opt-out failures on 060c47160 and passed seven synthetic dry-run cases in each shell with the fix. Cases cover defaults, saved settings, -More, restart arguments, and explicit FSR 3 selection alongside -NoFrameGen.
  • Windows PowerShell 5.1.26100.9818 and PowerShell 7.6.10 on Windows 11, with Python 3.12.10. All 19 existing tests in test_win_launchers.py, test_leonida_launcher.py, and test_build_batch_launch.py passed. The changed-file game-data scan passed.
  • The tests verify launcher settings and generated restart arguments. Live F1 restart, on-device frame generation, and gameplay FPS were outside the test scope.

GPUs tested: n/a (synthetic launcher dry runs).

AI-assisted: Yes, with OpenAI Codex (GPT-6).

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys, or decryption.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5555410051 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2647). Originally posted by [louisdibiasi](https://github.com/louisdibiasi) on 2026-11-29T21:40:34Z. --- Claimed in the coordination issue as: [Keep -NoFrameGen effective after saved F1 settings and through F1 restart](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7249530332) ### What and why Saved F1 settings and `-More` can set `LEONIDA_FRAME_GEN` after the launcher has handled `-NoFrameGen`. The F1 restart command also drops the switch. Apply the DLSS frame generation opt-out after settings are loaded and carry it into the restart arguments. An explicit `-FsrFrameGen` remains available with the DLSS opt-out. ### Tested - `python -I tests/test_play_nvidia_no_frame_gen.py -v` reproduced the opt-out failures on `060c47160` and passed seven synthetic dry-run cases in each shell with the fix. Cases cover defaults, saved settings, `-More`, restart arguments, and explicit FSR 3 selection alongside `-NoFrameGen`. - Windows PowerShell 5.1.26100.9818 and PowerShell 7.6.10 on Windows 11, with Python 3.12.10. All 19 existing tests in `test_win_launchers.py`, `test_leonida_launcher.py`, and `test_build_batch_launch.py` passed. The changed-file game-data scan passed. - The tests verify launcher settings and generated restart arguments. Live F1 restart, on-device frame generation, and gameplay FPS were outside the test scope. GPUs tested: n/a (synthetic launcher dry runs). AI-assisted: Yes, with OpenAI Codex (GPT-6). ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys, or decryption.
merzleckeier commented 2026-11-29 22:02:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T22:02:57Z.


Independent dry-run compatibility check with #2626. I tested exact heads 2ac782d0 and fcc044cd against main 060c47160. Git merged both launcher changes cleanly (tree 052517f97). PowerShell 7.4.21 on CachyOS with synthetic file paths containing spaces and apostrophes.

MEASURED. After the initial dry run I took LEONIDA_MENU_ARGS verbatim and invoked the launcher again through PowerShell with those arguments and -DryRun. The saved F1 value for DLSS generation changed from 3 to 5 between runs, and the first run tried setting it to 4 through -More.

  • main and #2626 alone emitted the DLSS setting again on replay. #2647 alone preserved the DLSS opt-out and dropped -MotionBlur on replay.
  • With both applied, every generated command line in the two fixtures contained -NoFrameGen and -MotionBlur exactly once, and both settings took effect again on replay. DLSS frame generation stayed unset. The separate fixture with explicit -FsrFrameGen kept FSR enabled on replay.

The seven opt-out cases also passed with #2647 alone and with both applied, using the original fixture with its shell lookup adapted to native PowerShell. Synthetic dry runs only. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7263359298 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2647#issuecomment-7263359298). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-11-29T22:02:57Z. --- Independent dry-run compatibility check with #2626. I tested exact heads `2ac782d0` and `fcc044cd` against `main` `060c47160`. Git merged both launcher changes cleanly (tree `052517f97`). PowerShell 7.4.21 on CachyOS with synthetic file paths containing spaces and apostrophes. **MEASURED.** After the initial dry run I took `LEONIDA_MENU_ARGS` verbatim and invoked the launcher again through PowerShell with those arguments and `-DryRun`. The saved F1 value for DLSS generation changed from 3 to 5 between runs, and the first run tried setting it to 4 through `-More`. - `main` and #2626 alone emitted the DLSS setting again on replay. #2647 alone preserved the DLSS opt-out and dropped `-MotionBlur` on replay. - With both applied, every generated command line in the two fixtures contained `-NoFrameGen` and `-MotionBlur` exactly once, and both settings took effect again on replay. DLSS frame generation stayed unset. The separate fixture with explicit `-FsrFrameGen` kept FSR enabled on replay. The seven opt-out cases also passed with #2647 alone and with both applied, using the original fixture with its shell lookup adapted to native PowerShell. Synthetic dry runs only. AI-assisted with OpenAI Codex.
ecox982745 commented 2026-11-29 22:41:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-29T22:41:57Z.


Independent native Windows restart replay for #2647 and #2626. I used heads 2ac782d0 and fcc044cdc on 452d1d1b6 (clean combined tree 1f77c7107), Windows PowerShell 5.1.26100.10068 and PowerShell 7.6.9. The executable and SDK fixture paths contained spaces and apostrophes. I changed the saved F1 DLSS value from 3 to 5 between the first dry run and replay of the exact generated arguments. The initial command also requested 4 via -More.

  • On main, the initial opt-out emitted 4, and the replay emitted 5. Motion blur was enabled initially and dropped on replay.
  • With both patches, -NoFrameGen and -MotionBlur each appeared once in the generated command. Both settings remained effective on replay. An explicit -FsrFrameGen also survived, and the defaults still used the saved DLSS value on replay.
  • All 12 replay cases behaved as expected across both shells and both trees. On the combined tree, the four launcher regression files passed 21 tests total, including the seven opt-out cases in each shell.

Synthetic dry runs only. No game launch or GPU rendering. AI-assisted with OpenAI Codex (GPT-6.2 Sol).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7263878742 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2647#issuecomment-7263878742). Originally posted by [ecox982745](https://github.com/ecox982745) on 2026-11-29T22:41:57Z. --- Independent native Windows restart replay for #2647 and #2626. I used heads `2ac782d0` and `fcc044cdc` on `452d1d1b6` (clean combined tree `1f77c7107`), Windows PowerShell 5.1.26100.10068 and PowerShell 7.6.9. The executable and SDK fixture paths contained spaces and apostrophes. I changed the saved F1 DLSS value from 3 to 5 between the first dry run and replay of the exact generated arguments. The initial command also requested 4 via `-More`. - On main, the initial opt-out emitted 4, and the replay emitted 5. Motion blur was enabled initially and dropped on replay. - With both patches, `-NoFrameGen` and `-MotionBlur` each appeared once in the generated command. Both settings remained effective on replay. An explicit `-FsrFrameGen` also survived, and the defaults still used the saved DLSS value on replay. - All 12 replay cases behaved as expected across both shells and both trees. On the combined tree, the four launcher regression files passed 21 tests total, including the seven opt-out cases in each shell. Synthetic dry runs only. No game launch or GPU rendering. AI-assisted with OpenAI Codex (GPT-6.2 Sol).
fiestorra commented 2026-11-29 22:50:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T22:50:14Z.


Verified on main 452d1d1b6, Windows 11 with Windows PowerShell available (which is where this test actually runs the script):

git merge-tree origin/main refs/pull/2647/head   -> clean
cherry-pick its commit                           -> clean
python3 -m pytest tests/test_play_nvidia_no_frame_gen.py -q  -> 1 passed, 16 subtests

The diff is two lines in d3d12/scripts/play-nvidia.ps1:

if ($NoFrameGen) { $settings.Remove('LEONIDA_FRAME_GEN') }
if ($NoFrameGen) { $again += '-NoFrameGen' }

which is the whole point: -NoFrameGen now clears the setting instead of only overriding it for the current launch, and survives the re-invocation. That is the bug shape where a flag "works" until the script restarts itself.

Why this one is worth a maintainer's time: the test is not a mock. It skips unless os.name == "nt" and PowerShell is on PATH, and then it runs the script through subprocess, so the 16 subtests are assertions about the real shell behaviour rather than about a Python model of it. Most flag-plumbing tests in this tree cannot say that.

Not tested: on Linux, where the test skips by design, and against the real title - no game data is used.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7263987782 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2647#issuecomment-7263987782). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-29T22:50:14Z. --- Verified on `main` `452d1d1b6`, Windows 11 with Windows PowerShell available (which is where this test actually runs the script): ``` git merge-tree origin/main refs/pull/2647/head -> clean cherry-pick its commit -> clean python3 -m pytest tests/test_play_nvidia_no_frame_gen.py -q -> 1 passed, 16 subtests ``` The diff is two lines in `d3d12/scripts/play-nvidia.ps1`: ```powershell if ($NoFrameGen) { $settings.Remove('LEONIDA_FRAME_GEN') } if ($NoFrameGen) { $again += '-NoFrameGen' } ``` which is the whole point: `-NoFrameGen` now clears the setting instead of only overriding it for the current launch, and survives the re-invocation. That is the bug shape where a flag "works" until the script restarts itself. **Why this one is worth a maintainer's time:** the test is not a mock. It skips unless `os.name == "nt"` and PowerShell is on PATH, and then it *runs* the script through `subprocess`, so the 16 subtests are assertions about the real shell behaviour rather than about a Python model of it. Most flag-plumbing tests in this tree cannot say that. **Not tested:** on Linux, where the test skips by design, and against the real title - no game data is used. Written with an AI assistant.
KelboLive commented 2026-11-30 16:28:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T16:28:09Z.


Independent check on Windows, at 2ac782d0c: the new test fails under the default PowerShell execution policy, and a one-flag fix makes it pass.

  • python -I tests/test_play_nvidia_no_frame_gen.py on Windows 11 with powershell.exe 5.1: FAIL — File ...\play-nvidia.ps1 cannot be loaded because running scripts is disabled on this system (policy Restricted).
  • The invocation in the test is [shell, "-NoProfile", "-NonInteractive", "-Command", DRY_RUN]; Windows PowerShell applies the policy when -Command loads the script with &.
  • With -ExecutionPolicy Bypass added to that argv (local test change, not pushed):
[shell, "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command", DRY_RUN]

the test is 1 test, OK in 0.8 s.

Suggested fix: add -ExecutionPolicy Bypass (both powershell.exe and pwsh.exe accept it), so the test runs on default contributor machines, not only where the policy is already relaxed.

Environment: Windows 11 Pro 10.0.26200.9711, Windows PowerShell 5.1.

AI-assisted: yes (opencode).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7284717997 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2647#issuecomment-7284717997). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-30T16:28:09Z. --- Independent check on Windows, at `2ac782d0c`: the new test fails under the default PowerShell execution policy, and a one-flag fix makes it pass. - `python -I tests/test_play_nvidia_no_frame_gen.py` on Windows 11 with `powershell.exe` 5.1: `FAIL` — `File ...\play-nvidia.ps1 cannot be loaded because running scripts is disabled on this system` (policy `Restricted`). - The invocation in the test is `[shell, "-NoProfile", "-NonInteractive", "-Command", DRY_RUN]`; Windows PowerShell applies the policy when `-Command` loads the script with `&`. - With `-ExecutionPolicy Bypass` added to that argv (local test change, not pushed): ```python [shell, "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command", DRY_RUN] ``` the test is **1 test, OK** in 0.8 s. Suggested fix: add `-ExecutionPolicy Bypass` (both `powershell.exe` and `pwsh.exe` accept it), so the test runs on default contributor machines, not only where the policy is already relaxed. Environment: Windows 11 Pro 10.0.26200.9711, Windows PowerShell 5.1. AI-assisted: yes (opencode).
andrew-ai commented 2026-12-02 00:38:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by andrew-ai on 2026-12-02T00:38:22Z.


Rebase detail for main d741a9f8f. I ran the seven dry-run cases from 2ac782d0c against the current launcher in Windows PowerShell 5.1 and PowerShell 7, with process-scoped execution policy for the test child. Only extra_opt_out failed in either shell: combining -NoFrameGen with -More setting LEONIDA_FRAME_GEN=4 still emitted 4, even though the restart arguments contained -NoFrameGen. The saved-setting opt-out already passed. Applying just the post-More removal from this PR made all seven cases pass in both shells. Main already includes NoFrameGen in the restart switch loop, so the separate restart append can be dropped on rebase. This exercised generated settings and restart arguments only. Codex-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7330790553 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2647#issuecomment-7330790553). Originally posted by [andrew-ai](https://github.com/andrew-ai) on 2026-12-02T00:38:22Z. --- Rebase detail for main d741a9f8f. I ran the seven dry-run cases from 2ac782d0c against the current launcher in Windows PowerShell 5.1 and PowerShell 7, with process-scoped execution policy for the test child. Only extra_opt_out failed in either shell: combining -NoFrameGen with -More setting LEONIDA_FRAME_GEN=4 still emitted 4, even though the restart arguments contained -NoFrameGen. The saved-setting opt-out already passed. Applying just the post-More removal from this PR made all seven cases pass in both shells. Main already includes NoFrameGen in the restart switch loop, so the separate restart append can be dropped on rebase. This exercised generated settings and restart arguments only. Codex-assisted.
MoonEyes commented 2026-12-02 11:03:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T11:03:41Z.


For information: this pull request is carried in #3104, which merges your head (your commit is kept) into current main. main already replays -NoFrameGen on restart, so your restart line is dropped; your line after the -More loop is kept, skips the menu's SAVE AND RESTART start so the frame generation saved in the F1 menu still wins there, and the test runs its PowerShell child with a process-scoped Bypass as KelboLive asked. A 330 s in-game run of the fixed case is in its description. This one stays open until a maintainer decides; if you pick it up again, say so and the carry can be closed.

AI-assisted (Claude Code, Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7343368065 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2647#issuecomment-7343368065). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T11:03:41Z. --- For information: this pull request is carried in #3104, which merges your head (your commit is kept) into current `main`. `main` already replays `-NoFrameGen` on restart, so your restart line is dropped; your line after the `-More` loop is kept, skips the menu's SAVE AND RESTART start so the frame generation saved in the F1 menu still wins there, and the test runs its PowerShell child with a process-scoped Bypass as KelboLive asked. A 330 s in-game run of the fixed case is in its description. This one stays open until a maintainer decides; if you pick it up again, say so and the carry can be closed. AI-assisted (Claude Code, Claude Opus 5.5)
MoonEyes commented 2026-12-02 11:50:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T11:50:15Z.


Closing: this pull request no longer applies to current main (merge conflict in d3d12/scripts/play-nvidia.ps1), and open pull requests that have fallen out of step with main are being closed so the list stays workable. Your work is not lost: it is carried in #3104
, which keeps your commits and resolves the conflict on current main.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7344474228 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2647#issuecomment-7344474228). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T11:50:15Z. --- Closing: this pull request no longer applies to current `main` (merge conflict in `d3d12/scripts/play-nvidia.ps1`), and open pull requests that have fallen out of step with `main` are being closed so the list stays workable. Your work is not lost: it is carried in #3104 , which keeps your commits and resolves the conflict on current `main`. AI-assisted (Claude Code).

Pull request closed

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
ProjectLeonida/mandy!2647
No description provided.