Mailspring 1.10 still uses Xwayland when Wayland interface is available

Description

I was very excited to see that the new 1.10 release of Mailspring upgraded to Electron 14 and enabled Wayland support. However, upon upgrading it is still using XWayland as an interface, which makes things quite blurry (I am using fractional scaling on Gnome-shell 41). Is there a way to force Mailspring to use the native Wayland interface?

To Reproduce…

Steps to reproduce the behavior:

  1. Install Mailspring 1.10 via Snap
  2. Run xeyes
  3. Run Mailspring
  4. Observe that Mailspring is using XWayland (via Xeyes moving)

Expected Behavior

Mailspring to use native Wayland interface and only fall back to XWayland if needed.

Actually you can start mailspring on Ozone/Wayland with:

mailspring --enable-features=UseOzonePlatform --ozone-platform=wayland

The initial setup of the account works flawlessly and let me configure my Gmail account.

Still at the end of the day if I try to click on the systray icon I have the app freeze on the cli and eventually crash:

[28317:0302/135451.907614:ERROR:gl_surface_egl.cc(780)] EGL Driver message (Error) eglQueryDevicesEXT: EGL_BAD_ALLOC error: In eglQueryDevicesEXT: Failed to allocate device list.

[28317:0302/135451.935098:ERROR:gpu_init.cc(441)] Passthrough is not supported, GL is egl
[28317:0302/135451.944663:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
Running database migrations
App load time: 539ms

{“error”:null}
[28278:0302/135452.074400:ERROR:cursor_loader.cc(115)] Failed to load a platform cursor of type kNull
(node:28278) electron: The default of nativeWindowOpen is deprecated and will be changing from false to true in Electron 15. See https://github.com/electron/electron/issues/28511 for more information.
(Use mailspring --trace-warnings ... to show where the warning was created)
(node:28278) electron: The default of nativeWindowOpen is deprecated and will be changing from false to true in Electron 15. See https://github.com/electron/electron/issues/28511 for more information.
Manual update check (updates.getmailspring.com/check/linux/x64/1.10.0-06926efb/f9b615d3-3aec-4a2d-b3dd-960862282825/stable) returned 204

Just adding to this that the latest Mailspring under Wayland is also not running for me. Running under the default xwayland works fine, however attempting to run with the Wayland flags just bombs. Happy to help debug this further.

System
Distro: Arch Linux
WM: Sway
Kernel: Linux 5.17.3-arch1-1

Log

~ mailspring --version
1.10.3-a476c230

~ mailspring --enable-features=UseOzonePlatform --ozone-platform=wayland --gpu-testing-vendor-id=0x8086 
[14326:0420/114130.145243:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[14326:0420/114130.145263:ERROR:select_file_dialog_impl_portal.cc(243)] Failed to read portal version property
[14367:0420/114130.181494:ERROR:gpu_init.cc(454)] Passthrough is not supported, GL is egl, ANGLE is
[14367:0420/114130.194342:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
Running database migrations
App load time: 187ms

{"error":null}
[14326:0420/114130.230611:ERROR:cursor_loader.cc(116)] Failed to load a platform cursor of type kNull
[14326:0420/114130.626362:ERROR:wayland_event_watcher.cc(292)] Fatal Wayland protocol error 3 on interface xdg_surface (object 53). Shutting down..
[0420/114130.635210:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0420/114130.655928:ERROR:directory_reader_posix.cc(42)] opendir /home/kaishiro/.config/Mailspring/Crashpad/attachments/6d70fdd8-5686-42ff-b4cb-45b630368112: No such file or directory (2)
[0420/114130.656875:WARNING:minidump_to_upload_parameters.cc(67)] duplicate annotation name ver, discarding value 1.10.3
[0420/114130.656900:WARNING:minidump_to_upload_parameters.cc(67)] duplicate annotation name platform, discarding value linux
zsh: trace trap (core dumped)  mailspring --enable-features=UseOzonePlatform --ozone-platform=wayland
3 Likes

When running the MailSpring with Uozone platform the client opens in the tray but I cannot interact with the tray icon. Notifications don’t work either.

System:
Arch Linux
Mailspring version 1.10.8-1
Packaging formats tried: AUR version, flatpak, snap. All had the same issue.
WM: Hyprland (tried on KDE as well)
Kernel: 6.3.2-arch1-1 #1
CPU: Ryzen 9 5900x
GPU: NVIDIA 3060 TI

Log:

❯ mailspring --enable-features=UseOzonePlatform --ozone-platform=wayland
[339513:0521/142017.617916:ERROR:gpu_init.cc(454)] Passthrough is not supported, GL is egl, ANGLE is 
Running database migrations
App load time: 233ms

{"error":null}
[339401:0521/142017.675215:ERROR:cursor_loader.cc(116)] Failed to load a platform cursor of type kNull
MESA-LOADER: failed to open nvidia-drm: /usr/lib/gbm/nvidia-drm_gbm.so: cannot open shared object file: Permission denied (search paths /usr/lib/gbm, suffix _gbm)
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to open nvidia-drm: /usr/lib/dri/nvidia-drm_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/dri, suffix _dri)
MESA-LOADER: failed to open zink: /usr/lib/dri/zink_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/dri, suffix _dri)
MESA-LOADER: failed to open kms_swrast: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/dri, suffix _dri)
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib/dri, suffix _dri)
Manual update check (updates.getmailspring.com/check/linux/x64/1.10.8-8ea2a61f/dfd836ba-0168-49f6-b5ae-a61236ad58ea/stable) returned 204