gamescope: payload 20261107.1 and daemon from gamenative-drm#60, the shim waits for the panel's release (DXVK tearing at 60 Hz)

UT
2d ago
+1-1

Description

Depends on GameNative/gamenative-drm#60. Do not merge before it.

This ships GameNative/gamenative-drm#60 (branch shim-waits-panel-release-fence, head 77c581d), which fixes tearing in DXVK games under gamescope on 60 Hz panels. The report: Mangmi Air Y Pro, SD865, 1280x960 at 60 Hz; Skyrim LE, Arkham City, L4D and NFS MW 2012; only above about 40 fps, with vsync on or off. It doesn't show in screen recordings.

Cause. The daemon sends gamescope's page-flip event when it publishes a frame. gamescope then hands back the buffer that frame replaced, while the panel may still be scanning it out. The game gets that buffer at its next acquire and renders into it on screen. GameNative/gamenative-drm#60 has the full chain, with file and line references.

Fix. The daemon now tells the shim when a buffer is replaced on the layer, and forwards SurfaceFlinger's release fence for it. The shim waits for that release at vkAcquireNextImageKHR, for at most 33 ms, before the game can render into the buffer.

  • The flip-event timing is unchanged.
  • The fix needs both halves: a new daemon with an old shim, or an old daemon with a new shim, behaves exactly as master does.

What changes in this PR

  • app/src/main/jniLibs/arm64-v8a/libgamenative_drm.so, built from 77c581d:
    • sha256 28d5d474273052cf24adf64b353139da2ee9c4c4ebf8b522c87427c7e85493c3, md5 ece0bab966db488fec6876515194f3d6;
    • the previous daemon is 08d6276c…f407f6, the 46ccc70 build.
    • On the daemon side, the only other drm commit since then is the licence metadata change (GameNative/gamenative-drm#52).
  • GamescopePayload.VERSION = 20261107.1. App master runs 20261105.4.

Nothing else in the app changes.

Payload 20261107.1

gamescope-gamenative-20261107.1.tzst, 14329141 B, sha256 a14c58fef1b71855933320466b6f987b3e6c9c1cbea7f87de49bbe9f053319cf.

  • It is uploaded to the bucket root. Both download hosts (downloads.gamenative.app and the r2.dev fallback) serve this sha256, and the shim inside the served copy matches.
  • It is 20261105.4 with only the shim replaced: 1014 members, the same order and modes, and every other member byte-identical.
membersha256from
lib/libadrenotools_gamescope.so2dcb1948521f82ed59ab254e6866d3c1fa124dca07354b8ec17701f347cc4ce6GameNative/gamenative-drm#60 at 77c581d
bin/gamescope (unchanged)89921e98b90e1d1a9a134da6a59b3bc526fc5bda1173f7357c17b90a6552beb9as in 20261105.4
bin/Xwayland (unchanged)4dded8566661423ee3c91490523d96240c85906bd00e0774adc912df9dd38698as in 20261105.4

Note for review: GameNative/gamenative-drm#60 branches from drm master, so this shim also carries GameNative/gamenative-drm#59. That PR (the swapchain image count follows the guest's ask, with one ring of hidden slots) is merged but not yet in any payload; 20261105.4 was built at #56/#57. If #59 should ship separately, the shim can be rebuilt from the fix on top of the 20261105.4 source.

Build (NDK 27.3, rustc 1.98.1 via rustup, SOURCE_DATE_EPOCH = commit time, rustflags from tools/build-android.sh):

  • cargo build --release --target aarch64-linux-android -p gndrm-android -p adrenotools_gamescope: OK.
  • check-exports: PASS (daemon 20 exports, shim 3).
  • check-elf-deps: OK for both libraries.
  • clippy with -D warnings (android, shim, daemon, uapi; all targets): clean.
  • Host tests in rust:1-bookworm (aarch64): uapi 20, daemon 100 + 8 + 36, shim 130, all passing.
  • The two drm commits build to byte-identical libraries.

Test plan

Device verification is pending.

  1. Install the APK from this branch and launch one of the reported DXVK games under gamescope, uncapped, on a 60 Hz panel.
  2. Expect Gamescope payload 20261107.1 ready in logcat.
  3. Expected: no tearing, at the same fps as master. On master a cap below the panel rate already hides the tear, so the comparison must be uncapped.
  4. In the game process, a scan-out: a release wait ran out … line means a release note was lost. It prints once per process.

Recording

Pending device verification.

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

Fixes tearing in DXVK games under gamescope on 60 Hz panels by having the shim wait for the panel's release fence before handing a buffer back to the game.

  • The daemon now tells the shim when a layer buffer is replaced and forwards its release fence; the shim waits up to 33 ms at vkAcquireNextImageKHR before the game can render into it. Previously, gamescope handed back buffers the panel might still be scanning out, and the next acquired frame rendered over them on screen.
  • Ships payload 20261107.1 (replacing 20261105.4); only the shim member changes, the rest of the payload is byte-identical, and the APK daemon moves to the gamenative-drm#60 build at 77c581d. Device verification is still pending.

Notes for review

  • The fix needs both halves: a new daemon with an old shim, or an old daemon with a new shim, behaves exactly as master.
  • The shim also carries the merged-but-unshipped gamenative-drm#59 (swapchain image count follows the guest's ask); it can be rebuilt without it if #59 should ship separately.

Summary by CodeRabbit

  • Updates
    • Updated the Gamescope payload to version 20261107.1. This is a version update to the Gamescope content included with the app; no other user-facing changes are described in this release.