Skip to content

fix(desktop): Linux/Wayland freeze on ubuntu 25.10 while passing the window through a dual monitor setup with variable refresh rate #11939

@IsraelAraujo70

Description

@IsraelAraujo70

Problem

On Ubuntu 25.10 (Wayland), OpenCode freezes when moving the window between monitors with different refresh rates (60Hz + 165Hz). The process stays alive; the UI becomes unresponsive and must be killed. This happens even with the terminal panel closed.

Environment

  • Ubuntu 25.10, GNOME/Mutter (Wayland)
  • Dual monitors: 60Hz + 165Hz
  • NVIDIA RTX 4060 (driver 590.48.01 open)

Repro

  1. Start OpenCode on a Wayland session.
  2. The app forces X11/XWayland (GDK_BACKEND=x11 / WINIT_UNIX_BACKEND=x11).
  3. Move the window between monitors while windowed.
  4. UI freezes (process still alive).

Evidence

  • Debug logs show Rust + UI heartbeats continue during the freeze.
  • gnome-shell logs: "Frame has assigned frame counter but no frame drawn time" at the freeze time.
  • No kernel NVRM/Xid, segfault, or coredump entries.

Workaround (Confirmed)

Run native Wayland (do not force X11):

OC_ALLOW_WAYLAND=1 env -u GDK_BACKEND -u WINIT_UNIX_BACKEND -u WEBKIT_DISABLE_DMABUF_RENDERER -u WEBKIT_DISABLE_COMPOSITING_MODE bun run tauri dev

Proposed Fix

  • On Linux, avoid forcing X11 by default (or auto-detect mixed refresh rate setups and prefer native Wayland).
  • Suggestion: add a Settings toggle to switch between Native Wayland and X11 fallback. The toggle would set/unset these env vars on Linux:
    • GDK_BACKEND
    • WINIT_UNIX_BACKEND
    • WEBKIT_DISABLE_DMABUF_RENDERER
    • WEBKIT_DISABLE_COMPOSITING_MODE

Metadata

Metadata

Assignees

Labels

perfIndicates a performance issue or need for optimizationwebRelates to opencode on web / desktop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions