flathub / com.discordapp.Discord

https://flathub.org/apps/details/com.discordapp.Discord
129 stars 41 forks source link

Streaming doesn't work on Wayland #89

Open tr1kn1 opened 4 years ago

tr1kn1 commented 4 years ago

Trying to share the screen on Fedora 31 using Gnome on Wayland leads to a black screen showing only mouse cursor. Is this a bug/missing feature or due to a too strict safety/sandbox regulation?

Fuseteam commented 4 years ago

that's an wayland issue that should work on the newer gnome provided they fix remote desktop on the newer gnome

tr1kn1 commented 4 years ago

Thanks for your response! So I will patiently wait for the next release with Gnome 3.36.

TingPing commented 4 years ago

Discord has to support it, new GNOME releases won't help.

Fuseteam commented 4 years ago

@TingPing you mean discord has to support wayland? either way its not an flatpak issue

TingPing commented 4 years ago

Well, no they don't really need to care about wayland, they need to support pipewire as a video source.

Fuseteam commented 4 years ago

@TingPing was/is pipewire already a thing in fedora 31?

TingPing commented 4 years ago

F31 has an older version. I don't know offhand if thats a problem.

Fuseteam commented 4 years ago

i suspect it does but that's based on my experience with ubuntu 18.04 :p

TingPing commented 4 years ago

That was before Pipewire even existed.

Fuseteam commented 4 years ago

fair enough hahaha when did pipewire come out

TingPing commented 4 years ago

I guess it existed in late 2017 but it didn't become very useful until into 2018.

Fuseteam commented 4 years ago

hmmm i see

pojntfx commented 4 years ago

To anyone still trying to get this to work, just use the Browser version in Chromium. Enable the enable-webrtc-pipewire-capturer flag under chrome://flags et voilà - it just works. Tested on a fresh installation of Fedora 32.

refi64 commented 4 years ago

Discord's Electron version does support Chrome's Pipewire support if you pass --enable-features=WebRTCPipeWireCapturer...but Discord seems to assume on the desktop app that it can repeatedly call the API over and over again (?? maybe for the previews I guess), so you end up with dozens of GNOME dialogs asking what you want to share. This does not happen on web at all, so I'm not really sure what exactly is going on there.

kaimast commented 3 years ago

Kind of related: Does anybody know how to stream audio on xwayland?

lionirdeadman commented 3 years ago

Streaming audio in Discord doesn't work anywhere afaik, you can workaround that by feeding your audio into your microphone.

gytis-ivaskevicius commented 3 years ago

https://github.com/electron/electron/pull/26022#issuecomment-793105706 pog?

iMonZ commented 3 years ago

I had the same issue after updating some packages the issue was resolved for me

gytis-ivaskevicius commented 3 years ago

Alright, Linux nerds, I need help: Please login to support.discord.com, open these tickets: https://support.discord.com/hc/en-us/community/posts/360068080771-Screen-sharing-issues-on-wayland https://support.discord.com/hc/en-us/community/posts/360047644231-Native-Wayland-Support

And this is what you do:

  1. Upvote first/all comments (This is how project managers seem to prioritize work)
  2. Write a comment that is something along the lines of: "yeah, I too would love to see this implemented. Also using such an old version of electron is gae" :D
  3. Possibly write something like "Screen sharing does not work on Ubuntu 21.04" (Maybe complaints will get their attention?)
  4. Copy paste this message to Linux communities that you are a part of (Cmon, Linux community is not that big, we need to it is difficult to get proprietary software to support Linux)
wiktoraleksanderkaczor commented 3 years ago

...would be useful.

gytis-ivaskevicius commented 3 years ago

Okay, a little TL:DR of the comment above since in some discord servers people seemed to misunderstand it

Discord ranks issues according to https://support.discord.com - Please upvote those two tickets mentioned above to catch their attention. Also, I got a feeling that adding a comment that Discord is broken would be useful as well.

anthr76 commented 3 years ago

https://github.com/flathub/com.discordapp.Discord/issues/151

All3xJ commented 3 years ago

Discord's Electron version does support Chrome's Pipewire support if you pass --enable-features=WebRTCPipeWireCapturer...but Discord seems to assume on the desktop app that it can repeatedly call the API over and over again (?? maybe for the previews I guess), so you end up with dozens of GNOME dialogs asking what you want to share. This does not happen on web at all, so I'm not really sure what exactly is going on there.

doesn't work in my machine. I also see black screen in the windows that were working before using --enable-features=WebRTCPipeWireCapturer

vchernin commented 3 years ago

@All3xJ What distro are you on? All Ubuntu releases before 21.04 are not able to use PipeWire.

