Skip to content

Prevent Linux first-start black window by hardening WebKitGTK startup path - #12

Draft
aniruddhaadak80 with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-black-screen-startup
Draft

aniruddhaadak80 with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-black-screen-startup

Conversation

Copilot AI commented Nov 11, 2026 •

Copy link
Copy Markdown

On some Linux GPU/compositor stacks (notably Wayland + NVIDIA/Mesa), WebKitGTK’s DMA-BUF path could stall at first startup and leave OpenFile on a persistent black screen. This change makes Linux startup resilient by default and adds a user-visible fallback path instead of silent failure.

  • Linux graphics defaults and driver guards (desktop/src-tauri/src/main.rs)

    • Disable WEBKIT_DISABLE_DMABUF_RENDERER by default on Linux unless the user explicitly overrides it.
    • On Wayland + NVIDIA, set __NV_DISABLE_EXPLICIT_SYNC=1 when unset to avoid known protocol/render deadlocks.
    • Preserve explicit user environment settings as highest priority.
  • Startup watchdog + one-time safe-mode recovery (desktop/src-tauri/src/main.rs)

    • Add a 30s first-load watchdog.
    • If initial page load never completes, persist a safe-graphics marker and relaunch once with compositing disabled.
    • Support explicit startup controls (OPENFILE_SAFE_GPU=1, OPENFILE_GPU=1) for deterministic behavior.
  • Blank-window UX fallback (index.html)

    • Add boot-time failover UI: if app bundle boot fails, replace splash/blank state with a clear recovery message and “Try again” action linking troubleshooting guidance.
  • Regression coverage in CI (.github/workflows/desktop-start-test.yml)

    • Add desktop startup checks that launch packaged builds without renderer workarounds across Linux distros/displays (plus other desktop targets) to detect blank-window regressions earlier.
// Linux startup defaults (only if user has not set them)
if !keep_gpu {
    set_default("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
}
if safe {
    set_default("WEBKIT_DISABLE_COMPOSITING_MODE", "1");
}

// If first page never loads, relaunch once in safe graphics mode
if !loaded.load(Ordering::SeqCst) {
    linux_gpu::remember_safe_mode();
    let _ = linux_gpu::relaunch_safe();
}

@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openfile Ready Ready Preview Nov 11, 2026 4:18pm UTC
openfile-studio Ready Ready Preview Nov 11, 2026 4:18pm UTC

Copilot AI linked an issue Nov 11, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix black screen at first startup on Fedora Linux Prevent Linux first-start black window by hardening WebKitGTK startup path Nov 11, 2026

This branch has not been deployed

No deployments
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.

Black Screen at First Start up

2 participants