Native Wayland Support

Kommentare

50 Kommentare

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

    I am very looking forward to this fix as well!

    10
  • 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
  • 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
  • BadFox

    ...would be useful.

    7
  • Cryotize

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

    11
  • arctize

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

    8
  • 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
  • 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
  • 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
  • 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
  • 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
  • Yushu

    Bump. Please support Wayland

    8
  • SNVMK

    reesericci your method didnt worked, it upgrades, show gray window, and says that it is crashed in terminal, then reloading, but still crashing

     

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

    Possibly good news?

    So discord had an update recently and if you guys were to type `navigator.userAgent` into devtools console (ctrl+shift+I) you will notice that it is using Electron/13.4.0 (hooray!)

    I have not tested it on Wayland yet, but if they also have fixed the share screen dialog thingy - share screen should work just fine :)

    2
  • ryan77627

    Interesting, I'll have to give it a look when the update propagates down to Flathub. Hopefully within the next week or so. I'm excited to give this a try, if this removes the need for X I'd be very happy.

    Though I have started to look into Matrix, quite the interesting solution to chat; I'm a fan. Particularly of the Conduit home-server, especially over Synapse

    2
  • nani8ot

    Discord on flathub is already on Electron/13.4.0 / Chrome 91.

    But if I run the command `flatpak run com.discordapp.Discord --enable-features=UseOzonePlatform --ozone-platform=wayland` to run with wayland, discord crashes. I also noticed this behavior on wayland-enabled Chromium a while ago.

    PS: Remember to enable the "Wayland windowing system" in flatseal (or socket=wayland).

    2
  • zbrown
    flatpak run --socket=wayland com.discordapp.Discord --enable-features=UseOzonePlatform --ozone-platform=wayland

    Works for me in an undecorated sorta way, still insists on using it's own (and therefore broken) window picker for screen share though

    2
  • ryan77627

    Hm, I'll have to look into why mine isn't. It's fully updated though still reports Electron/9.3.5. Discord version 0.0.15

    2
  • Gytis

    Yeah, it does not matter if discord fixes this issue or not - the real solution in the long run, is to migrate to Matrix due to it being FOSS. 

    Admittedly, Matrix is definitely not as polished as Discord but architecturally core concept is really powerful and robust.

     

    Either way, I'd like to encourage all of you to add Discord-Matrix bridge to your own communities even if you guys aren't using matrix yourselves. This will give an option to everyone else to choose

     

    1

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.