Screen sharing issues on wayland

Opmerkingen

31 opmerkingen

  • 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
  • cube

    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
  • cube

    No shit Sherlock

    7
  • cube

    I'm talking about this "electron --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WebRTCPipeWireCapturer path-to-discord.asar"

    7
  • cube

    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
  • XXXXDRAGONHUNTER123XXX

    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
  • Sagaro

    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
  • Useless

    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
  • Gytis

    I am very looking forward to this fix as well!

    4
  • Gytis

    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
  • anthr76

    Screen sharing does not work on Ubuntu 21.04/Fedora 34. Electron is out of date. Please update. I think Im canceling nitro.

    5
  • nognu

    Major blocker for me. Won't be getting nitro until this is fixed.

    7
  • SS

    Same problem here. looking forward to fix.

    3
  • Frank Huurman

    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
  • rafaelpimpa

    Same problem for me, just updated to Ubuntu 21 and the screen share doesn't work anymore

    3
  • lcsvcn

    Same issue here. I have contact support to report the issue, but nothing useful at the moment.

    5
  • zamazan4ik

    Confirmed on Fedora 34 with the latest Discord app from Flathub - still just black screen.

    4
  • geraldofada

    I'd love to see this getting fixed. Tested on Fedora 34 with the latest flatpak version, still having the same issues.

    4
  • a-p-petrosyan

    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
  • Floressence

    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
  • _juri_1

    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
  • Alba

    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
  • XXXXDRAGONHUNTER123XXX

    The explanation makes sense, but I think you linked the false comment.

    Hopefully they will do this upgrade at some point.

    0
  • Chazalias

    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
  • intrlocutr

    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
  • XXXXDRAGONHUNTER123XXX

    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

U moet u aanmelden om een opmerking te plaatsen.