Repository navigation
Gamescope payload 20261028.4: ION allocations reach the scan-out pool, daemon copies foreign buffers, gamescope on the container's Turnip - #2266
Conversation
…, daemon copies foreign buffers OpenGL games were black with audio under gamescope on Snapdragon 865 devices: on kernels without dma-buf heaps Turnip allocates Xwayland's window buffers through /dev/ion, which the preload shim did not redirect into the daemon's AHardwareBuffer pool, so every frame was dropped. Payload 20261028.1 is 20261027.1 with the gndrm shim from gamenative-drm master (#26: ION allocations redirected like dma-heap ones). The daemon is rebuilt from the same master (#28: a committed buffer the pool does not own is copied into the pool instead of dropped, with an always-on log line). Both verified on a Galaxy Tab S7 (Adreno 650, Android 11).
|
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 from 20261027.1 to 20261028.4. |
Priority:
Estimated code review effort: 1 (Trivial) | ~2 minutes
Change: Bug fix
Possibly related PRs
- utkarshdalal/GameNative#2263: This PR shipped payload version
20261027.1, which this change advances.
Suggested reviewers: joshuatam
Merge Risk: 
Minimal · up to 9c72a
-
This updates the bundled Gamescope payload version so devices fetch the newer archive. The archive was found available on both download endpoints with a matching checksum, so no merge-blocking risk remains.
Pre-merge checks: 
5
-
Full details: Description check
-
Explanation
The description is detailed and covers the change rationale, testing results, change type, and checklist. The Recording section references screenshots in related DRM pull requests rather than including a recording or GIF directly, but the overall description is complete and relevant.
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.
Comment @coderabbitai help to get the list of available commands.
…p on every flavor Payload 20261028.2 adds the icd shim from gamenative-drm #27: the gamescope process takes the same adrenotools-through-proxy route as the guests on Legacy builds, as it already did on Modern ones. Verified on the Galaxy Tab S7 (Adreno 650) and OnePlus 12R (Adreno 740) with the Legacy flavor.
The 20261028.2 archive carried the ICD shim built from gamenative-drm master 7ed8285, which stalled the Galaxy Tab S7 (Adreno 650, Android 11) five times out of five on App Live: wine's desktop process never finished starting and no game window appeared. The same archive with the ICD from e050ce4 passed there four times and on the OnePlus 12R. The only source difference is gamenative-drm#25, the GPU identity override; it works on the Odin 3 (Gravity Circuit 60 fps) but is not verified on Adreno 650, so it stays out of this payload. 20261028.3 = 20261028.2 with lib/libadrenotools_gamescope.so replaced by the e050ce4 build (sha256 d52b7ee4...), every other member identical. Archive 14190262 B, sha256 dbce3c0ef9afef829a934ed2d204cbf7a4bdfc9ddfac6123e91667c25d296cad.
… mode Payload 20261028.4 is 20261028.3 with the gndrm shim from gamenative-drm master 7bb888d (#29). The shim seeds gamescope's nested -w/-h size as the scan-out geometry so length-only requests that arrive before the first mode are matched, and resumes the daemon exchange on EINTR instead of dropping the buffer. The ICD shim stays the e050ce4 build from .3. The daemon is rebuilt from the same master: a length request also matches a known geometry whose row-padded length equals it. Shim sha256 22bd8624896c51e98bd0bbc7e99579546505d81b69763b62a3f24a8cca55c31b, daemon (stripped) sha256 7e2c376b72425c680a33dd3cba2d7bca2098d201738f17535807725289a6e853, archive 14191104 B sha256 ddd68fd9c486f2b45ab43318e165170ebd9c469676c7c476a0294685351dd0c7. The same shim on the same base passed on a Galaxy Tab S7 (Adreno 650) earlier today: cube ~59 fps, GL 12/12, every 1280x800 window buffer mode-matched into the daemon pool, no foreign buffer copies.
Description
OpenGL games (Gravity Circuit, LÖVE2D) showed a black screen with audio under gamescope on Snapdragon 865 devices (Retroid Pocket Flip 2, Galaxy Tab S7; Adreno 650) while DXVK games rendered. Reported by RAHBOOTS in the v1.4.0 release-preview thread.
Under gamescope a zink guest renders through Xwayland's window buffers. On kernels without dma-buf heaps (4.19 class) Turnip allocates those through
/dev/ion; the preload shim only redirected dma-heap allocations into the daemon's AHardwareBuffer pool, so the window buffers were unknown to the daemon and every frame was dropped. Three gamenative-drm changes fix it, all verified on a Galaxy Tab S7 (SM-T875, Android 11,dma_heap_system=false ion=true) with the wrapper test's GL window held on screen under gamescope:ION_IOC_NEW_ALLOCthe same way. Shipped payload: black, no redirect lines. Fixed shim: window visible, every 1280x800 Xwayland bufferheap alloc 4096000 B -> daemon buffer.foreign dma-buf summary: copied_frames=2466 buffers=28 failures=0.-w/-hsize as the scan-out geometry so Xwayland's 1280x800 window buffers are matched before any ADDFB2, and it resumes the daemon exchange on EINTR instead of dropping the buffer; the daemon also matches a length against a known geometry with row-padded pitch. Without it a few window buffers still fell back to plain ION allocations and reached the daemon only through the #28 copy. Tab S7 with this shim: cube ~59 fps exit 0, GL 12/12, 17/17 1280x800 buffersmode-matched 1280x800 -> daemon buffer, zero foreign-buffer lines.This PR ships all three:
GamescopePayload.VERSION20261027.1 -> 20261028.4. Payload 20261028.4 = 20261028.3 plus drm Attempted to add Vortek driver #29:lib/libgndrm_shim.sofrom drm master 7bb888d (#26 + Attempted to add Vortek driver #29, sha256 22bd8624896c51e98bd0bbc7e99579546505d81b69763b62a3f24a8cca55c31b); this exact shim on this exact base passed on the Tab S7 earlier today. Everything else as in 20261028.3:lib/libadrenotools_gamescope.sofrom drm e050ce4 (#27 gamescope driver route on top of #26/#28; sha256 d52b7ee489475cd42a3f21699dd498577f6ccaacaaa858228d104be7e0412f89); every other file identical to 20261027.1. Archive 14191104 B, sha256 ddd68fd9c486f2b45ab43318e165170ebd9c469676c7c476a0294685351dd0c7 (exactly one member differs from 20261028.3, sha256 dbce3c0ef9afef829a934ed2d204cbf7a4bdfc9ddfac6123e91667c25d296cad), served from downloads.gamenative.app and the R2 fallback.jniLibs/arm64-v8a/libgamenative_drm.sofrom drm master 7bb888d (#28 + Attempted to add Vortek driver #29, built with NDK 27.3,llvm-strip --strip-unneeded; sha256 7e2c376b72425c680a33dd3cba2d7bca2098d201738f17535807725289a6e853, unstripped ddbe0f211387bd2c61872cd01f17f6ba0daf9168926426ff2efb72621a1e376c).Also in the payload: GameNative/gamenative-drm#27, the gamescope process runs on the container's adrenotools Turnip through the proxy on Legacy builds as it already did on Modern ones. Legacy regression on the Tab S7 (Adreno 650) and OnePlus 12R (Adreno 740): cube ~59 fps exit 0, GL 12/12 visible, gamescope driver line shows the adrenotools build on both.
Recording
Screenshots in the drm PRs: Tab S7 GL window black on the shipped payload and colour-cycling with the fix.
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