fix: keep DMA-BUF renderer on Wayland + NVIDIA, disable explicit sync - #315
Merged
Merged
Conversation
On native Wayland with the NVIDIA driver, WebKitGTK's DMA-BUF renderer dies with a wp_linux_drm_syncobj_surface_v1 "no acquire point" protocol error, so we disabled DMA-BUF there. The fallback path presents WebGL canvases one frame late (#224). Setting __NV_DISABLE_EXPLICIT_SYNC=1 avoids the protocol error and keeps DMA-BUF, which renders on time. X11 + NVIDIA and AppImages (forced to X11 by the GTK hook) still disable DMA-BUF, which shows a blank page there. User-set env vars still win; an explicit __NV_DISABLE_EXPLICIT_SYNC of "0" or "" falls back to disabling DMA-BUF.
This was referenced Sep 18, 2026
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.
Refs #224. Complements #313, which is still needed.
What
When
linux_gfx.rsdetects NVIDIA on a native Wayland session, it now sets__NV_DISABLE_EXPLICIT_SYNC=1and leaves WebKit's DMA-BUF renderer on. Before, it setWEBKIT_DISABLE_DMABUF_RENDERER=1.Everything else is unchanged:
GDK_BACKEND=x11, so they always run on X11.VOLTIUS_NO_LINUX_GFX_WORKAROUNDS=1still turns everything off.__NV_DISABLE_EXPLICIT_SYNCto0or to an empty value, DMA-BUF is disabled as before.Why
On Wayland + NVIDIA, the DMA-BUF renderer fails because the compositor raises a protocol error and disconnects the app:
wp_linux_drm_syncobj_surface_v1error 4, "explicit sync is used, but no acquire point is set".NVIDIA's egl-wayland turns on explicit sync for the GTK toplevel surface. GTK then commits a
wl_shmbuffer to that same surface without an acquire point. Upstream bug: https://bugs.webkit.org/show_bug.cgi?id=324551The fallback renderer (DMA-BUF off) shows WebGL canvases one frame late (https://bugs.webkit.org/show_bug.cgi?id=324549). That caused the ~0.6 s terminal echo lag in #224. With explicit sync disabled, the DMA-BUF renderer works and WebGL frames appear on time.
Testing
Tested on an RTX 5070 with driver 610.57.04, KDE Plasma 6.7.4 and webkit2gtk-4.1 2.52.6.
dev)__NV_DISABLE_EXPLICIT_SYNC=1WAYLAND_DEBUGdev, 22–34 ms with #313 (measured by injecting keys and polling screen pixels)seq 1 1000000drains in 2.3 s vs 2.8 s.__NV_DISABLE_EXPLICIT_SYNC=1and DMA-BUF stays on.GDK_BACKEND=x11and a user-setWEBKIT_DISABLE_DMABUF_RENDERER=1still turn DMA-BUF off.GDK_BACKENDparsing.cargo fmt,cargo clippy --all-targets,cargo build,cargo testforlinux_gfx(8/8) andpnpm run buildall pass.#313 is still needed for X11 + NVIDIA, for all AppImage users, and for anyone who sets
WEBKIT_DISABLE_DMABUF_RENDERER=1themselves.🤖 Generated with Claude Code