Force X11 for Xenia on Wayland - #52
Conversation
Xenia's Linux build opens a GTK window on Wayland but only creates an XCB (X11) Vulkan surface, so the swapchain never presents and the window hangs grey while audio keeps playing. Detect a Wayland session in launchXenia and pin GDK_BACKEND and SDL_VIDEODRIVER to x11 for the emulator. Explicit values in the environment are left untouched.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthrough
ChangesWayland X11 launch
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The Wayland launch compatibility change preserves existing user overrides and normal launch behavior, with no unresolved merge-readiness risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
On a Wayland session, Xenia's Linux build opens a GTK window but only creates an XCB (X11) Vulkan surface. The window and the surface never match, so the swapchain never presents: the emulator shows a grey, unresponsive window while the guest keeps running and audio keeps playing.
Reproduced with Xenia Canary (
canary_experimental@02d2cb5cc) on Hyprland: grey window, dead menu bar, working sound. Running withGDK_BACKEND=x11makes video appear immediately.Change:
launchXenianow detects a Wayland session (WAYLAND_DISPLAYorXDG_SESSION_TYPE=wayland) and launches withGDK_BACKEND=x11andSDL_VIDEODRIVER=x11.Tests: adds
xeniaLaunchForcesX11OnWayland(Wayland gets x11, non-Wayland is untouched, explicit overrides win). Core suite: 212 passed, 0 failed, 1 skipped.Found while validating Xenia with a real Xbox 360 disc.
Summary by CodeRabbit