Repository navigation
vulkan/wsi/wayland: track outputs on a private connection - #16
Merged
henrikklee merged 2 commits intoNov 18, 2026
Merged
Conversation
Binding wl_output on the application's connection is visible to the application: the compositor sends wl_surface.enter and leave for every wl_output resource the client owns, so the application's surfaces receive enter events that name an output it never bound (or NULL once the WSI released it). GTK turns that into GdkSurface::enter-monitor with a NULL monitor, and WebKitGTK aborts on it. Track the outputs, for the surface's current transform, on a separate connection to the compositor the application is connected to (the peer address of its socket), one per endpoint for the life of the WSI, and dispatch it without blocking when the capabilities are queried. Without a named socket, or when the connection fails, the current transform is identity. Assisted-by: LLM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GNOME Web (epiphany 49, WebKitGTK 6.0) aborts on start on the Orchard desktop when GTK renders with GL on Zink over the PowerVR driver. The cause is the Wayland WSI, not WebKit.
The bug
The pre-rotated swapchain code bound
wl_outputon the application's own Wayland connection to learn the surface's transform. The compositor sendswl_surface.enter/leavefor everywl_outputresource a client owns. So the application's surfaces received enter events for an output it never bound, or a NULL output after the WSI released it. GTK turns that intoGdkSurface::enter-monitorwith a NULLGdkMonitor, and WebKitGTK aborts on it.The fix
One commit,
src/vulkan/wsi/wsi_common_wayland.conly:Devices
Common Vulkan WSI code: it applies to every driver that uses the Wayland WSI, so the A9 and the A10 alike. A10: enabled, untested on our side.
How to test
On an Orchard install, in the desktop session:
WAYLAND_DEBUGlogs every connection in the process. On the iPad 5, the second command prints 8 before this commit (binds on the app's connection) and 1 after: the single bind on the WSI's own connection, whose registry is a secondwl_display#1.libwebkitgtk-6.0, NULLGdkMonitor).Hardware
iPad 5 (A9, J71t), current Orchard main kernel plus open PRs, Mesa = Orchard main + this commit:
GskGLRendererand stays up for the full 30 s and 60 s runs. The header bar and window render on screen, and there is no NULL-monitor abort.Offline: a Wayland test compositor counts
wl_surface.enterevents per output owner.own=1 foreign=1. The app's surface entered the WSI's output.own=1 foreign=0at transform 0, at 270, and across a runtime 0 → 270 rotation. The rotation also givescurrentTransform=ROTATE_90on requery.🤖 Generated with Claude Code