Gamescope payload 20261029.1: glamor Mesa from upstream 26.2.6, no Xwayland fd leak on kernels before 6.0

Merged
UT
12d ago
+1-1

Description

Under gamescope, Xwayland composites with glamor on zink. The payload's glamor Mesa came from a local build of a 25.0-devel fork that no CI built. Its zink leaks one fd per composited frame on kernels older than 6.0 (the DMA_BUF_IOCTL_EXPORT_SYNC_FILE failure path returns without closing the fd). Xwayland reaches the fd limit and the game freezes. This froze Gravity Circuit on the Retroid Pocket Flip 2 (kernel 4.19), and it affects composited windows on any Adreno device with a kernel older than 6.0. Upstream Mesa 26.2.6 has the fix.

GameNative/gamescope#17 builds the glamor Mesa in gamescope CI from the pinned upstream 26.2.6 tarball plus two patches (android/mesa-glamor/).

This PR:

  • GamescopePayload.VERSION 20261028.4 -> 20261029.1.
  • Payload 20261029.1 = 20261028.4 with the glamor Mesa files replaced by the mesa-glamor-stage artifact of the gamescope CI run on the #17 head (run 40815961107; its tree 5c06a1b is identical to the merge commit 0cefd22): lib/libEGL_mesa.so.0, lib/libgbm.so.1, lib/libgbm.so, lib/gbm/dri_gbm.so, lib/dri/libdril_dri.so, and lib/libgallium-25.0.0-devel.so -> lib/libgallium-26.2.6.so. lib/libglapi.so.0 is removed (upstream folded glapi into libgallium). 50_mesa.json and every other file, bin/gamescope included, are unchanged.
  • Archive 14319163 B, sha256 047264c6b365a44dc470a043b61c39efa8d55742f6a428dac808518aacfc12e6, at the CDN root (download checked against the local file).
  • check-no-libandroid.sh: 76 ELFs, none NEEDs libandroid.so. check-payload-closure.sh: the only unresolved name is libnativewindow.so (a dlopen in libadrenotools_gamescope.so), the same as in 20261028.4. All ELFs have 16 KB alignment.
  • No daemon or jniLibs change.

Xwayland fd count on the Galaxy Tab S7 (SM-T875, Android 11, kernel 4.19), wrapper test GL window held 150 s then two GDI windows held 150 s under gamescope:

payloadXwayland fds
shipped 20261028.4climbs about 300/s, 32767 within 113 s, then the game freezes
test payload: 20261028.4 + the #17 CI stage (pre-merge build aa304b1)start 49, GL hold 75-88, GDI hold 98-101, stable over 300 s; suite 12/12, 52 fps

The test payload was made the same way as 20261029.1, from the CI stage of #17 one commit before the head (that commit changed only check-payload-closure.sh). The release payload 20261029.1 itself was not re-run on a device.

devicebuildpayloadresult
Galaxy Tab S7, Adreno 650, Android 11, kernel 4.19Legacyshipped 20261028.4Xwayland at 32767 fds within 113 s, freeze
Galaxy Tab S7Legacy20261028.4 + #17 CI stage (aa304b1)fds 75-101 over 300 s, suite 12/12
Retroid Pocket Flip 2, Adreno 650, kernel 4.19--not tested

Recording

None. The fix shows in the fd counts above; the visible output does not change.

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

Replaces the payload's glamor Mesa with an upstream 26.2.6 build, fixing an Xwayland fd leak on kernels before 6.0. The old 25.0-devel fork's zink leaked one fd per composited frame, pushing Xwayland to the fd limit and freezing games such as Gravity Circuit on the Retroid Pocket Flip 2 (kernel 4.19). Upstream 26.2.6 contains the fix.

Bug Fixes

  • Bumps GamescopePayload.VERSION to 20261029.1, whose glamor Mesa files come from the upstream 26.2.6 build in gamescope CI.
  • On a Galaxy Tab S7, Xwayland fds stayed at 75-101 over 300 s, versus climbing about 300/s to 32767 and freezing within 113 s before.

Summary by CodeRabbit

  • Maintenance
    • Updated the Gamescope payload version identifier from 20261028.4 to 20261029.1. This is a metadata update; no changes to user-facing features or app behavior are described in this release.