Device: Galaxy S24+ (Exynos 2400 / Xclipse 940), GameNative v1.4.1, bionic container, RADV Xclipse (Mesa 27.0.0-devel-cc87fdf)
Steps: Display Server = gamescope, OpenGL Driver = Kopper, launch Balatro (LÖVE / OpenGL).
Result: the game shows "Unable to create OpenGL window - This program requires a graphics card and video drivers which support OpenGL 2.1 or OpenGL ES 2."
Logcat:
Disabling glamor and dri3 support, XWAYLAND_NO_GLAMOR is set
Failed to initialize glamor, falling back to sw
DRI3 not available
Cause: on non-Adreno devices GameNative sets XWAYLAND_NO_GLAMOR=1 (BionicProgramLauncherComponent.java:621). Without glamor, Xwayland doesn't expose DRI3, and Kopper's GLX path needs DRI3, so no GL context can be created. The default Zink option still launches the game (with the known gamescope flicker on non-Adreno).
Suggestion: hide the Kopper option on non-Adreno devices for now (or fall back to Zink automatically), until glamor works on non-Adreno.
Note: this post was written with the help of AI; the testing and logs are from my own device.
EDIT: got it working. Kopper + gamescope now runs Balatro on Xclipse at 120 FPS with LSFG frame generation (~60 FPS rendered), with correct colors and no flicker (the Zink copy path still flickers). Hiding Kopper isn't needed, it just needs two changes on non-Adreno devices:
- Don't set
XWAYLAND_NO_GLAMOR. Without it, Xwayland runs glamor on zink + RADV and DRI3 is available. In my testing there was no Xwayland stall. - Allow the other 8-bit swapchain order in gn-vkshim. With glamor on, zink then failed with
CreateSwapchainKHR failed with VK_ERROR_FORMAT_NOT_SUPPORTED → GLXBadCurrentWindow → exit 134. The shim only accepts the scan-out pool's own order (icd_shim/src/proxy.rs, swapchain_format_allowed). Setting GN_VKSHIM_ALLOW_BGRA=1 + GN_VKSHIM_ALLOW_RGBA=1 fixed it, and the colors were correct.
Workaround for now (container env vars): GN_VKSHIM_ALLOW_BGRA=1, GN_VKSHIM_ALLOW_RGBA=1, and GUEST_PROGRAM_LAUNCHER_COMMAND = the normal gamescope command prefixed with /system/bin/env -u XWAYLAND_NO_GLAMOR (; as separator), plus HODLL=libwow64fex.dll, because the override skips that step. This is a hack and specific to one container. A proper fix in the app would be better.