This guide covers common display server and graphics rendering issues with the SPECTRE GUI application (Tauri 2.10 + WebKitGTK).
- Automatic Detection System
- Common Issues
- Manual Overrides
- Platform-Specific Notes
- GPU Driver Installation
- Advanced Debugging
As of v0.5.0-alpha.4, SPECTRE GUI automatically detects your display server (Wayland vs X11) and GPU vendor, then applies appropriate workarounds. You should not need to set environment variables manually.
-
Display Server Detection:
- Checks
XDG_SESSION_TYPEenvironment variable - Falls back to
WAYLAND_DISPLAYorDISPLAYvariables - Defaults to X11 if unable to detect
- Checks
-
GPU Vendor Detection:
- Reads PCI vendor ID from
/sys/class/drm/card*/device/vendor(Linux) - Falls back to
lspcicommand output - Detects NVIDIA, Intel, AMD, or Unknown
- Reads PCI vendor ID from
-
Automatic Workarounds:
- NVIDIA + Wayland: Forces X11 backend (WebKitGTK DMABUF issues)
- NVIDIA (any backend): Disables DMABUF renderer, enables explicit sync workaround
- Intel/AMD + X11: Disables compositing mode for stability
- Unknown GPU: Conservative settings (disable DMABUF)
When launching the GUI, you'll see diagnostic output:
🚀 Starting SPECTRE GUI...
🔍 Display Server: X11 (detected: Wayland)
🎨 GPU Vendor: NVIDIA
🔄 Automatic fallback applied for compatibility
🔧 Workarounds: DMABUF renderer disabled, NVIDIA explicit sync disabled
✨ GUI launching...
Symptoms:
Gdk-Message: Error 71 (Protocol error) dispatching to Wayland display
Failed to create GBM buffer of size 1280x800: Invalid argument
Cause: WebKitGTK's DMABUF renderer has compatibility issues with certain GPU drivers (especially NVIDIA proprietary drivers) on Wayland.
Automatic Fix: The GUI detects this scenario and automatically falls back to X11 backend.
Manual Override (if needed):
GDK_BACKEND=x11 cargo tauri dev
# or
./dev.sh --force-x11References:
Symptoms:
- Window opens but shows only white/blank content
- No UI elements visible
- No errors in console
Cause: DMABUF renderer initialization failure without proper error reporting.
Automatic Fix: NVIDIA GPUs automatically have DMABUF renderer disabled.
Manual Override:
WEBKIT_DISABLE_DMABUF_RENDERER=1 cargo tauri devAlternative (less aggressive):
WEBKIT_DISABLE_COMPOSITING_MODE=1 cargo tauri devReferences:
Symptoms:
- Slow rendering performance
- High CPU usage during UI interactions
- Software rendering fallback messages in logs
Diagnosis:
# Check if hardware acceleration is active
glxinfo | grep "direct rendering"
# Should show: direct rendering: Yes
# Check GPU usage while running GUI
nvidia-smi # for NVIDIA
intel_gpu_top # for Intel
radeontop # for AMDCause: GPU driver issues, missing drivers, or incompatible Mesa version.
Solutions:
-
Update GPU Drivers (see GPU Driver Installation)
-
Check Mesa Version:
glxinfo | grep "OpenGL version" # Recommended: Mesa 23.0+ for best WebKitGTK compatibility
-
Try Different Backend:
# If Wayland fails, try X11 ./dev.sh --force-x11 # If X11 fails, try Wayland ./dev.sh --force-wayland
Common Problems:
- White screen on Wayland
- GBM buffer creation failures
- Flickering or screen corruption
Automatic Workarounds Applied:
GDK_BACKEND=x11 # Force X11 instead of Wayland
WEBKIT_DISABLE_DMABUF_RENDERER=1 # Disable problematic renderer
__NV_DISABLE_EXPLICIT_SYNC=1 # NVIDIA driver workaroundIf Issues Persist:
-
Verify NVIDIA Driver Installation:
nvidia-smi # Should show driver version and GPU info -
Install NVIDIA EGL GBM Library (if available):
# Debian/Ubuntu sudo apt install libnvidia-egl-gbm1 # Arch Linux sudo pacman -S nvidia-utils # Fedora sudo dnf install nvidia-driver-cuda
-
Check for Driver Conflicts:
# Ensure nouveau (open-source driver) is disabled lsmod | grep nouveau # Should return nothing
References:
If automatic detection fails or you want to force specific settings:
# Force X11 (safest, most compatible)
GDK_BACKEND=x11 cargo tauri dev
# Force Wayland (native, potentially faster)
GDK_BACKEND=wayland cargo tauri dev
# Using dev.sh helper script
./dev.sh --force-x11
./dev.sh --force-wayland# Disable DMABUF renderer (fixes most NVIDIA issues)
WEBKIT_DISABLE_DMABUF_RENDERER=1 cargo tauri dev
# Disable compositing mode (alternative workaround)
WEBKIT_DISABLE_COMPOSITING_MODE=1 cargo tauri dev
# Disable both (most conservative)
WEBKIT_DISABLE_DMABUF_RENDERER=1 WEBKIT_DISABLE_COMPOSITING_MODE=1 cargo tauri dev# Standard NVIDIA workaround
__NV_DISABLE_EXPLICIT_SYNC=1 cargo tauri dev
# Full NVIDIA compatibility mode
GDK_BACKEND=x11 \
WEBKIT_DISABLE_DMABUF_RENDERER=1 \
__NV_DISABLE_EXPLICIT_SYNC=1 \
cargo tauri dev# Debug level
RUST_LOG=debug cargo tauri dev
# Trace level (very verbose)
RUST_LOG=trace cargo tauri dev
# Using dev.sh
./dev.sh --verbose # sets RUST_LOG=debug
./dev.sh --trace # sets RUST_LOG=traceCreate a .env file in crates/spectre-gui/:
# .env
GDK_BACKEND=x11
WEBKIT_DISABLE_DMABUF_RENDERER=1
RUST_LOG=infoNote: Automatic detection respects user-provided environment variables and won't override them.
Supported Configurations:
- Wayland compositors: Sway, Hyprland, GNOME Wayland, KDE Plasma Wayland
- X11 window managers: i3, bspwm, Openbox, XFCE, GNOME X11, KDE Plasma X11
- XWayland: Supported (X11 apps on Wayland)
Known Issues:
- NVIDIA + Wayland: Requires X11 fallback (automatic)
- Old Mesa (<21.0): May have DMABUF issues, upgrade recommended
- Hybrid Graphics: May need
prime-runor similar GPU switching
Hybrid Graphics (NVIDIA Optimus):
# Run on NVIDIA dGPU
prime-run cargo tauri dev
# Run on Intel iGPU (default)
cargo tauri devNo configuration needed. macOS doesn't use Wayland/X11, so all display detection is skipped.
Requirements:
- macOS 10.15+ (Catalina or later)
- Metal-compatible GPU
No configuration needed. Windows doesn't use Wayland/X11, so all display detection is skipped.
Requirements:
- Windows 10 (1809+) or Windows 11
- DirectX 11+ compatible GPU
Proprietary Driver (Recommended):
# Debian/Ubuntu
sudo apt install nvidia-driver-535 # or latest version
# Arch Linux
sudo pacman -S nvidia nvidia-utils
# Fedora
sudo dnf install akmod-nvidia
# openSUSE
sudo zypper install nvidia-driver-G06Verify Installation:
nvidia-smi
# Should show driver version and GPU infoNouveau (Open Source - Not Recommended for GUI): If you're using nouveau, consider switching to proprietary drivers for better WebKitGTK compatibility.
Mesa Drivers (Usually Pre-installed):
# Debian/Ubuntu
sudo apt install mesa-utils mesa-vulkan-drivers intel-media-va-driver
# Arch Linux
sudo pacman -S mesa vulkan-intel intel-media-driver
# Fedora
sudo dnf install mesa-dri-drivers mesa-vulkan-drivers intel-media-driverVerify Installation:
glxinfo | grep "OpenGL renderer"
# Should show Intel GPU nameMesa Drivers (Open Source - Recommended):
# Debian/Ubuntu
sudo apt install mesa-utils mesa-vulkan-drivers mesa-vdpau-drivers
# Arch Linux
sudo pacman -S mesa vulkan-radeon libva-mesa-driver
# Fedora
sudo dnf install mesa-dri-drivers mesa-vulkan-drivers mesa-vdpau-driversAMDGPU-PRO (Proprietary - Optional): Download from AMD's website if needed for professional workloads.
Verify Installation:
glxinfo | grep "OpenGL renderer"
# Should show AMD GPU name# Check WebKitGTK version
pkg-config --modversion webkit2gtk-4.1
# Recommended: 2.42.0+ (has DMABUF support)
# Install/upgrade if needed
# Debian/Ubuntu
sudo apt install libwebkit2gtk-4.1-dev
# Arch Linux
sudo pacman -S webkit2gtk-4.1
# Fedora
sudo dnf install webkit2gtk4.1-devel# Current session type
echo $XDG_SESSION_TYPE
# Output: wayland or x11
# Check available displays
echo $WAYLAND_DISPLAY # e.g., wayland-0
echo $DISPLAY # e.g., :0
# List running compositors/window managers
ps aux | grep -E 'sway|hyprland|mutter|kwin|xorg'# Detailed GPU info
lspci | grep -i vga
# OpenGL information
glxinfo | head -20
# Vulkan information
vulkaninfo | head -20
# PCI vendor ID (used by auto-detection)
cat /sys/class/drm/card0/device/vendor
# 0x10de = NVIDIA
# 0x8086 = Intel
# 0x1002 = AMD# NVIDIA
nvidia-smi -l 1 # update every second
# Intel
sudo intel_gpu_top
# AMD
radeontop# While GUI is running
ps aux | grep WebKit
# Should show WebKitWebProcess and WebKitNetworkProcess
# Check renderer process arguments
ps aux | grep WebKitWebProcess
# Look for --use-angle or other rendering flags# Full debug output
RUST_LOG=trace \
WEBKIT_DEBUG=all \
GTK_DEBUG=all \
GDK_DEBUG=all \
cargo tauri dev 2>&1 | tee debug.log
# Analyze log for errors
grep -i error debug.log
grep -i warning debug.log
grep -i gbm debug.log# Test software rendering (very slow, but always works)
LIBGL_ALWAYS_SOFTWARE=1 cargo tauri dev
# Test with different Mesa drivers (if multiple installed)
MESA_LOADER_DRIVER_OVERRIDE=iris cargo tauri dev # Intel
MESA_LOADER_DRIVER_OVERRIDE=radeonsi cargo tauri dev # AMD# Trace display server connections
strace -e trace=connect cargo tauri dev 2>&1 | grep -E 'wayland|x11'
# Trace file access (find missing libraries)
strace -e trace=open,openat cargo tauri dev 2>&1 | grep -E '\.so|gbm|dri'If automatic detection doesn't solve your issue:
-
Check Logs:
./dev.sh --verbose
-
Try Manual Overrides: See Manual Overrides section
-
Report Issue:
- Include output of
./dev.sh --verbose - Include GPU info:
lspci | grep VGA - Include display server:
echo $XDG_SESSION_TYPE - Include WebKitGTK version:
pkg-config --modversion webkit2gtk-4.1 - Include Mesa version:
glxinfo | grep "OpenGL version"
- Include output of
-
Workaround While Waiting for Fix:
# Most compatible settings GDK_BACKEND=x11 \ WEBKIT_DISABLE_DMABUF_RENDERER=1 \ cargo tauri dev
- Tauri Linux Troubleshooting
- Tauri Issue #13493 (GBM Buffer)
- Tauri Issue #9394 (NVIDIA Docs)
- Tauri Issue #8254 (Empty Window)
- Mesa3D Documentation
- Wayland Documentation
- Arch Wiki: NVIDIA
- Arch Wiki: Intel Graphics
- Arch Wiki: AMDGPU
Last Updated: 2026-02-06 SPECTRE Version: 0.5.0-alpha.4+