Screen sharing issues on wayland
Discord developers, if you read this post,please fix black screen in screen sharing on wayland session,and please add native support wayland on linux version of discord
-
This isn't an issue with discord, This is an issue with the way Xwayland works with screensharing. It doesn't allow it for security reasons I think. Though I think a wayland client that implements waylands native screen sharing protocols would work, see wf-recorder and wlrobs for examples of screen capture on wayland. This may not even be a discord issue and could just be solved with the ozone on chromium.
-16 -
Right, update on this, You can screenshare on discord on Wayland with pipewire. This can however be a little difficult to setup particularly on sway. I think the black screen is an issue with electron though i think the xdg-desktop-portal-wlr FAQ has details on this.
9 -
wayland screenshare in discord does not work even if I upgrade to electron12 and use the following flags:
--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WebRTCPipeWireCapturer
5 -
It does work if you use the web client
0 -
No shit Sherlock
7 -
I'm talking about this "electron --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WebRTCPipeWireCapturer path-to-discord.asar"
7 -
It's no longer an electron issue, is now your issue
8 -
Actually, initial testing does suggest it's an electron issue. My reasons for believing this are the following: Electron 12 doesn't have full support for Wayland and still requires the Xwayland process to be running to work. discord screen capture works on X11 with `--enable-features=WebRTCPipeWireCapturer`. There is also an issue on the electron git repo that was automatically closed about microsoft teams crashing when doing wayland screen capture; this was the original behavior with discord but doesn't seem to. The current behavior is the same kind of behavior i got with a miss-configured pipewire/xdg-desktop-portal-wlr (though I know that is not the issue). While this is being fixed may I suggest running chromium with `chromium --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WebRTCPipeWireCapturer --app=https://discord.com/app` as it's basically identical.
2 -
I would also like to see some progress here on the Wayland side of Linux.
The workaround with the web application still runs the application (Chromium) within XWayland.
If you remove the flag "--enable-features=WebRTCPipeWireCapturer" it's running Chromium as a native wayland app (just check using the xeyes utility), but on the downside, the app is now lacking window decorations.
But I'm pretty sure that Electron offers some solutions for this problem so please upgrade Discord to Electron 12 and enable Wayland support :)
6 -
As others have commented, Discord on chromium and firefox with the correct settings are working with PipeWire. There's no reason for not supporting screen sharing on the native Discord app for wayland.
6 -
I am very looking forward to this fix.
What needs to be done:
1. Electron needs to be updated to v12.x.x or newer (As of writing this - v12 is the latest)2. Add a couple of CLI flags
Currently Discord uses `Electron/9.3.5` ( to check version one can open dev tools and type `navigator.userAgent`)
This version is no longer supported and probably is accountable for several performance issues https://www.electronjs.org/docs/tutorial/support#currently-supported-versions
11 -
I am very looking forward to this fix as well!
4 -
I created this issue as well https://support.discord.com/hc/en-us/requests/13464388 Maybe somebody will finally pay some attention to all this :/
4 -
Screen sharing does not work on Ubuntu 21.04/Fedora 34. Electron is out of date. Please update. I think Im canceling nitro.
5 -
Major blocker for me. Won't be getting nitro until this is fixed.
7 -
Same problem here. looking forward to fix.
3 -
Same problem as well. The only time I need to logout to switch from Wayland to X11 is when I want to share my screen on Discord.
A fix would be very welcome! :)
Also Gytis I can't find that issue you've created anymore, any updates on it?3 -
Same problem for me, just updated to Ubuntu 21 and the screen share doesn't work anymore
3 -
Bump
Please can you have a look at pipewire as mentioned.
- https://support.discord.com/hc/en-us/community/posts/360068080771/comments/1500000606941
- https://support.discord.com/hc/en-us/community/posts/360068080771/comments/1500000584202
Please can you include the electron versions that have this as an option?- https://support.discord.com/hc/en-us/community/posts/360068080771/comments/1500000844302
4 -
Same issue here. I have contact support to report the issue, but nothing useful at the moment.
5 -
Confirmed on Fedora 34 with the latest Discord app from Flathub - still just black screen.
4 -
I'd love to see this getting fixed. Tested on Fedora 34 with the latest flatpak version, still having the same issues.
4 -
Artix, with latest Discord and pipewire.
I think the issue is with electron not properly supporting desktop sharing. Weirdly, Telegram of all things does support proper desktop sharing in addition to full pipewire media session support for other things like text editors.I've seen the same code in OBS, and it's weirdly even simpler than with X, so **hopefully** once electron comes with proper wayland support, this shouldn't be an issue to fix.
3 -
As a daily Linux user (Fedora 34, Ubuntu 21.04) I'd consider subbing to Nitro if my Discord experience on Wayland was consistent when it comes to screen sharing. F Windows yo.
4 -
I just wrote a guide how to use Wayland screen sharing: https://www.reddit.com/r/linux4noobs/comments/q6vhac/a_guide_for_discord_screen_sharing_on_wayland/ Hope I can help someone :)
4 -
Posting this here as well: No, it's not an Electron thing.
The Discord desktop client has their own WebRTC module; Chromium/Electron do not touch any multimedia.
So, upgrading Electron is useless (unless you can patch the code to use the webapp browser implementation). Discord needs to touch their native code, particularly enable the 'rtc_use_pipewire' flag when building libwebrtc.
For more info see: https://support.discord.com/hc/en-us/community/posts/360047644231/comments/4411147047447
3 -
The explanation makes sense, but I think you linked the false comment.
Hopefully they will do this upgrade at some point.
0 -
Is there any update on this at all, are these threads even monitored? It's pretty ridiculous, especially considering the price of Nitro that an entire subset of users are just disregarded like this.
At least if you don't want to support your users, open the client to the community and let us patch this.2 -
It's worth mentioning that Valve has confirmed Steam Deck will run Wayland. Most likely, the first non-Steam application most Steam Deck owners will install is Discord, and it'll be super inconvenient when an essential feature like streaming is missing for those millions of people.
5 -
This will most likely not be fixed in the next time, because according to a bug tester on Reddit who was/ is working voluntarily for Discord, they don't have any Linux devs right now: https://www.reddit.com/r/linux_gaming/comments/qsj5kb/comment/hkfb45n/?utm_source=share&utm_medium=web2x&context=3
So if a bug doesn't crash Discord right from the beginning, it wont be fixed anytime soon.
-> Just use the Browser version which most times works better.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
31 Kommentare