Skip to content

[Linux] Windsurf defaults to XWayland instead of native Wayland #311

@Ranteck

Description

@Ranteck

Environment

  • OS: CachyOS (Arch-based)
  • Kernel: 6.19.11-1-cachyos
  • Compositor: Niri (Wayland)
  • Windsurf version: 1.108.2
  • Electron: 39

Problem

The /usr/bin/windsurf launcher script and .desktop file use --ozone-platform-hint=auto, which causes Electron to choose XWayland even when a Wayland session is active (WAYLAND_DISPLAY=wayland-1).

This can be confirmed by checking the environment of the main Windsurf process:

ELECTRON_OZONE_PLATFORM_HINT=auto
WAYLAND_DISPLAY=wayland-1
DISPLAY=:0   ← running under XWayland

And verifying it has X11 windows registered:

xwininfo -root -tree | grep -i windsurf  # returns results → XWayland

Workaround

Set --ozone-platform-hint=wayland in ~/.config/windsurf-flags.conf, or set ELECTRON_OZONE_PLATFORM_HINT=wayland in ~/.config/environment.d/.

After applying the workaround:

ELECTRON_OZONE_PLATFORM_HINT=wayland
WAYLAND_DISPLAY=wayland-1
# no X11 windows registered → native Wayland

Expected behavior

When XDG_SESSION_TYPE=wayland, Windsurf should default to native Wayland. VS Code has the same open issue for reference: microsoft/vscode#207033.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions