#568

Linux: native Wayland support (GDK_BACKEND=x11 is still forced in 2.0)

Opendanhstevensopened 28d ago

initializeGTK() in package/src/native/linux/nativeWrapper.cpp sets GDK_BACKEND=x11 with overwrite on, so every Electrobun window on a Wayland session runs through XWayland, and a user can't opt out by setting GDK_BACKEND themselves.

#420 proposed native Wayland support and was closed on 2026-08-02 with "The underlying behavior is now tracked internally for Electrobun 2.0." 2.0 has shipped, and main still forces X11 (checked 2026-10-02). Is native Wayland still planned, and is there a public issue to follow?

My issue

I build Ledge on Electrobun (2.0.1, system WebKitGTK, no CEF). A Linux user reported heavy stutter when resizing:

  • Ubuntu 26.04, GNOME on Wayland, RTX 4090, NVIDIA 595.91, WebKitGTK 2.52.6
  • Two 3840×2160 monitors at 144 Hz (one at 100% scale, one at 150%)
  • While the Ledge window is resized, XWayland runs at 99% GPU and can't keep up at 144 Hz. At 60 Hz on a single monitor it copes.
  • Ghostty and xterm show the same stutter once forced onto XWayland, but run smoothly on their default native Wayland backend. An Electrobun app has no such option.

The same Ledge build is smooth on AMD and on an RTX 3060 at lower resolution and refresh rate, so this shows up mainly on high-resolution, high-refresh setups, which are increasingly common.

#420 also noted a WebKitGTK scrolling bug on Wayland with NVIDIA that apps would need to work around, so it may be worth calling out in the docs if and when native Wayland lands.

Activity

1
hweihwang1d ago

Another case for this, from Deckloud (Electrobun 2.0.4, system WebKitGTK, no CEF). A user on Debian 13 with GNOME on Wayland and fractional scaling sees the whole window blurry, text, icons and the pointer over it, while native Wayland apps stay sharp: XWayland renders the window at 1x and the compositor stretches it (hweihwang/nextcloud-deck-desktop-releases#30). So besides the resize stutter above, forcing GDK_BACKEND=x11 also costs sharpness for anyone using fractional scaling on Wayland.