fix: add Mesa EGL software rendering for Linux environments without GPU#439
Merged
AnthonyRonning merged 1 commit intomasterfrom Feb 25, 2026
Merged
Conversation
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 <>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Deploying maple with
|
| 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 |
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.
Summary
Fixes the
Could not create default EGL display: EGL_BAD_PARAMETERblank-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
libglvndfor 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.mesato the Linux nix packages and sets environment variables in theshellHookto wire up Mesa's software renderer (llvmpipe/swrast) for EGL.Before (blank window):

After (working):

Review & Testing Checklist for Human
LIBGL_ALWAYS_SOFTWARE=1is 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/driis absent) or if the team is macOS-only and this is acceptable.WEBKIT_DISABLE_COMPOSITING_MODE=1andWEBKIT_DISABLE_DMABUF_RENDERER=1are similarly unconditional on Linux. These disable hardware compositing in WebKitGTK, which may affect rendering fidelity on real GPU systems.nix developstill works correctly (changes are gated behindpkgs.stdenv.isLinuxso should be safe).Suggested test plan: Run
nix developon a Linux machine (or VM), thenjust desktop-build-debug-no-ccand launch the binary — it should render the app instead of showing a blank window.Notes