Skip to content

feat(desktop): apply WebKit rendering workarounds at startup on Linux - #3271

Merged
wpfleger96 merged 1 commit into
mainfrom
duncan/webkit-recovery-ladder
Jul 28, 2026
Merged

feat(desktop): apply WebKit rendering workarounds at startup on Linux#3271
wpfleger96 merged 1 commit into
mainfrom
duncan/webkit-recovery-ladder

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Jul 28, 2026

Copy link
Copy Markdown
Member

On some Linux GPU/driver/compositor combinations, WebKitGTK's dmabuf renderer aborts the web process during startup, so Buzz comes up with no window at all and the user has no way to fix it. Setting WEBKIT_DISABLE_DMABUF_RENDERER=1 avoids the abort by falling back to the shared-memory buffer path.

WebKit reads each of its rendering variables exactly once per process, so the choice has to be made before anything initializes — there is no runtime toggle and no second chance later in the same process. This decides up front from two cheap preflight signals rather than reacting to a crash:

  • NVIDIA GPU — any DRM device under /sys/class/drm reporting PCI vendor 0x10de, the driver family behind most upstream reports.
  • AppImage — the APPIMAGE environment variable. linuxdeploy's AppRun hook pins GDK_BACKEND=x11, and the dmabuf renderer buys nothing on that XWayland path.

Either signal disables the dmabuf renderer. Neither signal leaves the environment untouched.

Escape hatches

--safe-rendering forces the safest configuration for one launch — WEBKIT_DISABLE_DMABUF_RENDERER plus WEBKIT_DISABLE_COMPOSITING_MODE — for a machine neither signal recognises.

Any user assignment of a variable this module may set stands the heuristic down wholesale. Presence is the test, not truthiness, so VAR=0 and VAR= both count: a user asking for the dmabuf renderer on gets it, even on a machine the heuristic would have opted out. --safe-rendering against such an assignment is refused with a diagnostic naming both the assignment and the key to unset, and exits non-zero — the flag and the environment are two incompatible answers to one question, and neither is guessed.

Placement

webkit_rendering::apply() runs at the top of fn main(), before buzz_lib::run(). That is the only point where the process is still single threaded with no GTK object alive, which is what makes std::env::set_var sound; the module doc and the call site both say so. The whole module is #[cfg(target_os = "linux")] — macOS and Windows compile none of it.

The decision is a pure function of argv, an injected environment lookup, and an injected DRM root, so all of it is unit-testable without mutating the process environment.

Closes #2338. Upstream: tauri#9394. Same approach and same variable as clash-verge-rev workarounds.rs and screenpipe linux_webkit_env.rs.

