Skip to content

android: A58 retries the base Xwayland with glamor off when it exits or stalls before ready - #33

Open
utkarshdalal wants to merge 1 commit into
gamenativefrom
xwayland-glamor-fallback
Open

utkarshdalal wants to merge 1 commit into
gamenativefrom
xwayland-glamor-fallback

Conversation

@utkarshdalal

Copy link
Copy Markdown

What

A user on an Adreno 750 (self-built Turnip 26.3-devel, also wrapper-gamenative) could only launch under gamescope with LIBGL_ALWAYS_SOFTWARE=1 forced into the container. His log: Xwayland printed Failed to make EGL context current with GL, died with SIGABRT, gamescope sat out the A24 15 s ready deadline and ended with Failed to initialize wlserver. With the variable, glamor was skipped and the DXVK game ran at 59 fps: nothing in the session needs glamor, every Vulkan guest presents through the WSI shim.

New patch android/patches/gamescope/0052-A58-xwayland-glamor-off-retry.patch:

  • The ready-wait sees a child that died before its -displayfd write at once. wlroots reaps it in xserver_handle_ready (pipe hang-up, "Xwayland startup failed"), unlinks its sockets and leaves display == -1, but emits no signal; the wait polls that field after each dispatch and returns Exited.
  • A base server that exited or stalled with glamor on is recreated once with XWAYLAND_NO_GLAMOR=1 (the switch the app already sets on non-Adreno). The old server object is destroyed first so wlroots frees the X sockets and the replacement binds the same display number (the app addresses it by path, A20). A stalled child is SIGKILLed before that, since wlroots only relies on EPIPE. No retry when the variable is already set; servers created later via wlserver_make_new_xwayland_server are not retried.
  • A24's stall snapshot is still logged before the retry.

README: a paragraph under "Two Mesas" on glamor being optional and the retry.

Not verified

Compiled only by this PR's CI. Not run on a device: I have no Adreno 750 with a failing glamor. A device check would be a gamescope session with XWAYLAND_NO_GLAMOR unset and glamor made to fail (for example LIBGL_DRIVERS_PATH pointed at an empty dir), expecting the log lines Xwayland server 0 exited after N ms, before it signalled ready, retrying once with XWAYLAND_NO_GLAMOR=1, Xwayland server 0 is up with glamor off, and the game up.

…or stalls before ready

Xwayland's glamor (zink over the guest Vulkan driver) does not come up on every
device: an Adreno 750 with a self-built Turnip aborted at EGL make-current, the
system driver on non-Adreno wedges it. The child never writes -displayfd, A24's
deadline expires and the session fails, although nothing needs glamor (Vulkan
guests present through the WSI shim). The ready-wait now sees a child that died
(wlroots leaves display == -1 and emits nothing) at once instead of at the
deadline, and a base server that exited or stalled with glamor on is recreated
once with XWAYLAND_NO_GLAMOR=1; a stalled child is SIGKILLed first since wlroots
only relies on EPIPE. No retry when the variable is already set.
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