Skip to content

0021: Steam runs in its own nested Gamescope

Status: Accepted (owner, 2026-11-24). Proposed (my call, 2026-11-16)

Context

Steam in Big Picture mode (-gamepadui) acts as it does on a Steam Deck: it tags its own windows STEAM_GAME 769 and drives Gamescope's focus atoms itself. 769 is also the shell's appid on our screen (the runner's focus, ADR 0015's screen). Tried on the host under a throwaway screen: Steam's windows came up as the shell's, its main window stayed 200x200 and nothing showed, with or without XDG_CURRENT_DESKTOP=gamescope. Options: change the shell's appid and let the runner retag Steam's windows (a fight with Steam, which sets them again and also tags the games it starts); hide Gamescope from Steam (the atoms sit on the shared X server, so it cannot be hidden); give Steam a Gamescope of its own, as on a Deck and as Wildlife's Steam image does.

Decision

The Steam image installs Gamescope at the screen's pinned version and start.sh runs Steam inside it (--backend sdl -e, 1920x1080), with a private XDG_RUNTIME_DIR so the screen's gamescope-0 socket stays out of Steam's sight. Gamescope's file capability is removed in the image, because the container has no SYS_NICE and exec of a file-capability binary fails without it.

Consequences

The runner sees one window from the Steam container and tags it like any app; Steam and its games stay inside. Tried on the host: Big Picture full screen at the sign-in page, about 900 MB. Steam needs the runner's IpcMode: host (its web helper failed to allocate shared memory without it). Games render at 1080p and the screen scales them; no realtime priority for the inner Gamescope. A stop asks Steam to shut down (steam.sh -shutdown) before Gamescope goes, so an update or a cloud sync is not cut off; on the host Steam was gone in 3 s, inside the runner's 15 s. The Steam client updates itself inside its profile: the one download we do not pin (only Valve's launcher is pinned). Games install into the profile folder under the data folder, with no disk check after the install; a separate library folder is an open question for the owner. Not yet checked: pads, sound, a game.

Leaving Big Picture ("Exit Big Picture", "Switch to Desktop") shows the desktop client, which a pad cannot drive, so the screen looked locked. keep-big-picture runs beside Steam on the nested display: when it sees the desktop window ("Steam") and no Big Picture window two looks in a row (5 s apart), it asks Steam to open Big Picture again (steam.sh steam://open/bigpicture).

Big Picture's power menu ("Turn off", "Restart", "Sleep") calls logind (org.freedesktop.login1.Manager) on the system bus. The container has none, so Steam logged "failed to connect to login1", hid its UI and waited: a dark screen with only Steam's screensaver. couchdogs-steam-session now starts a private bus (DBUS_SYSTEM_BUS_ADDRESS) and power-service, a stand-in that answers the Can* queries and turns every power action into steam.sh -shutdown, so the container ends and the runner shows the screen's Home. Every call it gets is logged, so a method Steam needs that it lacks shows in the app's log. Checked in a throwaway container against the Steam image; not yet with real Steam.