Skip to content

fix(linux): detect NVIDIA GPU and work around EGL_BAD_ALLOC on Wayland#446

Merged
koala73 merged 1 commit intomainfrom
fix/linux-nvidia-egl-bad-alloc
Feb 26, 2026
Merged

fix(linux): detect NVIDIA GPU and work around EGL_BAD_ALLOC on Wayland#446
koala73 merged 1 commit intomainfrom
fix/linux-nvidia-egl-bad-alloc

Conversation

@koala73
Copy link
Owner

@koala73 koala73 commented Feb 26, 2026

Summary

  • Detect NVIDIA proprietary drivers via /proc/driver/nvidia at startup
  • Set __NV_DISABLE_EXPLICIT_SYNC=1 to prevent Wayland explicit sync flickering/crashes
  • Force GDK_BACKEND=x11 on NVIDIA + Wayland to avoid surfaceless EGL failures (user can override with GDK_BACKEND=wayland)
  • Bump version to 2.5.19

Context

Linux users with NVIDIA proprietary drivers on Wayland report:

Could not create surfaceless EGL display: EGL_BAD_ALLOC. Aborting...

WebKitGTK's web process calls eglGetPlatformDisplay(EGL_PLATFORM_SURFACELESS_MESA, ...) which fails with NVIDIA's EGL implementation and triggers abort(). The existing WEBKIT_DISABLE_DMABUF_RENDERER=1 only controls buffer sharing, not EGL initialization itself.

Same issue reported across Tauri ecosystem: tauri-apps/tauri#9394, gitbutlerapp/gitbutler#5282, spacedriveapp/spacedrive#2541.

Test plan

  • Verify build compiles on Linux (cargo check)
  • Test on NVIDIA + Wayland: app should launch without EGL_BAD_ALLOC
  • Test on NVIDIA + X11: no change in behavior
  • Test on AMD/Intel: NVIDIA block skipped (no /proc/driver/nvidia)
  • Verify GDK_BACKEND=wayland override works for NVIDIA users who want native Wayland

Linux users with NVIDIA proprietary drivers on Wayland report crashes:
  "Could not create surfaceless EGL display: EGL_BAD_ALLOC. Aborting..."

WebKitGTK's web process calls eglGetPlatformDisplay with the
EGL_PLATFORM_SURFACELESS_MESA platform, which fails with NVIDIA's EGL
implementation and triggers abort(). WEBKIT_DISABLE_DMABUF_RENDERER=1
(already set) only controls buffer sharing, not EGL initialization.

Detect NVIDIA via /proc/driver/nvidia and:
- Set __NV_DISABLE_EXPLICIT_SYNC=1 to prevent Wayland flickering
- Force GDK_BACKEND=x11 on NVIDIA+Wayland (user can override)

Also bumps version to 2.5.19.

Refs: tauri-apps/tauri#9394, gitbutlerapp/gitbutler#5282
@vercel
Copy link

vercel bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldmonitor Building Building Preview, Comment Feb 26, 2026 8:20pm
worldmonitor-finance Building Building Preview, Comment Feb 26, 2026 8:20pm
worldmonitor-happy Building Building Preview, Comment Feb 26, 2026 8:20pm
worldmonitor-startup Building Building Preview, Comment Feb 26, 2026 8:20pm

Request Review

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@koala73 koala73 merged commit df1242d into main Feb 26, 2026
3 of 6 checks passed
facusturla pushed a commit to facusturla/worldmonitor that referenced this pull request Feb 27, 2026
koala73#446)

Linux users with NVIDIA proprietary drivers on Wayland report crashes:
  "Could not create surfaceless EGL display: EGL_BAD_ALLOC. Aborting..."

WebKitGTK's web process calls eglGetPlatformDisplay with the
EGL_PLATFORM_SURFACELESS_MESA platform, which fails with NVIDIA's EGL
implementation and triggers abort(). WEBKIT_DISABLE_DMABUF_RENDERER=1
(already set) only controls buffer sharing, not EGL initialization.

Detect NVIDIA via /proc/driver/nvidia and:
- Set __NV_DISABLE_EXPLICIT_SYNC=1 to prevent Wayland flickering
- Force GDK_BACKEND=x11 on NVIDIA+Wayland (user can override)

Also bumps version to 2.5.19.

Refs: tauri-apps/tauri#9394, gitbutlerapp/gitbutler#5282
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant