Skip to content

Gamescope payload 20261101.1: flip events at SurfaceFlinger latch, Xwayland finishes GPU work before presenting - #2311

Closed
utkarshdalal wants to merge 2 commits into
masterfrom
gamescope-payload-20261101-1
Closed

utkarshdalal wants to merge 2 commits into
masterfrom
gamescope-payload-20261101-1

Conversation

@utkarshdalal

@utkarshdalal utkarshdalal commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Description

Points the app at payload gamescope-gamenative-20261101.1.tzst and ships the gamenative-drm daemon that reports page flips at SurfaceFlinger's latch.

Two tearing bugs under gamescope, both measured on the Retroid Pocket 6:

  1. Cursor-showing games tear and crawl (Two Point Campus class). With the cursor on its own plane (A55) the game's buffer is scanned out directly, and the daemon reported the flip at apply time, so gamescope handed the buffer back to the game while the panel was still showing it. Fix: the daemon sends the flip event when SurfaceFlinger latches the frame (daemon: send the page-flip event when SurfaceFlinger latches the frame GameNative/gamenative-drm#40) and gamescope releases the framebuffers a flip replaced at the next flip (A56, android: A56 release the framebuffers a flip replaced at the next flip; CI builds the Xwayland implicit-sync fix GameNative/gamescope#25). Blazing Chrome at the 60 cap: 59.5 fps, no stalls.
  2. GL games tear (SteamWorld Dig 2). Xwayland assumed implicit sync and committed the window buffer while glamor's upload of the frame was still running. Fix: Xwayland finishes its GPU work before each present on gamenative-drm (xwayland: treat implicit sync as unsupported on gamenative-drm GameNative/xserver#1). Same scripted motion: 0 tears in 25 s, against 23 on the shipped build.

Payload uploaded 2026-11-01 to https://downloads.gamenative.app/gamescope-gamenative-20261101.1.tzst, re-downloaded and verified: sha256 d4e674a5af358a0baae95a24be74154c240892cfbc03a90203918f31400d4997, 14292391 bytes. It is the shipped 20261031.3 with two members replaced (1014 members):

member from
bin/gamescope GameNative/gamescope a56-release-one-flip-later @ 68241ca (A56), CI run 41304925663, md5 6c4d06a5c6060046ec93b571f63ed399
bin/Xwayland GameNative/xserver xwayland-no-implicit-sync-gamenative @ d486914 built by the same run, md5 6d117df905d008162d75c52f9cc2d379 (links libxcvt.so like the shipped one)
app file from
jniLibs/arm64-v8a/libgamenative_drm.so GameNative/gamenative-drm scanout-flip-at-latch @ 6aded49, md5 e90fbdff817cc8307ceabd402118e23d

Not changed: the shim (lib/libadrenotools_gamescope.so), the FPS limiter, the cursor plane.

Recording

None attached; recordings and tear analysis under the RP6 test logs (swd2-tearing-20261101).

Type of Change

  • Bug fix
  • Performance / stability improvement
  • Compatibility improvements
  • Other (requires prior approval)

Checklist

  • If I have access to #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.
  • This change aligns with the current project scope (core functionality, stability, or performance). If not, it has been explicitly approved beforehand.
  • I have attached a recording of the change.
  • I have read and agree to the contribution guidelines in CONTRIBUTING.md.

Summary by cubic

Points the app at gamescope payload 20261101.1 to fix two tearing bugs on the Retroid Pocket 6. The gamenative-drm daemon now sends the page-flip event when SurfaceFlinger latches the frame instead of at apply time, so gamescope releases replaced framebuffers one flip later; Xwayland finishes its GPU work before each present instead of assuming implicit sync.

Verification

  • Payload is the shipped 20261031.3 with only gamescope, Xwayland, and libgamenative_drm.so replaced; verified by sha256 d4e674a5af358a0baae95a24be74154c240892cfbc03a90203918f31400d4997.
  • At a 60 fps cap: Blazing Chrome runs at 59.5 fps with no stalls; SteamWorld Dig 2 shows 0 tears in 25 s vs 23 on the shipped build.
  • No recording attached; tear analysis is under the RP6 test logs (swd2-tearing-20261101).

Written for commit 2f9aff5. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • Chores
    • Updated the Gamescope version to 20261101.1.

Utkarsh Dalal added 2 commits November 1, 2026 17:37
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 38283de8-5d91-40c3-a96d-8b1e1019bf46
Commits

Reviewing files that changed from the base of the PR and between 0352ca8 and 2f9aff5.

Files ignored due to path filters: 1
  • app/src/main/jniLibs/arm64-v8a/libgamenative_drm.so is excluded by !**/*.so
Files selected for processing: 1
  • app/src/main/java/app/gamenative/display/GamescopePayload.kt

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The change updates GamescopePayload.VERSION from 20261031.3 to 20261101.1.

Changes: Gamescope payload

Layer / File(s) Summary
Update payload version
app/src/main/java/app/gamenative/display/GamescopePayload.kt
GamescopePayload.VERSION changes from 20261031.3 to 20261101.1.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Possibly related PRs

  • utkarshdalal/GameNative#2298: This PR defines panel-latch timing changes related to the Gamescope payload's flip-stamping and Xwayland presentation fixes.

Suggested reviewers: joshuatam

Merge Risk: Minimal · up to 2f9af

No actionable merge-blocking risk is identified in this version-only change.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the payload version and the two main fixes: SurfaceFlinger latch flip events and Xwayland GPU synchronization before presentation.
Description check Passed The description follows the required structure and provides detailed change context, validation results, change type, and checklist status. It explicitly states that no recording is attached and leave…
Docstring Coverage Passed 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. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description follows the required structure and provides detailed change context, validation results, change type, and checklist status. It explicitly states that no recording is attached and leaves the recording and code-change discussion checklist items unchecked.

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.

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.

Share

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@utkarshdalal
utkarshdalal marked this pull request as draft November 1, 2026 12:34
@utkarshdalal

Copy link
Copy Markdown
Owner Author

Draft: the Xwayland implicit-sync change reduces but does not remove the GL tear (6 flagged tears / 25 s against 23 on the shipped build in the end-to-end test of this payload). The remaining cause is measured: the guest's MIT-SHM attach is refused by the container sysvshm library, so each frame reaches Xwayland as 15 PutImage bands and commits land between them. A sysvshm fix follows; the DXVK-path changes (daemon flip at latch + A56) are unaffected.

@utkarshdalal

Copy link
Copy Markdown
Owner Author

Superseded by the payload 20261101.2 PR (same branch contents plus the Xwayland from GameNative/xserver#2, which fixes the GL tear this payload still had). Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant