WebCord icon indicating copy to clipboard operation
WebCord copied to clipboard

Screen share is more laggy on Webcord than Discord

Open mak448a opened this issue 2 years ago • 11 comments

Aknowledgements

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

  • [x] This bug affects Discord website.

  • [ ] This issue is confirmed to be reproduceable when WebCord is packaged on at least all three latest supported Electron major releases.

  • [ ] This issue is reproduceable in Chrome, Chromium or any Chromium-based browser, e.g Brave or Edge (please write in Additional Context which browser you have used if it is neither Chrome nor unmodified Chromium).

  • [ ] There are no fixes done to master which resolves this 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 in affected releases (please write it in Additional context section below).

Operating System / Platform

🐧️ Linux

Operating system architecture

x64 (64-bit Intel/AMD)

Electron version

24.0.0

Application version

4.2.0

Bug description

Whenever I screenshare to a Direct Message channel, my friend says that it lags a lot. But when I use the official Discord on Xorg, he says it's a lot smoother.

Additional context

Wayland, Intel Iris Xe GPU

My friend is using the official Discord desktop client.

mak448a avatar Jun 29 '23 15:06 mak448a

One of possible cases:

  1. There's no GPU acceleration. There's a little you can do about it, you might mess with Chromium flags, try optimize setting that sets some of the flags automatically or use another Electron build with WebCord (it should be fine using versions as old as 23, maybe even 22).

  2. Differences in Discord WebRTC design described briefly in this comment and on Discord blog.

  3. A bug with Wayland, Chromium has these a lot.


There's very little I can do on my end for all of these cases:

  1. As discussed several times, there's no magical button nor switch that I could use to make GPU acceleration guaranteed on specific hardware; it all depends on Chromium, OS and driver support to happen. Currently WebCord has an option that triggers a bunch of flags that might help, but it can also make things worse or don't make any difference.
Handling GPU acceleration in Chromium be like:
  1. WebCord won't integrate with any of Discord's native modules for a lot of reasons (e.g. ARM support, legal use), but once I'll be done with making another Discord client / rewritting WebCord it might be possible for the community to do it for me without trashing or modifying the current implementation instead thanks to modular design.

  2. I do not work on Chromium engine, so don't expect me to fix this.


Also, due you did not provided the information if this issue was tested on X for WebCord as well, I'll add a Wayland label to indicate this might be a Wayland-specific issue. Feel free to comment on that to make this change, optionally also providing the information if XWayland or native Wayland was used.

SpacingBat3 avatar Jun 30 '23 22:06 SpacingBat3

Ok, thanks

mak448a avatar Jun 30 '23 22:06 mak448a

I believe I know exactly what this is. Pipewire capture cross-GPU appears to lag something heavy, even OBS is affected if you happen to use your laptop dGPU to encode but your desktop session on the iGPU.

One of two things must be fixed, the Chromium engine should select the iGPU render node instead of the dGPU. Or pipewire screen capture on wayland needs cross-GPU performance addressed.

SpookySkeletons avatar Jul 27 '23 14:07 SpookySkeletons

Nope, I think it's just missing GPU accel overall

https://chromium-review.googlesource.com/c/chromium/src/+/3646633

SpookySkeletons avatar Jan 06 '24 17:01 SpookySkeletons

Reports of fully working wayland VAAPI incoming https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26165

SpookySkeletons avatar Jan 06 '24 19:01 SpookySkeletons

I don't know if this is a error Knowledge or not but I have this issue on performance in the last release in debian 12. I tried with discord and it works better than it. I want use webcord because full screen sharing in wayland is fully supported but the performance on it is awful, too much laggy. Could I help on it sending logs or similar? I downgrade two previous release even the colleage has indicated v4.6.1 and this one works a little bit better but not optimus.

Amdarin avatar Mar 01 '24 13:03 Amdarin

@Amdarin Have you tried xwaylandvideobridge for screensharing on the official client?

mak448a avatar Mar 01 '24 17:03 mak448a

@Amdarin Have you tried xwaylandvideobridge for screensharing on the official client?

I've done this and it crashes xwayland entirely when selecting new windows, such as games. When this happens your game, steam, and anything else running under xwayland will suddenly close.

ruineka avatar Jul 07 '24 17:07 ruineka

What is your distro and desktop environment? I’m using KDE.

mak448a avatar Jul 07 '24 22:07 mak448a

What is your distro and desktop environment? I’m using KDE.

EndeavourOS and Im using KDE 6.1.

ruineka avatar Jul 07 '24 22:07 ruineka

I just tried recently, and it seems like I can't share. Just a grey screen. No crashing though.

You should probably just use the web version discord.com/app instead, since browsers usually have better Wayland support.

mak448a avatar Jul 08 '24 00:07 mak448a