@wpfleger96
wpfleger96 requested a review from a team as a code owner July 28, 2026 05:16
@wpfleger96
wpfleger96 marked this pull request as draft July 28, 2026 19:35
WebKitGTK's dmabuf renderer aborts the web process during startup on
some Linux GPU/driver/compositor combinations, so Buzz comes up with no
window and the user has no way to fix it (#2338). WebKit reads each
rendering variable exactly once per process, so the choice has to be made
before anything initializes — there is no runtime toggle and no second
chance later in the same process.

Rather than react to a crash, this decides up front from two cheap
signals: an NVIDIA GPU (the driver family behind most upstream reports)
and AppImage packaging (where the AppRun hook pins GDK_BACKEND=x11 and
the dmabuf renderer buys nothing). Either hit disables the dmabuf
renderer. Any user assignment of a variable this module may set stands
the heuristic down wholesale, presence being the test so 0 and empty
count. --safe-rendering forces the safest set for one launch and refuses,
rather than guesses, when it contradicts the user's environment.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96
wpfleger96 force-pushed the duncan/webkit-recovery-ladder branch from b0af758 to f611698 Compare July 28, 2026 20:55
@wpfleger96 wpfleger96 changed the title feat(desktop): add WebKit renderer recovery ladder for Linux feat(desktop): apply WebKit rendering workarounds at startup on Linux Jul 28, 2026
@wpfleger96
wpfleger96 marked this pull request as ready for review July 28, 2026 21:20
@wpfleger96
wpfleger96 merged commit 3ece446 into main Jul 28, 2026
25 checks passed
@wpfleger96
wpfleger96 deleted the duncan/webkit-recovery-ladder branch July 28, 2026 21:20
tlongwell-block pushed a commit that referenced this pull request Jul 28, 2026
* origin/main:
  feat(acp): steer claude-code and codex agents via _session/steering (#3007)
  feat(desktop): apply WebKit rendering workarounds at startup on Linux (#3271)
  fix(desktop): stabilize flaky DM expansion E2E ordering assertions (#2004)
  docs(contributing): document the Linux system libraries just ci requires (#3396)

Signed-off-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
Co-authored-by: Tyler Longwell <tlongwell@block.xyz>
Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
dophsquare pushed a commit to sailt-k/buzz that referenced this pull request Jul 28, 2026
Pull in nostr 0.44.6 (patched NIP-44 v2 DoS advisory) to clear the
Security/cargo-deny failure. No conflicts.

Co-authored-by: Phuoc (Phu) Do <91568955+dophsquare@users.noreply.github.com>
Signed-off-by: Phuoc (Phu) Do <91568955+dophsquare@users.noreply.github.com>

* origin/main: (74 commits)
  chore(ci): bump desktop smoke E2E timeout to 30 minutes (block#3409)
  release(chart): publish 0.1.7 (block#3393)
  feat(acp): steer claude-code and codex agents via _session/steering (block#3007)
  feat(desktop): apply WebKit rendering workarounds at startup on Linux (block#3271)
  fix(desktop): stabilize flaky DM expansion E2E ordering assertions (block#2004)
  docs(contributing): document the Linux system libraries just ci requires (block#3396)
  fix(desktop): paint community rail full height (block#3382)
  fix(acp): disable goose cron scheduler in managed agent children (block#3144)
  feat(desktop): add custom harness inline from agent dialogs (block#3252)
  chore(compose): remove stale typesense env vars (block#3332)
  feat(desktop): refine agent catalog sharing (block#2439)
  fix(desktop): keep drafts out of the Inbox All view (block#3217)
  docs: restructure DCO guidance into scannable subsection (block#3337)
  Unify mobile loading spinners (block#3314)
  fix(desktop): restore the inbox icon in the sidebar (block#3341)
  fix(desktop): gate codex-acp on a minimum supported version (block#3254)
  feat(cli): add users set-status command for NIP-38 profile status (block#3253)
  fix(composer): scope multiline block formatting (block#3246)
  feat(chart): add relay pod extension points (block#3322)
  Refine mobile attachment picking (block#3313)
  ...
dophsquare pushed a commit to SHL0MS/buzz that referenced this pull request Jul 28, 2026
Co-authored-by: Phuoc (Phu) Do <91568955+dophsquare@users.noreply.github.com>
Signed-off-by: Phuoc (Phu) Do <91568955+dophsquare@users.noreply.github.com>

* origin/main:
  chore(ci): bump desktop smoke E2E timeout to 30 minutes (block#3409)
  release(chart): publish 0.1.7 (block#3393)
  feat(acp): steer claude-code and codex agents via _session/steering (block#3007)
  feat(desktop): apply WebKit rendering workarounds at startup on Linux (block#3271)
  fix(desktop): stabilize flaky DM expansion E2E ordering assertions (block#2004)
  docs(contributing): document the Linux system libraries just ci requires (block#3396)
  fix(desktop): paint community rail full height (block#3382)
  fix(acp): disable goose cron scheduler in managed agent children (block#3144)
  feat(desktop): add custom harness inline from agent dialogs (block#3252)
  chore(compose): remove stale typesense env vars (block#3332)
  feat(desktop): refine agent catalog sharing (block#2439)
  fix(desktop): keep drafts out of the Inbox All view (block#3217)
  docs: restructure DCO guidance into scannable subsection (block#3337)
  Unify mobile loading spinners (block#3314)
  fix(desktop): restore the inbox icon in the sidebar (block#3341)
  fix(desktop): gate codex-acp on a minimum supported version (block#3254)
  feat(cli): add users set-status command for NIP-38 profile status (block#3253)
  fix(composer): scope multiline block formatting (block#3246)
  feat(chart): add relay pod extension points (block#3322)
  Refine mobile attachment picking (block#3313)
dophsquare pushed a commit to linxule/buzz that referenced this pull request Jul 28, 2026
Co-authored-by: Phuoc (Phu) Do <91568955+dophsquare@users.noreply.github.com>
Signed-off-by: Phuoc (Phu) Do <91568955+dophsquare@users.noreply.github.com>

* origin/main:
  chore(ci): bump desktop smoke E2E timeout to 30 minutes (block#3409)
  release(chart): publish 0.1.7 (block#3393)
  feat(acp): steer claude-code and codex agents via _session/steering (block#3007)
  feat(desktop): apply WebKit rendering workarounds at startup on Linux (block#3271)
  fix(desktop): stabilize flaky DM expansion E2E ordering assertions (block#2004)
  docs(contributing): document the Linux system libraries just ci requires (block#3396)
  fix(desktop): paint community rail full height (block#3382)
  fix(acp): disable goose cron scheduler in managed agent children (block#3144)
  feat(desktop): add custom harness inline from agent dialogs (block#3252)
  chore(compose): remove stale typesense env vars (block#3332)
  feat(desktop): refine agent catalog sharing (block#2439)
  fix(desktop): keep drafts out of the Inbox All view (block#3217)
  docs: restructure DCO guidance into scannable subsection (block#3337)
  Unify mobile loading spinners (block#3314)
  fix(desktop): restore the inbox icon in the sidebar (block#3341)
  fix(desktop): gate codex-acp on a minimum supported version (block#3254)
  feat(cli): add users set-status command for NIP-38 profile status (block#3253)
  fix(composer): scope multiline block formatting (block#3246)
dophsquare pushed a commit to bhargavms/buzz that referenced this pull request Jul 28, 2026
Co-authored-by: Phuoc (Phu) Do <91568955+dophsquare@users.noreply.github.com>
Signed-off-by: Phuoc (Phu) Do <91568955+dophsquare@users.noreply.github.com>

* origin/main: (111 commits)
  chore(ci): bump desktop smoke E2E timeout to 30 minutes (block#3409)
  release(chart): publish 0.1.7 (block#3393)
  feat(acp): steer claude-code and codex agents via _session/steering (block#3007)
  feat(desktop): apply WebKit rendering workarounds at startup on Linux (block#3271)
  fix(desktop): stabilize flaky DM expansion E2E ordering assertions (block#2004)
  docs(contributing): document the Linux system libraries just ci requires (block#3396)
  fix(desktop): paint community rail full height (block#3382)
  fix(acp): disable goose cron scheduler in managed agent children (block#3144)
  feat(desktop): add custom harness inline from agent dialogs (block#3252)
  chore(compose): remove stale typesense env vars (block#3332)
  feat(desktop): refine agent catalog sharing (block#2439)
  fix(desktop): keep drafts out of the Inbox All view (block#3217)
  docs: restructure DCO guidance into scannable subsection (block#3337)
  Unify mobile loading spinners (block#3314)
  fix(desktop): restore the inbox icon in the sidebar (block#3341)
  fix(desktop): gate codex-acp on a minimum supported version (block#3254)
  feat(cli): add users set-status command for NIP-38 profile status (block#3253)
  fix(composer): scope multiline block formatting (block#3246)
  feat(chart): add relay pod extension points (block#3322)
  Refine mobile attachment picking (block#3313)
  ...
dophsquare pushed a commit to darox/buzz that referenced this pull request Jul 28, 2026
Co-authored-by: Phuoc (Phu) Do <91568955+dophsquare@users.noreply.github.com>
Signed-off-by: Phuoc (Phu) Do <91568955+dophsquare@users.noreply.github.com>

* origin/main: (84 commits)
  chore(ci): bump desktop smoke E2E timeout to 30 minutes (block#3409)
  release(chart): publish 0.1.7 (block#3393)
  feat(acp): steer claude-code and codex agents via _session/steering (block#3007)
  feat(desktop): apply WebKit rendering workarounds at startup on Linux (block#3271)
  fix(desktop): stabilize flaky DM expansion E2E ordering assertions (block#2004)
  docs(contributing): document the Linux system libraries just ci requires (block#3396)
  fix(desktop): paint community rail full height (block#3382)
  fix(acp): disable goose cron scheduler in managed agent children (block#3144)
  feat(desktop): add custom harness inline from agent dialogs (block#3252)
  chore(compose): remove stale typesense env vars (block#3332)
  feat(desktop): refine agent catalog sharing (block#2439)
  fix(desktop): keep drafts out of the Inbox All view (block#3217)
  docs: restructure DCO guidance into scannable subsection (block#3337)
  Unify mobile loading spinners (block#3314)
  fix(desktop): restore the inbox icon in the sidebar (block#3341)
  fix(desktop): gate codex-acp on a minimum supported version (block#3254)
  feat(cli): add users set-status command for NIP-38 profile status (block#3253)
  fix(composer): scope multiline block formatting (block#3246)
  feat(chart): add relay pod extension points (block#3322)
  Refine mobile attachment picking (block#3313)
  ...
dophsquare pushed a commit to skyerus/buzz that referenced this pull request Jul 28, 2026
Co-authored-by: Phuoc (Phu) Do <91568955+dophsquare@users.noreply.github.com>
Signed-off-by: Phuoc (Phu) Do <91568955+dophsquare@users.noreply.github.com>

* origin/main: (111 commits)
  chore(ci): bump desktop smoke E2E timeout to 30 minutes (block#3409)
  release(chart): publish 0.1.7 (block#3393)
  feat(acp): steer claude-code and codex agents via _session/steering (block#3007)
  feat(desktop): apply WebKit rendering workarounds at startup on Linux (block#3271)
  fix(desktop): stabilize flaky DM expansion E2E ordering assertions (block#2004)
  docs(contributing): document the Linux system libraries just ci requires (block#3396)
  fix(desktop): paint community rail full height (block#3382)
  fix(acp): disable goose cron scheduler in managed agent children (block#3144)
  feat(desktop): add custom harness inline from agent dialogs (block#3252)
  chore(compose): remove stale typesense env vars (block#3332)
  feat(desktop): refine agent catalog sharing (block#2439)
  fix(desktop): keep drafts out of the Inbox All view (block#3217)
  docs: restructure DCO guidance into scannable subsection (block#3337)
  Unify mobile loading spinners (block#3314)
  fix(desktop): restore the inbox icon in the sidebar (block#3341)
  fix(desktop): gate codex-acp on a minimum supported version (block#3254)
  feat(cli): add users set-status command for NIP-38 profile status (block#3253)
  fix(composer): scope multiline block formatting (block#3246)
  feat(chart): add relay pod extension points (block#3322)
  Refine mobile attachment picking (block#3313)
  ...
dophsquare pushed a commit to arisgysel-design/buzz that referenced this pull request Jul 28, 2026
Co-authored-by: Phuoc (Phu) Do <91568955+dophsquare@users.noreply.github.com>
Signed-off-by: Phuoc (Phu) Do <91568955+dophsquare@users.noreply.github.com>

* origin/main: (126 commits)
  chore(ci): bump desktop smoke E2E timeout to 30 minutes (block#3409)
  release(chart): publish 0.1.7 (block#3393)
  feat(acp): steer claude-code and codex agents via _session/steering (block#3007)
  feat(desktop): apply WebKit rendering workarounds at startup on Linux (block#3271)
  fix(desktop): stabilize flaky DM expansion E2E ordering assertions (block#2004)
  docs(contributing): document the Linux system libraries just ci requires (block#3396)
  fix(desktop): paint community rail full height (block#3382)
  fix(acp): disable goose cron scheduler in managed agent children (block#3144)
  feat(desktop): add custom harness inline from agent dialogs (block#3252)
  chore(compose): remove stale typesense env vars (block#3332)
  feat(desktop): refine agent catalog sharing (block#2439)
  fix(desktop): keep drafts out of the Inbox All view (block#3217)
  docs: restructure DCO guidance into scannable subsection (block#3337)
  Unify mobile loading spinners (block#3314)
  fix(desktop): restore the inbox icon in the sidebar (block#3341)
  fix(desktop): gate codex-acp on a minimum supported version (block#3254)
  feat(cli): add users set-status command for NIP-38 profile status (block#3253)
  fix(composer): scope multiline block formatting (block#3246)
  feat(chart): add relay pod extension points (block#3322)
  Refine mobile attachment picking (block#3313)
  ...
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.

[Bug] WebKitGTK dmabuf renderer core dump

1 participant