Skip to content

fix(linux): avoid Wayland EGL startup failure#48

Draft
tuannx wants to merge 1 commit into
vietanhdev:mainfrom
tuannx:codex/fix-wayland-egl-startup
Draft

fix(linux): avoid Wayland EGL startup failure#48
tuannx wants to merge 1 commit into
vietanhdev:mainfrom
tuannx:codex/fix-wayland-egl-startup

Conversation

@tuannx

@tuannx tuannx commented Jul 20, 2026

Copy link
Copy Markdown

Summary

  • detect Wayland before Tauri/WebKitGTK initialization
  • select WebKitGTK's DMA-BUF fallback when no user renderer override is present, avoiding the EGL_BAD_PARAMETER startup abort reported on Arch/Plasma Wayland
  • preserve explicit WEBKIT_DISABLE_DMABUF_RENDERER choices and provide THINKUTILS_SKIP_WAYLAND_WORKAROUND=1 as an opt-out
  • document the behavior and cover Wayland, X11, override, and opt-out decisions

Closes #12.

Why this is early startup code

The renderer environment must be set before thinkutils_lib::run() initializes Tauri and creates the WebKitGTK webview. Applying it in setup hooks would be too late for the failing EGL display initialization.

Validation

Executed in a clean Debian 12 ARM64 Linux container with the same WebKitGTK/GTK packages required by CI:

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test136 passed, 0 failed, including 2 new Linux Wayland decision tests
  • git diff --check

I could not reproduce a physical Plasma/Wayland compositor inside the headless container, so the PR remains draft for a reporter/maintainer smoke test on the affected desktop.

@tuannx

tuannx commented Jul 20, 2026

Copy link
Copy Markdown
Author

Arcade Agent architecture review (fresh cache)

I ran an optional Rust architecture pass against this branch with Arcade Agent's in-review Rust parser (lemduc/arcade-agent#18). The first repo-root attempt correctly reported no directly rooted Rust sources, so I reran against src-tauri/ from a clean cache; generated cache data was removed afterward.

General result:

  • parsed 325 Rust entities and 425 dependency edges into 17 recovered components
  • Balanced Architecture Score: 0.9058
  • Principle Alignment Score: 0.8868
  • strongest signals: Acyclic Dependencies 1.0, Responsibility Focus 1.0, Interface Segregation 1.0, Boundary Clarity 0.9779
  • main improvement signals: Dependency Distribution 0.4706, Component Balance 0.5747, Hub Balance 0.75
  • no architecture smells detected

Proposal: once Rust parsing is merged and shipped in an Arcade Agent release, add a non-blocking PR report scoped to src-tauri/. That scope matters here because the repository root is frontend-first and the current analyzer discovers no Rust files from that root. A non-blocking rollout would let maintainers observe score stability before considering regression thresholds.

This PR does not add an analyzer dependency or modify CI policy.

@tuannx tuannx mentioned this pull request Jul 20, 2026
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.

error in wayland

1 participant