Repository navigation
Gamescope payload 20261101.3: Xwayland attaches a game's shared-memory segment through the sysvshm server - #2312
utkarshdalal wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Update payload version app/src/main/java/app/gamenative/display/GamescopePayload.kt |
GamescopePayload.VERSION changes to 20261101.3. |
Estimated code review effort: 1 (Trivial) | ~2 minutes
Change: Bug fix
Possibly related PRs
- utkarshdalal/GameNative#2311: This PR continues the same Gamescope payload version line and supersedes
#2311.
Suggested reviewers: joshuatam
Merge Risk: 
Minimal · up to d3588
-
The selected payload revision is intentional and available from both hosts. No actionable merge risk is established.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.
Full details: Description check
-
Explanation
The description follows the repository template and is substantive. It explains the tearing bug under gamescope, the cause (Xwayland's shmat() only knows segment ids the calling process created), the fix (fd request from the sysvshm server plus glamor finish before present), and the payload contents and checksum. It includes before/after measurements in a table. The Type of Change selection is correct (Bug fix). Two checklist items are not checked: 'I have attached a recording of the change' is unchecked, although the Recording section gives a local file path. That path is not an attachment, and a local path on the author's machine is not accessible to reviewers. The Recording section also needs an attached GIF or video. The 'discussed in
#code-changes' item is checked, but the description does not say whether that discussion happened. The description is otherwise complete, so the check passes with minor gaps.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
…y segment through the sysvshm server Under gamescope, GL games on the xlib software winsys tore horizontally: Xwayland refused the game's MIT-SHM segment, Xlib fell back to XPutImage in 15 row bands per frame, and Xwayland committed between bands. Xwayland now fetches the segment's fd from the app's sysvshm server and attaches it (GameNative/xserver#2, on top of #1). Payload = 20261031.3 + bin/Xwayland; nothing else in the payload changes.
effc01d to
d358883
Compare
Description
GL games on the xlib software winsys (SteamWorld Dig 2 is the reporter case) tore horizontally under gamescope: Xwayland refused the game's MIT-SHM segment with BadAccess, Xlib fell back to
XPutImagein 15 row bands of 1280x51 per frame, and Xwayland committed between bands. Cause: Xwayland preloads the container'slibandroid-sysvshm.so, whoseshmat()only knows ids the calling process created. Fix (GameNative/xserver#2, on top of GameNative/xserver#1): when the SysV attach fails, Xwayland asks the app's sysvshm server for the segment's fd and attaches it like an fd-passed segment; and Xwayland finishes glamor's GPU work before each present since the stack has no implicit sync. Frames now arrive as oneXShmPutImage. No change to the container, its shm library, the game process, gamescope, or the daemon.This PR is only the payload version bump. Payload
gamescope-gamenative-20261101.3.tzst= shipped 20261031.3 +bin/Xwayland(xserver bd9c2cdd4, gamescope CI 41314597152, sha 4dded856); every other member is byte-identical to 20261031.3. Size 14290138 B, sha2564c5ac792fc9fef9a3e5b3e65343836d5fdfb02ca724eaab7fbe868d30a70d551, uploaded and verified on the CDN.Measured on a Retroid Pocket 6 (SWD2, same scripted map-toggle scene, 30 s screenrecord, tear detector, pristine container, shipped gamescope 20261031.3 and the master daemon on both sides; only
bin/Xwaylanddiffers):Second fix run on the same stack: 0 tears / 1810 frames, 59.99 fps. Log on the fix side:
(II) gn: ShmAttach: SysV id 6 (3686400 bytes) attached via the sysvshm server; Xwayland maps the segment (/dev/ashmem/sysvshm-6).Also measured with gamescope#26 (A52 disabled) and this Xwayland: 0 tears, but the 60 cap is not held (63.9 fps, frame intervals 8/17/25 ms mixed) — the tear fix does not depend on A52; the cap does.
Recording
Control and fix recordings:
~/workspace/gn-testlogs/swd2-tearing-20261101/xwl_shmem/{control3,fix5}/rec30.mp4.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 CodeRabbit