If on another distro can you test the discord web app in chromium/chrome (with that flag) or firefox (no flag needed).

All3xJ commented 3 years ago

@All3xJ What distro are you on? All Ubuntu releases before 21.04 are not able to use PipeWire.

If on another distro can you test the discord web app in chromium/chrome (with that flag) or firefox (no flag needed).

ArchLinux. With either Firefox and Chrome I can record the screen. Under Firefox mouse cursor can't be recorded. In Chrome the cursor is visible but sometimes it gets stuck and it's not visible anymore.

vchernin commented 3 years ago

@All3xJ Firefox bug. Chromium bug. So in Chromium/Chrome there should be a cursor fix arriving in 93 probably.

Doomsdayrs commented 2 years ago

Kind of related: Does anybody know how to stream audio on xwayland?

Helvum

Rycia commented 2 years ago

M

Discord has said they won't support it and that it's on Wayland.

kon14 commented 2 years ago

Discord has said they won't support it and that it's on Wayland.

Source?

Doomsdayrs commented 2 years ago

Discord has said they won't support it and that it's on Wayland.

Source?

https://www.reddit.com/r/linux_gaming/comments/vuh1d3/discord_xwayland_is_not_currently_officially/

https://theevilskeleton.gitlab.io/2022/05/29/a-letter-to-discord-for-not-supporting-the-linux-desktop.html

kon14 commented 2 years ago

@Doomsdayrs That's just a support person saying Xwayland is not currently officially supported. In no way does that indicate they won't officially support Wayland at some point down the line.

Doomsdayrs commented 2 years ago

@Doomsdayrs That's just a support person saying Xwayland is not currently officially supported. In no way does that indicate they won't officially support Wayland at some point down the line.

They have no members dedicated to Linux whatsoever. Xwayland etc.

I suggest considering a migration of Matrix and using that instead of Discord if possible.

kon14 commented 2 years ago

@Doomsdayrs

They have no members dedicated to Linux whatsoever. Xwayland etc.

I'm not suggesting otherwise, but that's not to say it's in any way terminal. Besides, making use of Electron's (or rather Chromium's) own PipeWire-based WebRTC screencapturer is not something that would require a dedicated Linux dev team. They could just let the browser take care of it just like they already do whenever they don't detect their official Electron wrapper.

I suggest considering a migration of Matrix and using that instead of Discord if possible.

That is not a solution to Discord's screensharing on the official build being broken on Wayland. People often have to utilize whatever software their peers use, especially around any app related to communication.

Doomsdayrs commented 2 years ago

@Doomsdayrs

They have no members dedicated to Linux whatsoever. Xwayland etc.

I'm not suggesting otherwise, but that's not to say it's in any way terminal. Besides, making use of Electron's (or rather Chromium's) own PipeWire-based WebRTC screencapturer is not something that would require a dedicated Linux dev team. They could just let the browser take care of it just like they already do whenever they don't detect their official Electron wrapper.

It is terminal, it has been like this for years. I find your attitude in this matter ignorantly optimistic. Thus I shall take no further point in this conversation with you.

Good day to you.

carlocastoldi commented 2 years ago

Instead of this nonsense murmur I think it's worth mentioning that some unofficial scripts that make it possible to stream on Discord with PipeWire by illegally modifying the code exist. A workaround for streaming audio as well is not (yet) found. For obvious reasons I won't link the said scripts here.

That said I feel like this issue can be locked. No work can be done from the flathub maintainers and the past few months revealed that nothing worth noting came out from here. What do you think, @lionirdeadman

lionirdeadman commented 2 years ago

Locking, was mostly hoping for this issue to be used if people found things.

guihkx commented 1 month ago

Can someone on Wayland please retest this with the current version of Discord (0.0.70)? Thank you.

JavkhlanK commented 1 month ago

Using Fedora 41 Workstation Beta (GNOME 47, pipewire 1.2.5) and the discord flatpak 0.0.70, I can select share targets sort of reasonably (entire screen, app windows) thanks to the portal, but Discord's own picker doesn't integrate too well. Sharing doesn't work though, it ends up in just a blank screen.

The only relevant log message I got from running the app from the cli is:

'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:426 pw_thread_loop_wait()
guihkx commented 1 month ago

That's unfortunate, but thank you very much for testing.

It'd be great to also test this with the non-Flatpak package on Wayland, just to make sure the problem isn't specific to Flatpak.

If it's specific to Flatpak, we can keep this issue open until we figure out the reason, and a fix.

However, if this also affects non-Flatpak Discord, my suggestion for the people affected by this bug would be to report it using the appropriate channel instead, because this bug tracker only deals with Flatpak-specific issues.