SteamOS game mode: launch lane docs + name the gamescope WSI cause once #561

Manually merged
github merged 3 commits from github-bot/gh-561 into main 2026-12-05 17:30:02 +00:00 AGit
Owner

@⁠Danneman92 on GitHub · 2026-12-05 07:20 UTC · original
Danneman92:steam-os-game-mode → main · +121 −0 · 3 files · 3 commits · merged 2026-12-05 17:25 UTC

What

Running the title from a Steam library shortcut in SteamOS game mode fails with a black window while audio plays: CreateSwapChainForHwnd ... hr -2147024809 / no swap chain error=Invalid parameter on every attempt. Root-caused by diffing a working shell launch against Steam's: Steam injects ENABLE_GAMESCOPE_WSI=1 + GAMESCOPE_WAYLAND_DISPLAY=gamescope-0 (forcing the gamescope Wayland WSI surface), the two ENABLE_VK_LAYER_VALVE_steam_* layers, and LD_PRELOAD=gameoverlayrenderer.so. With those neutralised the swap chain builds on the first attempt over plain XCB (:1), and the title runs in-game (0 failures vs ~1,670; steady frames, 8.6M draws).

Commits

  1. docs - new docs/STEAMOS.md (the :0/:1 Xwayland split, valid VICTORY_OUTPUT modes for the fixed 1280x800 game-mode session, the env to neutralise incl. VK_LAYER_FROG_gamescope_wsi, a worked wrapper, and the kernel GTT requirement with the SteamOS boot-config location) + a short README section.
  2. victory-gpu - when swap chain creation fails while the WSI vars are active, log one extra warn naming the cause and the fix, once per process. Silent when the WSI path is off.

Measured on a ROG Ally X (Z1 Extreme, 24 GB, SteamOS, 1280x720 / series-s, kernel amdgpu.gttsize=16384 ttm.pages_limit=4194304).

Testing

The docs are measured behaviour from that machine.

Commit 2 (cargo check -p victory-gpu --target x86_64-pc-windows-msvc, rustc 1.98.1, the repo's pinned toolchain) compiles clean on the x86_64-pc-windows-msvc target - the only diagnostic emitted is a pre-existing room_lately is never used warning in resource.rs, unrelated to this change. It is a self-contained addition to one error arm: no imports, no behaviour change, silent whenever the gamescope WSI path is off. Being its own commit, it can be dropped without touching the docs commit.

**@⁠Danneman92** on GitHub · 2026-12-05 07:20 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/561) `Danneman92:steam-os-game-mode` → `main` · +121 −0 · 3 files · 3 commits · merged 2026-12-05 17:25 UTC ## What Running the title from a Steam library shortcut in SteamOS game mode fails with a black window while audio plays: `CreateSwapChainForHwnd ... hr -2147024809` / `no swap chain error=Invalid parameter` on every attempt. Root-caused by diffing a working shell launch against Steam's: Steam injects `ENABLE_GAMESCOPE_WSI=1` + `GAMESCOPE_WAYLAND_DISPLAY=gamescope-0` (forcing the gamescope Wayland WSI surface), the two `ENABLE_VK_LAYER_VALVE_steam_*` layers, and `LD_PRELOAD=gameoverlayrenderer.so`. With those neutralised the swap chain builds on the first attempt over plain XCB (`:1`), and the title runs in-game (0 failures vs ~1,670; steady frames, 8.6M draws). ## Commits 1. **docs** - new `docs/STEAMOS.md` (the `:0`/`:1` Xwayland split, valid `VICTORY_OUTPUT` modes for the fixed 1280x800 game-mode session, the env to neutralise incl. `VK_LAYER_FROG_gamescope_wsi`, a worked wrapper, and the kernel GTT requirement with the SteamOS boot-config location) + a short README section. 2. **victory-gpu** - when swap chain creation fails while the WSI vars are active, log one extra warn naming the cause and the fix, once per process. Silent when the WSI path is off. Measured on a ROG Ally X (Z1 Extreme, 24 GB, SteamOS, 1280x720 / series-s, kernel `amdgpu.gttsize=16384 ttm.pages_limit=4194304`). ## Testing The docs are measured behaviour from that machine. Commit 2 (`cargo check -p victory-gpu --target x86_64-pc-windows-msvc`, rustc 1.98.1, the repo's pinned toolchain) compiles clean on the `x86_64-pc-windows-msvc` target - the only diagnostic emitted is a pre-existing `room_lately is never used` warning in `resource.rs`, unrelated to this change. It is a self-contained addition to one error arm: no imports, no behaviour change, silent whenever the gamescope WSI path is off. Being its own commit, it can be dropped without touching the docs commit.
Launching from a Steam library shortcut in game mode composites through
gamescope and Steam's Vulkan/overlay environment; without cleaning that out the
swap chain never builds and the window stays black with audio playing.

docs/STEAMOS.md covers the :0/:1 Xwayland split (never pin DISPLAY), the valid
VICTORY_OUTPUT modes for the fixed 1280x800 game-mode session, the four Steam
injections to neutralise plus the FROG WSI layer, a worked wrapper example, and
the kernel GTT requirement with the SteamOS boot-config location. README gets a
short section linking it. Measured on a ROG Ally X (Z1 Extreme, 24 GB, 1280x720
series-s).
When Steam launches the title in game mode, ENABLE_GAMESCOPE_WSI and
GAMESCOPE_WAYLAND_DISPLAY are set and vkCreateSwapchainKHR fails on every
attempt; the only evidence is this warn repeating. Emit one extra warn naming
the suspect and what to unset, once per process. Stays silent when the WSI
path is off, so normal runs are unchanged.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 07:21:34 +00:00
The ESP's grub.cfg is the only file this boot path reads (not /etc/default/grub;
grub-mkconfig writes nothing that gets used), its kernel lines are indented
inside 'steamenv_boot', and a sed anchored on ^linux silently matches nothing.
Spell out the copy-pasteable command, the verification, and the
/proc/cmdline-after-reboot check.
github manually merged commit 3baccb413b into main 2026-12-05 17:30:02 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.