Skip to content

fix(desktop): disable JSC JIT on AVX-less Linux CPUs - #3755

Open
gokay-ai wants to merge 1 commit into
block:mainfrom
gokay-ai:agent/codex/fix-avxless-linux-jsc-202607301746
Open

fix(desktop): disable JSC JIT on AVX-less Linux CPUs#3755
gokay-ai wants to merge 1 commit into
block:mainfrom
gokay-ai:agent/codex/fix-avxless-linux-jsc-202607301746

Conversation

@gokay-ai

@gokay-ai gokay-ai commented Jul 30, 2026

Copy link
Copy Markdown

Summary

Rebased onto current main after #4505 switched dmabuf workarounds to WEBKIT_DMABUF_RENDERER_FORCE_SHM=1.

  • Disable JavaScriptCore JIT only when an x86_64 Linux CPU has readable /proc/cpuinfo feature data without AVX (JSC_useJIT=0).
  • Preserve explicit JSC_useJIT configuration (including empty values) and keep the JSC decision independent of dmabuf / --safe-rendering heuristics.
  • Retain current main dmabuf behavior: heuristic and --safe-rendering use WEBKIT_DMABUF_RENDERER_FORCE_SHM, not WEBKIT_DISABLE_DMABUF_RENDERER.
  • Document the WebKitGTK 2.52 SIGILL workaround in docs/linux-rendering-troubleshooting.md.

Related issue

Fixes #3747

Testing

  • rustfmt --edition 2021 --check desktop/src-tauri/src/webkit_rendering.rs desktop/src-tauri/src/webkit_rendering/tests.rs
  • git diff --check
  • Standalone cargo test harness for webkit_rendering (21 tests: AVX absent/present, user override, non-x86, unreadable cpuinfo, dmabuf/JSC independence, FORCE_SHM regressions)
  • cargo test --manifest-path desktop/src-tauri/Cargo.toml webkit_rendering --lib (blocked in this environment: GTK/WebKit dev packages unavailable)

@gokay-ai
gokay-ai requested a review from a team as a code owner July 30, 2026 15:05
Copilot AI review requested due to automatic review settings July 30, 2026 15:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Chessing234

Copy link
Copy Markdown
Contributor

sensible jsc workaround. please document the avx check in the linux troubleshooting doc so support can point users at it

@gokay-ai

gokay-ai commented Aug 1, 2026

Copy link
Copy Markdown
Author

Thanks — addressed in fc2820e.

The Linux troubleshooting guide now documents the exact guarded preflight (x86_64 + readable /proc/cpuinfo flags line without an avx token), the conservative cases where Buzz leaves JSC unchanged, and a copy-paste support diagnostic with output interpretation. It also spells out the manual fallback for older builds and that explicit JSC_useJIT values are preserved.

On Linux x86_64, detect missing AVX from /proc/cpuinfo and set
JSC_useJIT=0 before WebKit starts. Preserve explicit user overrides,
keep the decision independent of dmabuf heuristics, and retain current
main's WEBKIT_DMABUF_RENDERER_FORCE_SHM behavior.

Fixes block#3747

Signed-off-by: Gökay Yılmaz <60583610+gokay-ai@users.noreply.github.com>

Co-authored-by: GokayAI <gokay-ai@users.noreply.github.com>
@cursor
cursor Bot force-pushed the agent/codex/fix-avxless-linux-jsc-202607301746 branch from fc2820e to 2fbbe20 Compare August 16, 2026 21:06
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][Linux] Window freezes: WebKitWebProcess dies with SIGILL (AVX vmovaps in JavaScriptCore) on CPUs without AVX

3 participants