NVIDIA + Wayland: keep the GPU renderer (explicit-sync fix)
Why: 4.12.343 made the app launch on NVIDIA + Wayland by disabling WebKit's DMA-BUF renderer and forcing X11. That works, but every frame then goes through shared memory under XWayland, and at 3840×2058 it's noticeably laggy. The reporter traced the real cause with WAYLAND_DEBUG=1:
wl_display#1.error(wp_linux_drm_syncobj_surface_v1#51, 4, "explicit sync is used, but no acquire point is set")
Gdk-Message: Error 71 (Protocol error) dispatching to Wayland display.
It's an explicit-sync bug between WebKit and the NVIDIA driver, not a GBM format/modifier one.
Reporter's test matrix (RTX 3070, driver 615.71.09, Mesa 26.2.3, webkit2gtk 2.52.6, KDE Plasma Wayland, one render node):
Test (all with LOTUS_NO_GPU_WORKAROUNDS=1)
Result
native Wayland, nothing else
explicit-sync protocol error, no window
WEBKIT_DMABUF_RENDERER_DISABLE_GBM=1 (Wayland)
same explicit-sync error
GDK_BACKEND=x11 + …DISABLE_GBM=1
"Failed to import DMABuf" forever, blank window
WEBKIT_DISABLE_DMABUF_RENDERER=1 (Wayland, no X11)
works (shared memory)
__NV_DISABLE_EXPLICIT_SYNC=1 (Wayland)
works, GPU renderer, visibly smoother
New defaults (only when the NVIDIA driver is loaded):
Native Wayland:__NV_DISABLE_EXPLICIT_SYNC=1, keeping the GPU (DMA-BUF) renderer.
X11 session, or GDK_BACKEND=x11 set by the user:WEBKIT_DISABLE_DMABUF_RENDERER=1, since the DMA-BUF renderer fails there.
X11 is never forced any more.
LOTUS_GPU_SAFE_MODE=1: opt-in shared-memory rendering on Wayland as a last resort.
LOTUS_NO_GPU_WORKAROUNDS=1, or values the user set: left alone.
One stderr line says what was set. There are 9 unit tests, covering: never forcing X11, a user-forced X11 counting as X11, GDK_BACKEND=wayland,x11, safe mode, user values winning, and the opt-out. clippy is clean.
To verify after merge: the reporter launches the next Arch build with no env vars, expecting native Wayland, the GPU renderer and smooth scrolling.
## NVIDIA + Wayland: keep the GPU renderer (explicit-sync fix)
**Why:** 4.12.343 made the app launch on NVIDIA + Wayland by disabling WebKit's DMA-BUF renderer and forcing X11. That works, but every frame then goes through shared memory under XWayland, and at 3840×2058 it's noticeably laggy. The reporter traced the real cause with `WAYLAND_DEBUG=1`:
```
wl_display#1.error(wp_linux_drm_syncobj_surface_v1#51, 4, "explicit sync is used, but no acquire point is set")
Gdk-Message: Error 71 (Protocol error) dispatching to Wayland display.
```
It's an explicit-sync bug between WebKit and the NVIDIA driver, not a GBM format/modifier one.
**Reporter's test matrix** (RTX 3070, driver 615.71.09, Mesa 26.2.3, webkit2gtk 2.52.6, KDE Plasma Wayland, one render node):
| Test (all with `LOTUS_NO_GPU_WORKAROUNDS=1`) | Result |
|---|---|
| native Wayland, nothing else | explicit-sync protocol error, no window |
| `WEBKIT_DMABUF_RENDERER_DISABLE_GBM=1` (Wayland) | same explicit-sync error |
| `GDK_BACKEND=x11` + `…DISABLE_GBM=1` | "Failed to import DMABuf" forever, blank window |
| `WEBKIT_DISABLE_DMABUF_RENDERER=1` (Wayland, no X11) | works (shared memory) |
| **`__NV_DISABLE_EXPLICIT_SYNC=1` (Wayland)** | **works, GPU renderer, visibly smoother** |
**New defaults** (only when the NVIDIA driver is loaded):
- **Native Wayland:** `__NV_DISABLE_EXPLICIT_SYNC=1`, keeping the GPU (DMA-BUF) renderer.
- **X11 session, or `GDK_BACKEND=x11` set by the user:** `WEBKIT_DISABLE_DMABUF_RENDERER=1`, since the DMA-BUF renderer fails there.
- **X11 is never forced** any more.
- **`LOTUS_GPU_SAFE_MODE=1`:** opt-in shared-memory rendering on Wayland as a last resort.
- **`LOTUS_NO_GPU_WORKAROUNDS=1`, or values the user set:** left alone.
One stderr line says what was set. There are 9 unit tests, covering: never forcing X11, a user-forced X11 counting as X11, `GDK_BACKEND=wayland,x11`, safe mode, user values winning, and the opt-out. clippy is clean.
**To verify after merge:** the reporter launches the next Arch build with no env vars, expecting native Wayland, the GPU renderer and smooth scrolling.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
The 4.12.343 workaround (WEBKIT_DISABLE_DMABUF_RENDERER=1 + GDK_BACKEND=x11)
made the app launch but pushed every frame through shared memory under
XWayland: noticeably laggy at 3840x2058. The reporter's WAYLAND_DEBUG trace
showed the real cause on native Wayland:
wl_display#1.error(wp_linux_drm_syncobj_surface_v1#51, 4,
"explicit sync is used, but no acquire point is set")
Gdk-Message: Error 71 (Protocol error) dispatching to Wayland display.
An explicit-sync bug, not a GBM format/modifier one. Their test matrix
(RTX 3070, driver 615.71.09, webkit2gtk 2.52.6, KDE Wayland):
- __NV_DISABLE_EXPLICIT_SYNC=1 alone: clean, GPU (DMA-BUF) renderer, smooth;
- WEBKIT_DISABLE_DMABUF_RENDERER=1 alone on Wayland: clean (no X11 needed);
- WEBKIT_DMABUF_RENDERER_DISABLE_GBM=1: same explicit-sync error on Wayland,
"Failed to import DMABuf" under XWayland;
- X11/XWayland with the DMA-BUF renderer: "Failed to create GBM buffer".
New defaults when the NVIDIA driver is loaded:
- native Wayland: __NV_DISABLE_EXPLICIT_SYNC=1, GPU renderer kept;
- X11 session or user-forced GDK_BACKEND=x11: WEBKIT_DISABLE_DMABUF_RENDERER=1;
- never force X11 any more;
- LOTUS_GPU_SAFE_MODE=1: opt-in shared-memory rendering on Wayland too;
- LOTUS_NO_GPU_WORKAROUNDS=1 / user-set values: untouched.
One stderr line says what was set. 9 unit tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
jared
merged commit 8ee90444ee into main2026-09-27 22:26:51 -04:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
NVIDIA + Wayland: keep the GPU renderer (explicit-sync fix)
Why: 4.12.343 made the app launch on NVIDIA + Wayland by disabling WebKit's DMA-BUF renderer and forcing X11. That works, but every frame then goes through shared memory under XWayland, and at 3840×2058 it's noticeably laggy. The reporter traced the real cause with
WAYLAND_DEBUG=1:It's an explicit-sync bug between WebKit and the NVIDIA driver, not a GBM format/modifier one.
Reporter's test matrix (RTX 3070, driver 615.71.09, Mesa 26.2.3, webkit2gtk 2.52.6, KDE Plasma Wayland, one render node):
LOTUS_NO_GPU_WORKAROUNDS=1)WEBKIT_DMABUF_RENDERER_DISABLE_GBM=1(Wayland)GDK_BACKEND=x11+…DISABLE_GBM=1WEBKIT_DISABLE_DMABUF_RENDERER=1(Wayland, no X11)__NV_DISABLE_EXPLICIT_SYNC=1(Wayland)New defaults (only when the NVIDIA driver is loaded):
__NV_DISABLE_EXPLICIT_SYNC=1, keeping the GPU (DMA-BUF) renderer.GDK_BACKEND=x11set by the user:WEBKIT_DISABLE_DMABUF_RENDERER=1, since the DMA-BUF renderer fails there.LOTUS_GPU_SAFE_MODE=1: opt-in shared-memory rendering on Wayland as a last resort.LOTUS_NO_GPU_WORKAROUNDS=1, or values the user set: left alone.One stderr line says what was set. There are 9 unit tests, covering: never forcing X11, a user-forced X11 counting as X11,
GDK_BACKEND=wayland,x11, safe mode, user values winning, and the opt-out. clippy is clean.To verify after merge: the reporter launches the next Arch build with no env vars, expecting native Wayland, the GPU renderer and smooth scrolling.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
The 4.12.343 workaround (WEBKIT_DISABLE_DMABUF_RENDERER=1 + GDK_BACKEND=x11) made the app launch but pushed every frame through shared memory under XWayland: noticeably laggy at 3840x2058. The reporter's WAYLAND_DEBUG trace showed the real cause on native Wayland: wl_display#1.error(wp_linux_drm_syncobj_surface_v1#51, 4, "explicit sync is used, but no acquire point is set") Gdk-Message: Error 71 (Protocol error) dispatching to Wayland display. An explicit-sync bug, not a GBM format/modifier one. Their test matrix (RTX 3070, driver 615.71.09, webkit2gtk 2.52.6, KDE Wayland): - __NV_DISABLE_EXPLICIT_SYNC=1 alone: clean, GPU (DMA-BUF) renderer, smooth; - WEBKIT_DISABLE_DMABUF_RENDERER=1 alone on Wayland: clean (no X11 needed); - WEBKIT_DMABUF_RENDERER_DISABLE_GBM=1: same explicit-sync error on Wayland, "Failed to import DMABuf" under XWayland; - X11/XWayland with the DMA-BUF renderer: "Failed to create GBM buffer". New defaults when the NVIDIA driver is loaded: - native Wayland: __NV_DISABLE_EXPLICIT_SYNC=1, GPU renderer kept; - X11 session or user-forced GDK_BACKEND=x11: WEBKIT_DISABLE_DMABUF_RENDERER=1; - never force X11 any more; - LOTUS_GPU_SAFE_MODE=1: opt-in shared-memory rendering on Wayland too; - LOTUS_NO_GPU_WORKAROUNDS=1 / user-set values: untouched. One stderr line says what was set. 9 unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA