Skip to content

fix(tauri): Set WEBKIT_DMABUF_RENDERER_FORCE_SHM=1 to avoid nvidia graphics bug at no performance cost - #6293

Merged
matthewevans merged 2 commits into
phase-rs:mainfrom
lgray:fix/tiltfile-tauri-linux
Jul 21, 2026
Merged

fix(tauri): Set WEBKIT_DMABUF_RENDERER_FORCE_SHM=1 to avoid nvidia graphics bug at no performance cost#6293
matthewevans merged 2 commits into
phase-rs:mainfrom
lgray:fix/tiltfile-tauri-linux

Conversation

@lgray

@lgray lgray commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

WEBKIT_DMABUF_RENDERER_FORCE_SHM=1 on linux machines to avoid blank-screen, but keep acceleration, with nvidia graphics drivers. Without this tauri renders a blank screen, and the game is near unplayable without GPU acceleration, so WEBKIT_DISABLE_DMABUF_RENDERER=1 is not the correct solution.

This PR adds a line to the Tiltfile to ensure this environment variable is set.

…void blank-screen, but keep acceleration, with nvidia graphics drivers
@lgray
lgray requested a review from matthewevans as a code owner July 21, 2026 18:27

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request configures the WEBKIT_DMABUF_RENDERER_FORCE_SHM environment variable in the Tiltfile for the Tauri local resource to force shared-memory buffers and avoid GPU-path glitches. Feedback indicates that setting this environment variable in the Tiltfile only resolves the issue during local development, and recommends setting it programmatically in the Rust entry point of the Tauri application to ensure production builds are also protected against the blank-screen Nvidia bug.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread Tiltfile Outdated
Per review guidance: the Tiltfile env only covered local dev, leaving
packaged builds exposed to the NVIDIA blank-frame dmabuf bug. Set the
variable in phase_tauri::run() before the first webview is created,
compile-gated to Linux, with a pre-set environment value winning so
users can override. Drop the Tiltfile setting so dev builds exercise
the same in-app path as production.

Assisted-by: ClaudeCode:claude-fable-5
@lgray

lgray commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

🤖 AI text below 🤖

Addressed the review guidance: the env var is now set programmatically in phase_tauri::run() (7c6f8a7) — before the first webview is created, compile-gated #[cfg(target_os = "linux")], and only when the variable isn't already present so an operator's value wins. The Tiltfile setting is removed in the same commit: with the fix in-app, dev builds (pnpm tauri:dev) exercise the exact code path production ships, instead of masking it behind a dev-only env.

Verification: cargo check and cargo clippy -- -D warnings clean on the phase-tauri crate; cargo fmt applied; pre-commit parser gates PASS (no engine/parser surface touched).

@matthewevans
matthewevans merged commit e99f479 into phase-rs:main Jul 21, 2026
11 checks passed
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.

2 participants