Native Wayland Support

Comments

48 comments

  • MC

    FTR, this might be as simple as enabling the pipewire flag in chromium, and disabling discord's native source selection dialog, as the OS should offer one, and this would duplicate the dialog.

    Then, it should (if not today, in the future) work with pipewire, and xdg-portal-desktop installed on the host system.

    Further discussion (that led me here in the first place)

    24
  • Ezwen

    Currently there is no way to do any screen sharing when running Discord in Wayland, therefore I really look forward to having complete Wayland support!

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

    14
  • 7rst1

    Ubuntu and other distros is starting to ship Wayland enabled by default, so it's starting to get urgent.

    The ones new to Linux gaming might get put off because of the issues relating XWayland; blurry UI on fractional scaled screen and screen sharing mostly not working.

    Looking forward to this important fix!

    14
  • Currently you can screen share on Wayland with PipeWire, this is not a discord issue and in theory, using electorn-ozone, you can get native Wayland support. You will however need `xdg-desktop-portal-wlr` or similar for your compositor to share your screen through pipewire. If you're on archlinux. I think you can install the `electron-ozone` AUR package and start discord with `electron --enable-features=UseOzonePlatform --ozone-platform=wayland /opt/dscord/resources/app.asar`. You will not however be able to share individual windows of applications that don't themselves implement pipewire. XWayland has it built in I think and most browsers do too.

    11
  • Cryotize

    I'll probably cancel my Nitro subscription if this doesn't get fixed :/

    11
  • Gytis

    I am very looking forward to this fix as well!

    10
  • 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 :/

    10
  • anthr76

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

    10
  • nognu

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

    10
  • reesericci

    Most things already WORK FINE on wayland when using electron 13 by running (to bypass included electron - follow the PKGBUILD for discord_arch_electron in the AUR to add hacks)

    electron --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-accelerated-mjpeg-decode --enable-accelerated-video --ignore-gpu-blacklist --enable-native-gpu-memory-
    buffers --enable-gpu-rasterization --enable-gpu --enable-features=WebRTCPipeWireCapturer /usr/lib/discord/app.asar

    The only thing that doesn't work is screen sharing which can be fixed if the devs use the OS screen share dialog instead of their own/support pipewire as a video source.  They just need to update their bundled electron version.

    TLDR; most things work fine under wayland. all the devs need to do is update their included electron version, and support pipewire as a video-in source/use OS screen share dialog.

    9
  • arctize

    This is an absolute must have. Wayland is the future. Discord and Teams not supporting it is still a blocker for many.

    8
  • Yushu

    Bump. Please support Wayland

    8
  • BadFox

    ...would be useful.

    7
  • 5ysk3y

    Bump on this - As much as I hate to say it, once again, Discord seems to be lagging behind with the times (and sticking to their seemingly draconian ways) with Linux. They've already totally killed the ability to use terminal Discord clients without breaking the ToS; Discord don't even advertise Linux as a supported platform (do you see a penguin in the footer of this very page?), so whilst I post this in the hope they'll actually do something with their own Electron client when it comes to introducing support for Wayland, I'm certainly not holding my breath. Happy for the devs to prove me wrong.

    7
  • Doc

    While not a great solution, because of how Discord is made on electron, it should be very easy to do client side decorations which will allow for Discord to run on Wayland no problem using the Ozone build of electron back end.

    Microsoft's VSCode can do this no problem (have run vscode on wayland electron build no problem). It doesn't really fit with the aesthetic of the system, but it's better than nothing and this isn't uncommon in Windows, so why not Linux.

     

    So, all that needs to happen is to bake in client side decoration, target newer electron build with Wayland support, and that's it. We're golden.

    5
  • veehexx

    my issue is x11 doesnt play nice with multi-display and different DPI's.

    my laptop is 4k (primary usage), external screen is 2560x1440 so i use different fractional scaling for across each screen; 100% on the external, and 175% for 4k. Reguardless of the x11 vs wayland 'debate', i'm forced into wayland to allow scaling to work correctly.

    discord is just blurry and not visually nice.

    5
  • Sonicalien37

    Nvidia is now supporting Wayland and a lot of the strange display behaviors with Nvidia cards have disappeared as they fixed them. Discord supporting it is the last thing I'm waiting on. The fact that they have not fixed it yet is what's holding me back from a Nitro subscription. As long as it remains unfixed, I will refuse to subscribe.

    5
  • Cizin

    I wonder discord is gonna support wayland or not. From the looks of it they have no plan of supporting wayland on Linux. I hope Linux distributions won't remove broken discord electron app from their repositories after wayland becomes default.

    4
  • Marty

    Please add full support on wayland. i want to use two displays (one 60hz, one 144hz) and i need to use wayland for this. poor support discord. lets fix that!

    4
  • Nebuliane

    Yes please, I would like this too :)

    3
  • ryan77627

    Trust me, I'd love to. I spent my free time in the last two days setting up my own homeserver because if I'm going to go for Matrix, I want to fully commit to the idea of decentralization (if everyone has an account directly on matrix.org, what's the point?). But, even with the growing pains as the spec develops, I am a huge fan of the idea of their protocol. I'm excited to see what the future holds, especially for third-party homeservers like Conduit, even if features may be coming slowly compared to Synapse.

    However, my biggest issue is I would have to convince my teachers to invite the bot I set up into the class on my behalf, plus I need screen sharing for a specific class. But 90% of my communication could be consolidated into Matrix, which I'm currently looking into

    3
  • XXXXDRAGONHUNTER123XXX

    For me using the "discord_arch_electron" pkgbuild from the AUR and starting it with this command works:

    "electron --enable-features=UseOzonePlatform --ozone-platform=wayland /usr/lib/discord/app.asar "

    It starts discord using native Wayland, so no more blurry windows :)
    The decorations are missing, but this is due to Gnome not implementing SSD. CSD support for Electron apps is on it's way, but not merged yet.
    Screensharing is not working yet, as others stated.

     

    3
  • stevegremory

    well this just goes on to show how much discord really cares about their, "oh so pretty users." They simply do not. It is a rather easy fix which they just aren't ready to do for some stupid reason; Hell, even MS Teams has it.

    3
  • joltx

    I can say that it works if you open it in a chromium browser like brave and enable the following flag in chrome://flags WebRTC Pipewire support. 

    It's basically up to them to enable this for the electron version. 

    3
  • EnderArchery

    Come on Discord. Screensharing is already working in chrome.

    Can we at least have a reason why this hasn't been added to the electron version, when even Teams for Linux can do it? (And their client is... atrocious at times)

    3
  • Merri Bäl

    It's absurd this is not being worked on/being ignored.
    3% of Desktop users are now on Linux and one of the most important features of Discord can just not be used if I don't want to ignore the TOS.

    3
  • 7rst1

    Are there any updates anywhere by Discord on the implementation of Wayland?

    Also, does anyone know if there is a hacky way to share screen even though it's not implemented?

    2
  • ryan77627

    Gytis You know what happened to your issue request? The links dead unfortunately.

     

    Would love to see the proper version of electron start to get bundled so Wayland can be supported fully. Screen sharing is the only reason I have to switch back to X anymore.

    2
  • Gytis

    Yep, my request has been closed. Just now I've sent a follow-up which probably going to get politely closed as well :/

    Anyways, it's been quite a few months and Discord obviously does not care about wayland nor that they are using a super outdated electron version which is no longer supported, the real solution here is to move over to Matrix.

    Currently, I use both Discord and Matrix, also I got a matrix-discord bridge on my personal server.

     

    AND HERE IS A SHITTY WORKAROUND FOR WAYLAND THIS PARTICULAR ISSUE:
    https://github.com/gytis-ivaskevicius/nixfiles/commit/3f6b296bf37ac0fc62683dc22d02a72723e86ddb

    Basically, I created derivations that create a .desktop entry that launches chromium in 'app' mode. Definitely not a perfect solution but gets the job done.

     

    2

Please sign in to leave a comment.