mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
feat: run Steam sessions on two Xwayland servers as SteamOS does (#344)
This commit is contained in:
1 parent
3278afaa1a
commit
9d0989374b
2 files changed
+66
-3
No files matched your search
@@ -159,7 +159,7 @@ restored): the session starts at `size=1280x720` and the device report shows `72
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- **Two Xwayland servers and per-game Game Resolution.** Still to verify: whether the client shows
|
||||
- **Two Xwayland servers and per-game Game Resolution** (done, see below). Was to verify: whether the client shows
|
||||
Game Resolution under game Properties in our session, the Android clipboard bridge for games on
|
||||
`:1`, and the drawer's live Force fullscreen toggle (it writes `GAMESCOPE_FORCE_WINDOWS_FULLSCREEN`
|
||||
only on `:0`'s root, and gamescope reads it per server). The client's devtools (port 8080 when
|
||||
@@ -177,3 +177,40 @@ Two temporary session-script hooks, not kept on this branch: `BL_STEAM_MAX_HEIGH
|
||||
`GAMESCOPE_STEAM_MAX_HEIGHT` on the root window, and `BL_GAME_XWAYLAND_MODE=WxH` wrote
|
||||
`GAMESCOPE_XWAYLAND_MODE_CONTROL = 1,W,H,0` five seconds after `GAMESCOPE_FOCUSED_APP` showed a
|
||||
game. `--xwayland-count 2` and `STEAM_MULTIPLE_XWAYLANDS=1` went through `Download/droiddeck-env`.
|
||||
|
||||
## Two Xwayland servers by default (`feat/steam-dual-xwayland`)
|
||||
|
||||
Steam sessions now start gamescope with `--xwayland-count 2` and `STEAM_MULTIPLE_XWAYLANDS=1`.
|
||||
`BL_XWAYLAND_COUNT=1` in `Download/droiddeck-env` goes back to one. The session script's
|
||||
root-window requests that are meant for the game (the drawer's live Force fullscreen,
|
||||
`GAMESCOPE_FORCE_WINDOWS_FULLSCREEN`, and the resume watcher's `GAMESCOPE_RESTORE_FOCUS_WINDOW`)
|
||||
go to both displays, `$DISPLAY` and `STEAM_GAME_DISPLAY_0`. gamescope reads both per server, so
|
||||
writing only to `:0` would have reached the Steam client and not the game.
|
||||
|
||||
Clipboard: gamescope copies a selection made on any of its Xwayland servers to all of them
|
||||
(`gamescope_set_selection`), so the Android text `droiddeck-clipboard` puts on `:0` reaches games
|
||||
on `:1` without changes here.
|
||||
|
||||
Device runs (Thor, no `droiddeck-env`):
|
||||
|
||||
| Run | Game | Game Resolution | Force fullscreen | Result |
|
||||
|---|---|---|---|---|
|
||||
| d1 | Alan Wake's American Nightmare | 1280x720 (set in Steam) | on | The client set `#1` to 1280x720 itself. 2 frame-size changes, `:1` steady at 10 dma-bufs, memory steady. No storm |
|
||||
| d2 | Alan Wake's American Nightmare | 1280x720 | on → off → on, live | `stretch games to fill the screen: 0 (live)` then `1`, written to both displays. Game stable |
|
||||
| d5 | 198X | default | off | The client set `#1` to native 1920x1080. Full screen, 60 fps |
|
||||
|
||||
Steam saves the per-game choice as `"ResolutionOverride2" "1280x720"` under the app in
|
||||
`userdata/<id>/config/localconfig.vdf`.
|
||||
|
||||
Checked by hand (2026-10-06, Thor, Force fullscreen off):
|
||||
- **FlatOut 2**, the game Force fullscreen was added for, does not shrink when the QAM opens over
|
||||
it and closes again. With the client's overlay on another X server, the game keeps its own X
|
||||
keyboard focus and never sees the deactivation that made it shrink.
|
||||
- Resume after the Steam menu: the resume watcher's restore request reaches both servers
|
||||
(`restore requested for focus window` logged once for the client's window and once for the
|
||||
game's).
|
||||
|
||||
Still to check by hand: pasting Android text into a game.
|
||||
|
||||
Force fullscreen is still unsafe without a matching Game Resolution: with the default (native),
|
||||
a game drawing at another size fights it as in run 4. It stays off by default.
|
||||
Reference in new issue
Block a user