Skip to content

fix: add Mesa EGL software rendering for Linux environments without GPU#439

Merged
AnthonyRonning merged 1 commit intomasterfrom
devin/1772042975-fix-tauri-egl-linux
Feb 25, 2026
Merged

fix: add Mesa EGL software rendering for Linux environments without GPU#439
AnthonyRonning merged 1 commit intomasterfrom
devin/1772042975-fix-tauri-egl-linux

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot commented Feb 25, 2026

Summary

Fixes the Could not create default EGL display: EGL_BAD_PARAMETER blank-page crash when running the Tauri desktop app on Linux environments without a GPU (VMs, containers, CI, headless servers like Devin).

Root cause: The nix flake provides libglvnd for EGL dispatch but no Mesa EGL vendor library. Without a Mesa EGL backend and DRI drivers, WebKitGTK's web process fails to initialize EGL and the window renders blank.

Fix: Adds pkgs.mesa to the Linux nix packages and sets environment variables in the shellHook to wire up Mesa's software renderer (llvmpipe/swrast) for EGL.

Before (blank window):
before

After (working):
after

Review & Testing Checklist for Human

  • LIBGL_ALWAYS_SOFTWARE=1 is set unconditionally on all Linux. If any team member develops on a real Linux desktop with a GPU, this will force software rendering and degrade performance. Consider whether this should be conditional (e.g., only when /dev/dri is absent) or if the team is macOS-only and this is acceptable.
  • WEBKIT_DISABLE_COMPOSITING_MODE=1 and WEBKIT_DISABLE_DMABUF_RENDERER=1 are similarly unconditional on Linux. These disable hardware compositing in WebKitGTK, which may affect rendering fidelity on real GPU systems.
  • Verify that macOS nix develop still works correctly (changes are gated behind pkgs.stdenv.isLinux so should be safe).

Suggested test plan: Run nix develop on a Linux machine (or VM), then just desktop-build-debug-no-cc and launch the binary — it should render the app instead of showing a blank window.

Notes

  • The login attempt showed an attestation error ("Couldn't process attestation document: Load failed") which is an app-level/backend issue unrelated to rendering — all UI pages load and render correctly.
  • Relates to #251
  • Link to Devin run
  • Requested by @AnthonyRonning

Open with Devin

Fixes the 'Could not create default EGL display: EGL_BAD_PARAMETER' error
that causes a blank page when running the Tauri desktop app in environments
without a GPU (VMs, containers, CI, headless servers).

The root cause: the nix flake provides libglvnd for EGL dispatch but no
Mesa EGL vendor library. Without a Mesa EGL backend, WebKitGTK's web
process cannot initialize EGL and crashes.

Changes:
- Add pkgs.mesa to Linux packages (provides libEGL_mesa.so and swrast DRI)
- Set __EGL_VENDOR_LIBRARY_FILENAMES to point libglvnd to Mesa's EGL vendor
- Set LIBGL_DRIVERS_PATH to Mesa's DRI drivers (swrast for software rendering)
- Set LIBGL_ALWAYS_SOFTWARE=1 to force llvmpipe software rendering
- Set WEBKIT_DISABLE_COMPOSITING_MODE=1 and WEBKIT_DISABLE_DMABUF_RENDERER=1
  for additional robustness on systems without GPU

Relates to #251

Co-Authored-By: unknown <>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying maple with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1ee7c7e
Status: ✅  Deploy successful!
Preview URL: https://eced1222.maple-ca8.pages.dev
Branch Preview URL: https://devin-1772042975-fix-tauri-e.maple-ca8.pages.dev

View logs

Copy link
Copy Markdown
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@AnthonyRonning AnthonyRonning merged commit 2fc9a72 into master Feb 25, 2026
12 checks passed
@AnthonyRonning AnthonyRonning deleted the devin/1772042975-fix-tauri-egl-linux branch February 25, 2026 18:29
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