launcher: Auto preset picked from the card's memory and the PC's RAM (LAUNCHER-AUTO-DETECT) #3405

Merged
leonida/mandy
OreoFR merged 7 commits from oreofr/launcher-auto-detect into main 2026-12-04 01:59:36 +00:00 AGit

Pull request successfully merged and closed

Member

Item: LAUNCHER-AUTO-DETECT (claimed in #3312).

Launcher change: needs OreoFR's review. Please do not merge without it.

What

  • Settings > Picture > Preset: an Auto (recommended) button sets the profile, DLSS, the DLSS mode, the resolution and frame generation for this PC. The line under it says what Auto picks here. Nothing is saved until Save.
  • First start (no settings saved yet, or only the installed app's repository): the launcher applies Auto once and saves it with a new auto_offered key. The Play card then says what was picked in one line, with Change, which opens Settings.
  • Never over a player's settings: a launcher.json from before this change (no auto_offered key) counts as the player's own and is never replaced. After the first start, Auto runs only when the player presses the button.
  • The card comes from what the launcher already reads (the display class: DriverDesc, qwMemorySize, the same values play-nvidia.ps1 reads). The judged card is the one with the most memory among those the Graphics card list names. RAM comes from GlobalMemoryStatusEx, which Settings already uses. No new probes.
  • Pure, testable functions: auto_tier, auto_card, auto_pick(vram, ram, name), apply_auto, auto_summary, auto_first_start.
  • Strings go through t(), with fr, de, es and pt updated. The UI uses the launcher's dark theme, its QuietButton and its muted rule-note lines.

Why

On a first start the launcher defaults to Series X. That profile crashes or crawls on 8-12 GB cards and on 16 GB RAM PCs. Darner shows a first-start pick from the card's memory; this does the same with our own numbers wherever we have them.

Tiers

The tiers are a mix of Darner's and ours, as OreoFR chose. They are after Darner (TrustNo1/Darner, GPL-3.0-or-later) crates/darner-gpu/src/rig.rs, commits fa6e1e1..cb4bc0d (merge 0a4c1d2), first-start offer c992532, mixed with Mandy's own measurements.

Tiers are cut on the card's own memory (qwMemorySize). Darner cuts on the DXGI budget (about 93 % of the card), but the same cut-offs fall between the sizes cards are sold in.

Render sizes come from existing settings only. Each render size is a DLSS mode on the Series S output of 1080 lines (play-nvidia.ps1 $dlssScale), so -SeriesS -Dlss <mode> expresses it exactly. No new runtime switch is needed:

  • Ultra performance (1/3) gives 640x360.
  • Performance (1/2) gives 960x540.
  • Quality on Series S (its own 2/3) gives 1280x720.
Card memory Pick Source
under 5.5 GB Series S 640x360, DLSS Ultra performance (no DLSS: -Resolution 540), no frame generation Darner (player reports). Not measured by Mandy
5.5 to 9 GB Series S 960x540, DLSS Performance, frame generation Auto (2x on RTX 40/50) Render: Darner (measured there on an RTX 2070 SUPER 8 GB; more headroom on 8 GB). Frame generation: ours (RTX 4070 Laptop 8 GB, 15-18 fps, 2x shows about 30, one PC)
9 to 14 GB Series S 1280x720, DLSS Quality, frame generation Auto Both: Darner's tier 2; we run Series S on an RTX 3080 10 GB and an RTX 5070 12 GB (d3d12/docs/findings.md)
14 to 20 GB Series X 1440p, frame generation Auto Both: ours measured an RTX 4060 Ti 16 GB 16-18 fps (README) and an RX 6800 16 GB 14-16 fps. See the note below on how 1440p is expressed
20 GB and more Series X, DLSS Quality, frame generation Auto Ours: RTX 3090 24 GB, Series X DLSS Quality 26.5-32.8 fps against 20.6-24.5 at 1440 held (#3312 comment 8164)

Series X 1440p is the closest existing setting, not Darner's exact one. It uses our Series X defaults: 2560x1440 output, with the game's own upscaler rendering 1080 to 1440 lines. Darner renders 1440 natively with DLSS Quality. We kept the defaults because 1440 lines held is slower here (66-68 ms against 57-60, README) and because that is the setting we measured.

Caps and adjustments:

  • 16 GB of RAM or less: tier 1, Series S 960x540 DLSS Performance. This is Darner's cap; here the Series X profile alone also commits about 59 GB.
  • Laptop cards: at most tier 2 (Series S 1280x720). Source: Darner, not measured by us.
  • RTX 20/30: no tier lowering. Our 3090 run plays Series X. They only lose DLSS frame generation, which they do not have.
  • AMD, Intel and GTX: no DLSS and no frame generation, with their tier's profile. FSR 3 stays a manual choice; it is not measured as a default.
  • Unknown memory: treated as tier 1.

Risk to know about: on 2026-12-01 a Series X + DLSS Quality run on a 4070 Laptop drew a black scene. The 3090 run on 12-03 was fine. Tier 4 only reaches 20 GB+ cards.

The summary line names the render, for example "Series S 960x540, DLSS Performance, frame generation Auto (8 GB card, 40 GB of RAM)".

Tests

  • python -I tests/test_leonida_launcher.py: 251 tests OK (1 skipped). The new AutoPresetTests (11) cover:
    • the DLSS mode of each tier, and the switches -SeriesS -Dlss performance and -SeriesS -Dlss quality
    • the 5.5 / 9 / 14 / 20 GB edges
    • the 16 GB RAM cap, the laptop cap, RTX 20/30, and AMD, Intel and GTX without DLSS
    • an unknown card, and picking the card among several
    • the summary line and apply_auto (Windows: no -SeriesX)
    • the first start applied once, never over saved settings (a pre-existing file, a re-saved file), the installed app's repo-only file, and nothing off Windows
  • python -I tests/test_docs_links.py, tests/test_text_write_line_endings.py, tests/test_win_launchers.py: OK.
  • python -I scripts/check_no_game_data.py on the changed files: clean.
  • play-nvidia.ps1 is unchanged.

Screenshots

Taken on the launcher window alone (the game was not started), in English, with a temporary APPDATA and a fake game folder, on an RTX 4070 Laptop 8 GB. Shown: the Play card's first-start line, the Settings page with the Preset row, and the page after Auto (recommended). They are not attached here; they are available on request.

docs/launcher.md documents the preset and the tier table.

AI-assisted (Claude Code). No GPU run is needed for the logic; nothing in-game was tested.

🤖 Generated with Claude Code

Item: **LAUNCHER-AUTO-DETECT** (claimed in #3312). **Launcher change: needs OreoFR's review.** Please do not merge without it. ## What - **Settings > Picture > Preset**: an **Auto (recommended)** button sets the profile, DLSS, the DLSS mode, the resolution and frame generation for this PC. The line under it says what Auto picks here. Nothing is saved until **Save**. - **First start** (no settings saved yet, or only the installed app's repository): the launcher applies Auto once and saves it with a new `auto_offered` key. The Play card then says what was picked in one line, with **Change**, which opens Settings. - **Never over a player's settings**: a `launcher.json` from before this change (no `auto_offered` key) counts as the player's own and is never replaced. After the first start, Auto runs only when the player presses the button. - The card comes from what the launcher already reads (the display class: `DriverDesc`, `qwMemorySize`, the same values `play-nvidia.ps1` reads). The judged card is the one with the most memory among those the Graphics card list names. RAM comes from `GlobalMemoryStatusEx`, which Settings already uses. No new probes. - Pure, testable functions: `auto_tier`, `auto_card`, `auto_pick(vram, ram, name)`, `apply_auto`, `auto_summary`, `auto_first_start`. - Strings go through `t()`, with fr, de, es and pt updated. The UI uses the launcher's dark theme, its `QuietButton` and its muted rule-note lines. ## Why On a first start the launcher defaults to Series X. That profile crashes or crawls on 8-12 GB cards and on 16 GB RAM PCs. Darner shows a first-start pick from the card's memory; this does the same with our own numbers wherever we have them. ## Tiers The tiers are a mix of Darner's and ours, as OreoFR chose. They are after Darner (TrustNo1/Darner, GPL-3.0-or-later) `crates/darner-gpu/src/rig.rs`, commits `fa6e1e1`..`cb4bc0d` (merge `0a4c1d2`), first-start offer `c992532`, mixed with Mandy's own measurements. Tiers are cut on the card's own memory (`qwMemorySize`). Darner cuts on the DXGI budget (about 93 % of the card), but the same cut-offs fall between the sizes cards are sold in. **Render sizes come from existing settings only.** Each render size is a DLSS mode on the Series S output of 1080 lines (`play-nvidia.ps1` `$dlssScale`), so `-SeriesS -Dlss <mode>` expresses it exactly. No new runtime switch is needed: - Ultra performance (1/3) gives 640x360. - Performance (1/2) gives 960x540. - Quality on Series S (its own 2/3) gives 1280x720. | Card memory | Pick | Source | |---|---|---| | under 5.5 GB | Series S 640x360, DLSS Ultra performance (no DLSS: `-Resolution 540`), no frame generation | **Darner** (player reports). **Not measured by Mandy** | | 5.5 to 9 GB | Series S 960x540, DLSS Performance, frame generation Auto (2x on RTX 40/50) | **Render: Darner** (measured there on an RTX 2070 SUPER 8 GB; more headroom on 8 GB). **Frame generation: ours** (RTX 4070 Laptop 8 GB, 15-18 fps, 2x shows about 30, one PC) | | 9 to 14 GB | Series S 1280x720, DLSS Quality, frame generation Auto | **Both**: Darner's tier 2; we run Series S on an RTX 3080 10 GB and an RTX 5070 12 GB (`d3d12/docs/findings.md`) | | 14 to 20 GB | Series X 1440p, frame generation Auto | **Both**: ours measured an RTX 4060 Ti 16 GB 16-18 fps (README) and an RX 6800 16 GB 14-16 fps. See the note below on how 1440p is expressed | | 20 GB and more | Series X, DLSS Quality, frame generation Auto | **Ours**: RTX 3090 24 GB, Series X DLSS Quality 26.5-32.8 fps against 20.6-24.5 at 1440 held (#3312 comment 8164) | **Series X 1440p is the closest existing setting, not Darner's exact one.** It uses our Series X defaults: 2560x1440 output, with the game's own upscaler rendering 1080 to 1440 lines. Darner renders 1440 natively with DLSS Quality. We kept the defaults because 1440 lines held is slower here (66-68 ms against 57-60, README) and because that is the setting we measured. Caps and adjustments: - **16 GB of RAM or less**: tier 1, Series S 960x540 DLSS Performance. This is **Darner's** cap; here the Series X profile alone also commits about 59 GB. - **Laptop cards**: at most tier 2 (Series S 1280x720). Source: **Darner**, not measured by us. - **RTX 20/30**: no tier lowering. Our 3090 run plays Series X. They only lose DLSS frame generation, which they do not have. - **AMD, Intel and GTX**: no DLSS and no frame generation, with their tier's profile. FSR 3 stays a manual choice; it is **not measured** as a default. - **Unknown memory**: treated as tier 1. Risk to know about: on 2026-12-01 a Series X + DLSS Quality run on a 4070 Laptop drew a black scene. The 3090 run on 12-03 was fine. Tier 4 only reaches 20 GB+ cards. The summary line names the render, for example "Series S 960x540, DLSS Performance, frame generation Auto (8 GB card, 40 GB of RAM)". ## Tests - `python -I tests/test_leonida_launcher.py`: 251 tests OK (1 skipped). The new `AutoPresetTests` (11) cover: - the DLSS mode of each tier, and the switches `-SeriesS -Dlss performance` and `-SeriesS -Dlss quality` - the 5.5 / 9 / 14 / 20 GB edges - the 16 GB RAM cap, the laptop cap, RTX 20/30, and AMD, Intel and GTX without DLSS - an unknown card, and picking the card among several - the summary line and `apply_auto` (Windows: no `-SeriesX`) - the first start applied once, never over saved settings (a pre-existing file, a re-saved file), the installed app's repo-only file, and nothing off Windows - `python -I tests/test_docs_links.py`, `tests/test_text_write_line_endings.py`, `tests/test_win_launchers.py`: OK. - `python -I scripts/check_no_game_data.py` on the changed files: clean. - `play-nvidia.ps1` is unchanged. ## Screenshots Taken on the launcher window alone (the game was not started), in English, with a temporary `APPDATA` and a fake game folder, on an RTX 4070 Laptop 8 GB. Shown: the Play card's first-start line, the Settings page with the Preset row, and the page after **Auto (recommended)**. They are not attached here; they are available on request. `docs/launcher.md` documents the preset and the tier table. AI-assisted (Claude Code). No GPU run is needed for the logic; nothing in-game was tested. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Settings > Picture gets a Preset row: "Auto (recommended)" sets the profile, DLSS, its mode, the resolution and
frame generation from the chosen card's memory (qwMemorySize, as play-nvidia.ps1 reads it) and the PC's RAM
(auto_pick, pure). At the first start (no settings saved yet, or only the installed app's repository) the launcher
applies it once, saves auto_offered, and the Play card says what it picked in one line with Change to open
Settings. A settings file from before the preset is the player's own and is never replaced.

Tiers after Darner (TrustNo1/Darner, GPL-3.0-or-later) rig.rs, commits fa6e1e1..cb4bc0d; adjusted to Mandy's own
measurements: under 5.5 GB Series S DLSS Ultra performance (Darner's player reports, not measured here); 5.5-14 GB
Series S (4070 Laptop 8 GB, 3080 10 GB, 5070 12 GB); 14-20 GB Series X defaults (4060 Ti 16 GB, RX 6800); 20 GB and
more Series X DLSS Quality (RTX 3090 24 GB, #3312 comment 8164). 16 GB of RAM or less and laptop cards stay on
Series S; AMD, Intel and GTX get no DLSS and no frame generation; RTX 20/30 keep their tier without DLSS frame
generation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OreoFR's choice for #3405: under 5.5 GB Series S DLSS Ultra performance (640x360, no frame generation); 5.5-9 GB
Series S DLSS Performance (960x540, Darner's render) with frame generation Auto (Mandy's 8 GB run); 9-14 GB Series S
DLSS Quality (1280x720); 14-20 GB Series X 1440p (its defaults); 20 GB and more Series X DLSS Quality (Mandy's RTX
3090). 16 GB of RAM or less gives the 960x540 tier, a laptop card at most the 720 one. The renders are the DLSS modes'
on the Series S output (-SeriesS -Dlss <mode>), so no new switch. The summary line names the render.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A dark read-only menu (the Settings page's combobox style) at the top of the
rail's bottom-left corner picks main or beta. Beta lives in a second copy of
its own beside the main one (<main copy>-beta, setting beta_dir), cloned with
git clone --branch beta the first time, after one question in the launcher's
dark dialog; the launcher then restarts on it (setting channel) and shows a
violet Beta mark. Picking main restarts on the main copy at once and never
touches the beta copy. Update Mandy updates the copy in use along its branch
(beta in the beta copy), with the existing rewritten-history backup.

Beta's caches go to the data folder + "-beta"; the saves stay shared (PLAY
sets LEONIDA_DATA_DIR to main's <data>/data on beta unless Advanced names
one). Copy my info and the bug report name the branch, and on beta add
"Channel: beta" and BETA.md's "Built on ..." line. A custom branch set in
Settings is shown as the menu's value, main and beta stay the choices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ttk combobox (grey box, native arrow, square list) becomes a pill drawn
on a canvas: the launcher's surface, a thin border, a coloured dot, the
branch's name and a thin chevron; on beta the border, dot and name take the
violet accent, so the separate Beta tag is gone. It spans the status column.

A click (or Enter, Space, Down) opens a borderless popup above it with round
corners (transparent outside them on Windows), a hover highlight, a check
mark on the branch in use and "changes under test" under beta; Up/Down/Enter
choose, Escape, a click outside or another program taking the focus close it.
The choice runs the same pick_branch as before (question, two folders,
restart). branch_menu_rows and menu_step hold the popup's logic, with tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both features kept: the branch menu's and the Auto preset's strings in
every i18n file, BranchMenuTests and AutoPresetTests side by side.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#3414 picked the main or beta copy at import time under a module-level
`if __name__ == "__main__":`. tests/test_tool_stdout_encoding.py takes the
first such block of each program as its entry point and requires it to set
errors="replace" on stdout, so the launcher failed it. Same condition, named.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OreoFR merged commit 4d9e4d05dc into main 2026-12-04 01:59:36 +00:00
Author
Member

Merging #3405 together with #3414 (one combined change, OreoFR's request). Head f1816133b (#3405 ba0fc18d4 + #3414 8a45789ce + main 22c68311d merged in + one fix), main 22c68311d → 4d9e4d05d. #3414 is shown merged by the same merge.

Local CI run by the merger on the head merged into current main (scripts/local_ci.py, quick mode): PASS, no failure.

Step Result
Merge into main clean
No game data tracked PASS (3831 files)
No game data under another name PASS
D3D12 runtime (Rust) SKIP (quick: launcher only)
Compile Python PASS
make_game.py --help PASS
Python tests (standard library) PASS
Python tests (pytest) SKIP (pytest not installed)
Sensitive files unchanged PASS

The first CI run on the combined head (edd8922ce) FAILED tests/test_tool_stdout_encoding.py: #3414 picked the main/beta copy under a second module-level if __name__ == "__main__":, which that test reads as the launcher's entry point. Fixed in f1816133b (same condition, named RUN_AS_PROGRAM); test_leonida_launcher 263 OK (BranchMenuTests + AutoPresetTests), i18n JSON valid.

Launcher change approved by OreoFR (maintainer, launcher owner). Auto preset tiers: mix of Darner's and Mandy's measured settings (table in docs/launcher.md); laptop cards capped at Series S 720p as OreoFR asked. Game not launched.

AI-assisted (Claude Code).

Merging #3405 together with #3414 (one combined change, OreoFR's request). Head f1816133b (#3405 ba0fc18d4 + #3414 8a45789ce + main 22c68311d merged in + one fix), main 22c68311d → 4d9e4d05d. #3414 is shown merged by the same merge. Local CI run by the merger on the head merged into current main (`scripts/local_ci.py`, quick mode): PASS, no failure. | Step | Result | |---|---| | Merge into main | clean | | No game data tracked | PASS (3831 files) | | No game data under another name | PASS | | D3D12 runtime (Rust) | SKIP (quick: launcher only) | | Compile Python | PASS | | make_game.py --help | PASS | | Python tests (standard library) | PASS | | Python tests (pytest) | SKIP (pytest not installed) | | Sensitive files unchanged | PASS | The first CI run on the combined head (edd8922ce) FAILED `tests/test_tool_stdout_encoding.py`: #3414 picked the main/beta copy under a second module-level `if __name__ == "__main__":`, which that test reads as the launcher's entry point. Fixed in f1816133b (same condition, named `RUN_AS_PROGRAM`); `test_leonida_launcher` 263 OK (BranchMenuTests + AutoPresetTests), i18n JSON valid. Launcher change approved by OreoFR (maintainer, launcher owner). Auto preset tiers: mix of Darner's and Mandy's measured settings (table in docs/launcher.md); laptop cards capped at Series S 720p as OreoFR asked. Game not launched. AI-assisted (Claude Code).
Sign in to join this conversation.
No description provided.