WebCord: Wayland rendering backend not working

Aknowledgements

  • I have checked that there’s no other issue describing the same or similar problem that I currently have, regardless if it has been closed or open.

  • I can confirm that this is not an issue with the Discord website, but it is a problem specific to the WebCord itself.

  • I have tried running the build from the master branch and it does not have any fixes implemented according to my issue.

  • My issue describes one of the unstable and/or not fully implemented features.

  • I have found a workaround to mitigate or temporarily fix this issue (please write it in Additional context section).

Operating System / Platform

🐧️ Linux

Operating system architecture

x64 (64-bit Intel/AMD)

Electron version

19.0.6

Application version

v3.3.0

Bug description

Summary Electron has massive input lag for text fields under Wayland, at least if an Nvidia GPU is being used. Chrome’s/Electron’s new Ozone Wayland rendering backend can’t be enabled

Details:

Electron works a lot better, when using the native Ozone Wayland rendering backend, which can be enabled with the flags --enable-features=UseOzonePlatform --ozone-platform=wayland.

I have successfully applied this workaround to a bunch of different Electron apps (e.g. Element, Visual Studio Code…), however, when trying to do the same for Webcord, the application crashes with a segfault:

$ /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=run.sh io.github.spacingbat3.webcord --enable-features=UseOzonePlatform --ozone-platform=wayland
[4:0625/154538.352902:ERROR:wayland_connection.cc(209)] Failed to connect to Wayland display
[4:0625/154538.352924:ERROR:ozone_platform_wayland.cc(226)] Failed to initialize Wayland platform
[4:0625/154538.352932:ERROR:env.cc(226)] The platform failed to initialize.  Exiting.
/app/bin/run.sh: line 16:     4 Segmentation fault      (core dumped) env TMPDIR=$XDG_CACHE_HOME zypak-wrapper /app/bin/webcord $FLAGS "$@"

Does this maybe require a compile flag to be enabled?

Additional context

My System:

OS: Fedora 36 GPU: Nvidia RTX 3080 graphics driver: proprietary nvidia driver, version 510 Desktop Environment: Gnome 42.2

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 17 (7 by maintainers)

Most upvoted comments

Using the rpm installation I get a different experience then reported above.

WebCord does launch using --ozone-platform and I can see that it is running native wayland and mostly works however there are some issues:

1. The left side of the application is corrupted

2. The title bar with the x button is missing

3. It does not fill the screen when maximized

4. Unable to open the file/edit/view/window/help menus

Blue squares were added to remove some personal information however you can see the difference between the two despite both being maximized.

I am using Fedora 36 and WebCord 3.5.0.

Native wayland: native-wayland

XWayland: xwayland

I believe most of the issues I was seeing will be fixed in https://github.com/electron/electron/pull/34955

still broken cannot resize 😦

@skarpinis unrelated to this issue, couldn’t reproduce the last time I toyed with Wayland and overall to be discussed somewhere else (see initial issue description for what fits there).