Repository navigation
Run gamescope sessions on Wine's root desktop with Proton 11 or newer - #2431
Closed
utkarshdalal wants to merge 1 commit into
Closed
utkarshdalal wants to merge 1 commit into
utkarshdalal wants to merge 1 commit into
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
What: when a game session runs under the gamescope display server and the container's Wine build is Proton 11 or newer, the game is launched with
wine explorer /desktop=root,<WxH>instead of/desktop=shell,<WxH>. The game then runs on Wine's root desktop as managed top-level windows instead of inside Wine's virtual desktop. In the same case the gamescope process is started withGAMENATIVE_ROOT_DESKTOP=1(added inapplyGamescopeEnv, whose environment is the one gamescope is exec'd with). Everything else is unchanged: X11 sessions, pre-install steps (which always run on X11) and gamescope sessions on older Proton builds keep the exact same launch line and environment.Why: gamescope is a window manager and expects each game window to be a top-level X window. Under the virtual desktop the game's window is a child of Wine's desktop window, which is what several of the port patches in GameNative/gamescope compensate for. Companion PR: the GameNative/gamescope draft that reads
GAMENATIVE_ROOT_DESKTOPto switch off the patches that only serve the virtual-desktop model GameNative/gamescope#39 (GameNative/gamescope#39). The gamescope payload shipped today ignores the variable, so this PR is safe on the current payload;GamescopePayload.VERSIONand assets are unchanged.Why the Proton gate: without the virtual desktop, Wine needs winex11 built with libXi. The older builds (proton-9.0-arm64ec, proton-10.0-arm64ec-2) lack it and spin on a black screen, so they keep the virtual desktop. The check is a small
WineInfo.isProton11OrNewer()that reads the major version from the already-parsedWineInfo; names that fail to parse fall back to the bundled Wine and keep the virtual desktop.Tested on an AYN Odin 3 on 2026-11-15 with a build of master c6d9a86 plus the unconditional form of this launch change, gamescope payload 20261105.4 (all patches active):
Recording
No recording attached.
Type of Change
Checklist
#code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.CONTRIBUTING.md.Summary by cubic
Runs gamescope game sessions on Wine's root desktop with Proton 11 or newer, so game windows become top-level X windows that gamescope can manage directly instead of children of Wine's virtual desktop.
wine explorer /desktop=root,<WxH>; older builds keep/desktop=shell,<WxH>because theirwinex11lacks libXi and would hang on a black screen.GAMENATIVE_ROOT_DESKTOP=1in the gamescope environment so the companion GameNative/gamescope payload can disable virtual-desktop-only patches; the shipped payload ignores this variable, so behavior is unchanged there.Written for commit 95c1eda. Summary will update on new commits.