question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wayland rendering backend not working

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
fontivancommented, Jul 18, 2022

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

0reactions
SpacingBat3commented, Sep 2, 2022
--ozone-platform-hint=auto 
--enable-features=UseOzonePlatform,WaylandWindowDecorations,WebRTCPipeWireCapturer

@fontivan The last two shouldn’t be required through, WebCord should apply these automatically.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to debug Wayland problems - Fedora Docs
If you're running an X11 session, not a Wayland session, your problems are not related to Wayland. It's a bug either in that...
Read more >
Linux: Nested(wayland-backend) wayland is not working
Hello. I'm working dra75x EVM with processor sdk(included wayland 1.9.0). We need implement application on wayland. but nested wayland look not ...
Read more >
Why does kwin_wayland not start? - Martin's Blog
This means that the platform/backend plugin is not installed. KWin supports multiple platforms and distributions put them in multiple packages.
Read more >
Render and Display backends based on wlroots (#137) · Issues
On Wayland we provide two ways to render: via OpenGl or QPainter, ... Q: When the DRM backend is based on wlroots, should...
Read more >
Wayland - ArchWiki - Arch Linux
Most Wayland compositors only work on systems using Kernel mode setting. Wayland by itself does not provide a graphical environment; for this you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found