Skip to content

Fix Linux terminal WebGL glyph corruption - #1988

Merged
nwparker merged 1 commit into
stablyai:mainfrom
nwparker:nwparker/https-github.com-stablyai-orca-issues-1930-2
May 16, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
nwparker:nwparker/https-github.com-stablyai-orca-issues-1930-2

Conversation

@nwparker

@nwparker nwparker commented May 15, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1930

Summary

  • Keep the default terminal GPU setting as auto, but map Linux auto to xterm's DOM renderer to avoid the WebGL glyph-atlas corruption path.
  • Keep explicit On available for users who want to force WebGL.
  • Apply the same policy when settings changes dispose or reattach WebGL, so tab switches, rendering resume, and pane reparenting do not re-enter the bad path on Linux auto.
  • Update Settings copy and regression tests for Linux auto, forced WebGL, and switching from forced WebGL back to auto.

Reproduction / Proof

The reported failure is Linux GPU/Wayland-driver specific, so the local proof uses the renderer seam directly: corrupt xterm's live WebGL glyph atlas after stable terminal output is written. That reproduces the observed symptom: readable output becomes garbled until the WebGL renderer is rebuilt. The fixed policy prevents Linux auto from loading WebGL, so the same atlas-corruption path is absent.

Proof harness results:

before: renderer=WebGL, webglLoaded=true, atlasCorrupted=true
after:  renderer=DOM,   webglLoaded=false, atlasCorrupted=false

Before fix, Linux auto enters WebGL and the corrupted glyph atlas makes terminal output unreadable:

Before fix: Linux Auto enters WebGL and glyph atlas corruption garbles terminal output

After fix, Linux auto stays on DOM and the same terminal output remains readable:

After fix: Linux Auto stays on DOM and terminal output remains readable

Reference OSS Check

  • VS Code keeps the auto / on / off setting shape and falls back to DOM when WebGL cannot load.
  • WaveTerm exposes an explicit disable-WebGL path.
  • Tabby probes known bad WebGL renderers and falls back.
  • Ghostty's native renderer uses explicit texture filtering rather than relying on glyph-atlas mipmaps.

This fix follows that pattern: keep a user override, but choose the conservative renderer for Linux auto after the latest xterm glyph patch still left #1930 reproducible.

Validation

  • pnpm exec vitest run --config config/vitest.config.ts $(rg --files src/renderer/src/lib/pane-manager | rg '\.test\.ts$') -> 109 passed
  • pnpm run typecheck
  • pnpm lint
  • pnpm exec oxfmt --check src/renderer/src/components/settings/TerminalPane.tsx src/renderer/src/components/settings/terminal-search.ts src/renderer/src/lib/pane-manager/pane-lifecycle.test.ts src/renderer/src/lib/pane-manager/pane-terminal-gpu-acceleration.test.ts src/renderer/src/lib/pane-manager/pane-terminal-gpu-acceleration.ts src/renderer/src/lib/pane-manager/pane-webgl-renderer.ts src/shared/constants.ts src/shared/types.ts
  • pnpm run build:electron-vite
  • git diff --check
    )` -> 109 passed
  • pnpm run typecheck
  • pnpm lint
  • pnpm exec oxfmt --check src/renderer/src/components/settings/TerminalPane.tsx src/renderer/src/components/settings/terminal-search.ts src/renderer/src/lib/pane-manager/pane-lifecycle.test.ts src/renderer/src/lib/pane-manager/pane-terminal-gpu-acceleration.test.ts src/renderer/src/lib/pane-manager/pane-terminal-gpu-acceleration.ts src/renderer/src/lib/pane-manager/pane-webgl-renderer.ts src/shared/constants.ts src/shared/types.ts
  • pnpm run build:electron-vite
  • git diff --check

@nwparker
nwparker force-pushed the nwparker/https-github.com-stablyai-orca-issues-1930-2 branch from 2459bbe to 86eff20 Compare May 15, 2026 21:07
@nwparker
nwparker merged commit b249561 into stablyai:main May 16, 2026
2 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 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.

Terminal output becomes garbled until tab switch

1 participant