Skip to content

android: send the game window note on the first top-level map (A43) - #6

Merged
utkarshdalal merged 1 commit into
gamenativefrom
first-map-splash-black-desktop
Oct 23, 2026
Merged

utkarshdalal merged 1 commit into
gamenativefrom
first-map-splash-black-desktop

Conversation

@utkarshdalal

@utkarshdalal utkarshdalal commented Oct 23, 2026 •

Copy link
Copy Markdown

Under GameNative's X11 display server the boot splash hides on the first mapped window, whatever it is, and the user sees black until the game's first frame (the app's renderers never draw explorer). Under gamescope the splash waited for the game-window note from the shim's present path or from A43's commit-rate scan, because hiding it on map showed Wine's blue desktop, which gamescope composites. That gate kept the splash up long after there was something to show (on a Poco F6: Balatro hides at +29 s under gamescope versus +13 s under X11; L.A. Noire loads for 25 s behind the splash).

A43 reworked: the note is sent on the first top-level X map (in practice wine's desktop window), exactly the X11 rule, with no commit-rate gate. The daemon serves only the newest scan-out connection, so a note can be dropped when another client connects right after it; it is resent on a later commit, at most once a second and three times in all, through the same send_game_window_note(). The commit-rate counter and the game-child scan are gone. The patch is folded into 0043 so the train passes forward and reverse.

The blue is handled on the app side: game sessions get a black desktop background with no wallpaper and explorer's shell off (utkarshdalal/GameNative#2230), so what shows between the splash and the first frame is black under both display servers.

Verified on a Poco F6 with payload 20261023.3: the splash hides 0.4 to 0.6 s after xwm: first top-level map 0x400002: game window note sent (1/3) with the frame-latched daemon, and within 20 ms with the daemon from gamenative-drm#12. Balatro +29.2 s → +14.2 s, Blazing Chrome +24.3 s → +12.8 s, L.A. Noire +85.1 s → +23.8 s; the gap is black in every run; X11 unchanged.

Under X11 the app hides the booting splash on the first mapped window. Under
gamescope, A43 sent the game window note only once wine's desktop window
committed at least 20 frames a second with a game child mapped, which a static
dialog never reaches, so the dialog stayed hidden behind the splash.

A43 now sends the note on the first top-level map, on a fresh
GAMENATIVE_DRM_SOCKET connection, and again on later commits at most once a
second, three notes in all, in case the daemon drops one to a racing
connection. The commit-rate gate and its game-child scan are gone, and the
change is folded into A43 so the train still re-applies.
utkarshdalal pushed a commit to utkarshdalal/GameNative that referenced this pull request Oct 23, 2026
Under the X11 display server the app hides the "Launching game" splash on
the first mapped window and the user sees black until the game's first
frame, because the renderers never draw explorer. Under gamescope the
splash instead waited for a game-window note from the shim's present path
or from gamescope's commit-rate scan, because hiding it earlier showed
Wine's blue desktop wallpaper and taskbar, which gamescope composites.
That gate kept the splash up for tens of seconds after there was
something to show (L.A. Noire loads for 25 s behind it) and hid error
dialogs forever.

Both modes now use the same rule. Game sessions get a black desktop
background with no wallpaper and explorer's shell (taskbar, start menu,
standalone systray) turned off for the "shell" desktop
(WineThemeManager.gameSessionTheme and the enableShell flag of apply,
applied in setupWineSystemFiles for launches that are not
bootToContainer). That is a no-op under X11 and removes the blue and the
taskbar under gamescope; "Open container" keeps the user's theme and shell.

Payload 20261023.3 ships gamescope A43 reworked to send the game-window
note on the first top-level X map, like the X11 rule, with a
once-a-second resend (GameNative/gamescope#6), the device-gated proc
lookup shim (gamenative-drm#11) and the shim without its own game-window
report (gamenative-drm#12). The bundled libgamenative_drm.so is the
daemon from gamenative-drm#12: it clears the splash as soon as the note
arrives instead of on the next published frame.
utkarshdalal pushed a commit to joshuatam/GameNative that referenced this pull request Oct 23, 2026
…l payload as the APK asset

Same change as utkarshdalal/GameNative PR 2230, on top of this branch so it
can be built and tested locally without the CDN: game sessions get a black
Wine desktop with explorer's shell off (Open container keeps the theme and
taskbar), the bundled libgamenative_drm.so clears the splash as soon as
gamescope's first-map note arrives (gamenative-drm#12), and
gamescope-gamenative-20261023-14.tzst is the final payload: gamescope with
the first-map note (GameNative/gamescope#6) and the shim with the
device-gated proc lookup (gamenative-drm#11) and no game-window report
(gamenative-drm#12). The asset is force-added past .gitignore for this
test branch only.
utkarshdalal pushed a commit to utkarshdalal/GameNative that referenced this pull request Oct 23, 2026
Under the X11 display server the app hides the "Launching game" splash on
the first mapped window and the user sees black until the game's first
frame, because the renderers never draw explorer. Under gamescope the
splash instead waited for a game-window note from the shim's present path
or from gamescope's commit-rate scan, because hiding it earlier showed
Wine's blue desktop wallpaper and taskbar, which gamescope composites.
That gate kept the splash up for tens of seconds after there was
something to show (L.A. Noire loads for 25 s behind it).

Both modes now use the same rule. Game sessions get a black desktop
background with no wallpaper and explorer's shell (taskbar, start menu,
standalone systray) turned off for the "shell" desktop
(WineThemeManager.gameSessionTheme and the enableShell flag of apply,
applied in setupWineSystemFiles for launches that are not
bootToContainer). That is a no-op under X11 and removes the blue and the
taskbar under gamescope; "Open container" keeps the user's theme and shell.

Payload 20261023.3 ships gamescope A43 reworked to send the game-window
note on the first top-level X map, like the X11 rule, with a
once-a-second resend (GameNative/gamescope#6), and the shim without its
own game-window report (gamenative-drm#12) on top of the device-gated
proc lookup (gamenative-drm#11). The bundled libgamenative_drm.so is the
daemon from gamenative-drm#12: it clears the splash as soon as the note
arrives instead of on the next published frame.
@joshuatam joshuatam closed this Oct 23, 2026
@joshuatam joshuatam reopened this Oct 23, 2026
@joshuatam joshuatam closed this Oct 23, 2026
@joshuatam joshuatam reopened this Oct 23, 2026
@utkarshdalal
utkarshdalal merged commit b558d9e into gamenative Oct 23, 2026
1 check passed
utkarshdalal added a commit to utkarshdalal/GameNative that referenced this pull request Oct 23, 2026
…es (payload 20261023.3) (#2230)

* gamescope: hide the boot splash on the first mapped window, as X11 does

Under the X11 display server the app hides the "Launching game" splash on
the first mapped window and the user sees black until the game's first
frame, because the renderers never draw explorer. Under gamescope the
splash instead waited for a game-window note from the shim's present path
or from gamescope's commit-rate scan, because hiding it earlier showed
Wine's blue desktop wallpaper and taskbar, which gamescope composites.
That gate kept the splash up for tens of seconds after there was
something to show (L.A. Noire loads for 25 s behind it).

Both modes now use the same rule. Game sessions get a black desktop
background with no wallpaper and explorer's shell (taskbar, start menu,
standalone systray) turned off for the "shell" desktop
(WineThemeManager.gameSessionTheme and the enableShell flag of apply,
applied in setupWineSystemFiles for launches that are not
bootToContainer). That is a no-op under X11 and removes the blue and the
taskbar under gamescope; "Open container" keeps the user's theme and shell.

Payload 20261023.3 ships gamescope A43 reworked to send the game-window
note on the first top-level X map, like the X11 rule, with a
once-a-second resend (GameNative/gamescope#6), and the shim without its
own game-window report (gamenative-drm#12) on top of the device-gated
proc lookup (gamenative-drm#11). The bundled libgamenative_drm.so is the
daemon from gamenative-drm#12: it clears the splash as soon as the note
arrives instead of on the next published frame.

* gamescope: drop the system libcrypto/libjpeg links

The gamescope_system_libs symlinks to /system/lib64/libcrypto.so and
libjpeg.so only existed because libgndrm_shim.so linked libandroid.so,
whose OEM deps resolved against imagefs's same-named libs. The shim no
longer links libandroid (gamenative-drm#9, app #2228), so nothing in a
gamescope session loads those system libs. The gamescope LD_LIBRARY_PATH
now starts at gamescope/lib.

* Default new containers to gamescope only on Adreno

Gamescope is verified on Adreno 735, 750, 830 and 840. Mali-G710 works,
but Mali-G68 cannot create gamescope's compute pipelines, and Xclipse
and PowerVR are untested, so every non-Adreno GPU now defaults to X11.

setContainerDefaults resolves the default from the cached GL renderer
string at startup and stores it in DefaultVersion.DISPLAY_SERVER, which
the unset display server preference and new ContainerData use. The
per-container setting, known and community configs, and an explicitly
set global preference still win; existing containers keep their value.

---------

Co-authored-by: Utkarsh Dalal <utkarsh.dalal@toptal.com>
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.

2 participants