fix(linux): disable WebKit DMA-BUF renderer to prevent Wayland crash#474
fix(linux): disable WebKit DMA-BUF renderer to prevent Wayland crash#474Charlisim wants to merge 2 commits into
Conversation
…ol error WebKit2GTK's DMA-BUF renderer causes a protocol error (71) on some Wayland compositors (e.g. Hyprland), crashing the app on startup. Fall back to SHM rendering by default; users can opt back in by setting the variable themselves. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
I've been avoiding doing this because I don't want to disable hardware acceleration for users that don't have this bug. I've been thinking of maybe trying to catch the error by maybe setting a flag on launch and unsetting if the app actually showed a window. Then, next launch could check that flag and prompt the user with a native confirmation to set the flag for them. |
… crash The DMA-BUF renderer in WebKit2GTK triggers a Wayland protocol error (71) on Nvidia GPUs due to an explicit sync conflict (WebKit bug #280210). Setting __NV_DISABLE_EXPLICIT_SYNC=1 targets only affected systems (Nvidia drivers + Wayland) and avoids disabling hardware acceleration. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Thanks for the feedback — that's a fair concern, and I looked into it further. After digging into the upstream WebKit bug tracker, this issue is tracked at https://bugs.webkit.org/show_bug.cgi?id=280210. The root cause is specific to Nvidia GPUs on Wayland: there's an explicit sync conflict between WebKit's ANGLE implementation and Nvidia's egl-wayland library ( That also means there's a more targeted workaround: I've updated the PR to use that approach instead — the variable is only set when:
Users on AMD/Intel are completely unaffected. Happy to adjust if you'd prefer a different detection strategy. |
Summary
On Nvidia GPUs running Wayland, WebKit2GTK's DMA-BUF renderer triggers a protocol error (71) due to an explicit sync conflict between WebKit's ANGLE implementation and Nvidia's egl-wayland library. This sets `__NV_DISABLE_EXPLICIT_SYNC=1` only when Nvidia drivers are active and a Wayland display is present, avoiding the crash without disabling hardware acceleration.
Submission
CONTRIBUTING.md.Approved feedback item (required if not a bug fix or small-scope improvement):
Related
WebKit upstream bug: https://bugs.webkit.org/show_bug.cgi?id=280210