Skip to content

Run the Linux stock smokes' configs with waitMsec and exec_savepath - #81

Merged
themuffinator merged 1 commit into
themuffinator:mainfrom
danperisse-hue:port-linux-stock-smokes
Nov 27, 2026
Merged

themuffinator merged 1 commit into
themuffinator:mainfrom
danperisse-hue:port-linux-stock-smokes

Conversation

@danperisse-hue

Copy link
Copy Markdown
Contributor

Part of #75.

linux_wayland_stock_sp_smoke.py and linux_dedicated_stock_map_smoke.py set g_autoExecAfterMapLoad / g_autoExecAfterMapLoadDelayMs, which PREY's game library doesn't have, so their configs never ran. This ports them the way renderer_gameplay_benchmark.py was ported.

SP smoke

  • map game/roadhouse is followed by waitMsec 1000 and exec_savepath linux_wayland_stock_sp/save_and_load.cfg. That config saves, runs loadGame, then waitMsec 1000 and exec_savepath for the restored-game config.

Dedicated smoke

  • The client's connect is followed by waitMsec and exec_savepath for the capture config. The delay is a new --connect-settle-msec (default 8000).
  • waitMsec counts real time from the connect, and no buffered command runs while the map loads. With the default 8000 ms, the config runs after the client is in the map. The ordered-lifecycle check fails the run if it runs earlier.

Markers

  • "config executed" is the engine's execing <cfg> from fs_savepath.
  • "first active draw" is an echo each config prints after a few frames (the dedicated client's after --settle-frames). It is no longer a game-library observation; the openPR06: comments say so.
  • Map init from a savegame, map shutdown and game shutdown use the separator lines PREY's game library prints (------- Game Map Init SaveGame -------, --------- Game Map Shutdown ----------, ------------ Game Shutdown -----------). The openQ4 ones never matched.
  • The report and marker keys are unchanged, so verify_linux_arm64_release_evidence.py and linux_arm64_release_evidence read the reports as before.
  • openpr06_rebase_contract.py now checks that both smokes keep using waitMsec/exec_savepath and don't set the openQ4 cvars again.

BUILDING.md gets a short "Linux Stock Gameplay Smokes" section covering:

  • a headless Weston with --renderer=pixman (not noop);
  • ALSOFT_DRIVERS=null without an audio device;
  • GALLIUM_DRIVER=d3d12 on WSL;
  • a warning that WSL's d3d12 driver sometimes ended the process after 15 to 25 map loads, with or without saves.

On Windows with the NVIDIA driver, 5 laps of the six maps with a save and load each lap (35 loads) finish with GL and Vulkan. Dedicated GPU memory stays within 814-881 MB (GL) and 1714-1759 MB (Vulkan) after warm-up. On WSL, image memory per map is the same from lap to lap. This points to the WSL driver rather than a leak in the game.

Tested on WSL (Ubuntu 26.04, x64), headless Weston, RTX 3060 through d3d12, against a build of main at 5bf527e:

  • Both smokes pass three runs each: SP took 18 s and 47 s in the two timed runs, and the dedicated smoke about 23 s.
  • The SP log shows the whole sequence in order: active gameplay, Saved 'linux_wayland_roundtrip', the savegame load, Game Map Init SaveGame, the restored config, the screenshot and a clean shutdown.
  • linux_arm64_release_evidence, linux_dedicated_server_smoke_contract, openpr06_rebase_contract, suite_status_contract, docs_link_integrity and source_charset_integrity pass on Windows and WSL.

tools/debug/render_smoke.py is ported in #80. The Android smokes and tools/validation/stock_asset_baseline.py still set the cvar; I left them for a separate change.

linux_wayland_stock_sp_smoke and linux_dedicated_stock_map_smoke set
g_autoExecAfterMapLoad and g_autoExecAfterMapLoadDelayMs, openQ4 game-library
cvars that PREY's game library does not have. The engine ignored the set, the
configs never ran, and the client drew the map until the timeout (themuffinator#75).

As renderer_gameplay_benchmark.py does, the SP smoke now follows the map
command with waitMsec 1000 and exec_savepath, and the first config does the
same after loadGame for the second one. The dedicated client follows the
connect with waitMsec (--connect-settle-msec, default 8000) and
exec_savepath. waitMsec counts real time from the connect and buffered
commands wait while the map loads, so the config runs once the client is in
the map; the ordered-lifecycle check fails the run if it runs earlier.

The markers the smokes waited for came from the same openQ4 code. They now
check the engine's "execing <cfg> from fs_savepath" line, an echo each
config prints a few frames in for the active-gameplay marker, and the
separator lines PREY's game library prints for map init from a savegame,
map shutdown and game shutdown. The report and marker keys are unchanged,
so the ARM64 evidence verifier reads the reports as before.
openpr06_rebase_contract now checks that both smokes keep using
waitMsec/exec_savepath and do not set the openQ4 cvars again.

BUILDING.md gets a short section on running both smokes on a headless
Weston, with the pixman renderer, ALSOFT_DRIVERS=null and, on WSL,
GALLIUM_DRIVER=d3d12. It also notes that WSL's d3d12 driver sometimes ended
the process after 15 to 25 map loads, so long map-cycling runs there need
llvmpipe.
@themuffinator
themuffinator merged commit b7b1ada into themuffinator:main Nov 27, 2026
9 checks passed
themuffinator added a commit that referenced this pull request Nov 29, 2026
…round, and stop rewriting the config at launch

Ported from openPR06, the PREY port built on openQ4 (third round: pull
requests #53-#81 and issues #61-#78 by danperisse-hue).

- A deflated PK4 member keeps what it inflates once it is seeked (up to
  32 MiB), so a wave or model chunk scan no longer inflates the member again
  at every seek, and a seek to the current position does nothing (#53).
- Generated animation caches are built in memory and written, synced and
  closed by a writer thread, at most 16 files and 64 MiB queued; the main
  thread promotes them, and game shutdown waits for the queue (#54, as
  adapted to openQ4's version-3 cache in openPR06 a945a6b).
- idInternalCVar::Update flags CVAR_ARCHIVE only when the declaration makes
  a cvar archived, so a module registering archived cvars the config already
  set no longer rewrites openQ4Config.cfg on every launch (#63).
- idProgram::FindFreeResultDef finds a reusable <RESULT> temporary through a
  per-scope hash chain, newest first like the def list, instead of walking
  every result compiled so far (#64).
- Linux: the loose-directory memo runs on case-sensitive filesystems too,
  resolving case once per directory (#56); glibc malloc arenas are capped at
  two unless MALLOC_ARENA_MAX is set (#71); the fatal-breadcrumb directory is
  created like mkdir -p (#57).
- com_timestampPrints describes 1 as seconds and 2 as milliseconds (#60).
- Tests: filesystem_length_probe_contract follows the memo (#65),
  posix_memory_management checks the arena cap, and android_savepath
  extracts Posix_MkdirParents (openPR06 bd071e1).
- BUILDING.md: running the Linux stock smokes under a headless Weston (#81).

Prey-only or already in openQ4, and not ported: #48, #55, #59, #66-#68,
#70, #73, #74, #76, #77, #79, #80.

Co-authored-by: danperisse-hue <danperisse@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants