maltejur / discord-screenaudio

A custom discord client that supports streaming with audio on Linux.
1.1k stars 35 forks source link

[Steam Deck] No video output on Gaming Mode #75

Open MayorRev opened 1 year ago

MayorRev commented 1 year ago

Been trying this out on the Steam Deck and it works great on desktop mode, but sadly a lot of the games I want to screenshare don't work on desktop mode, but do work with Gaming mode. Unfortunately when attempting to SS in gaming mode, only audio is output and the stream is black.

I hope I'm describing this correctly! I'm new to submitting these types of issues on github

maltejur commented 1 year ago

Hm sadly I do not have a Steam Deck and can't test this. But can the normal discord client/browser version stream on the Steam Deck?

MayorRev commented 1 year ago

Hm sadly I do not have a Steam Deck and can't test this. But can the normal discord client/browser version stream on the Steam Deck?

The Discord app available on the deck's Discover app, works fine for the most part on both gaming and desktop mode, but it lacks audio when screensharing.

Maciejka1 commented 1 year ago

Same on my deck

brendenhoffman commented 1 year ago

@maltejur I hope I can shed some light on this. The reason the screen is black is simply because this client doesnt allow you to choose the video source. The way the Steam Deck uses gamescope, it renders everything per window, but the capture is just a black "desktop".

Is there a reason this client can't choose the video source like the normal client?

Edit: Just read some more issues and tried this on my laptop. We need to figure out how to open up the xdg-desktop-portal selection screen with the flatpak and using gamescope compositor, all on an immutable filesystem (so most everything is installed via flatpak) Edit2: I have set up pacman to install in userspace, but I still can not get an xdg-desktop-portal window to come up. Not even in a wayland KDE session. However, I can't install xdg-desktop-portal-kde due to it pulling tons of plasma packages that interfere with the system ones a bit too much for my liking. I hope this is enough of a lead for you... I actually don't know how to pull up an xdg-desktop-portal window to begin with.

maltejur commented 1 year ago

Is there a reason this client can't choose the video source like the normal client?

It is a general limitation of QtWebEngine, which is what discord-screenaudio is powered by (see #1). That you are able to select the window on Wayland is only thanks to a "hack" enabling the usage of desktop portals.

As far as I know, the game mode on the steam deck is using wayland though. So this probably really is a problem with the xdg-desktop-portal. Does doing this change anything?

And the desktop portal is probably now showing up in desktop mode because that is using X11, and thus cant use portals.

brendenhoffman commented 1 year ago

No, I can't install xdg-desktop-portal-kde due to it pulling the whole plasma package group (or without disabling read only), so setting XDG_CURRENT_DESKTOP=KDE doesn't work. However, if I could leverage a different portal such as xdg-desktop-portal-gtk or xdg-desktop-portal-wlr that would work, I have those installed. I don't know the requirements to launch any of the desktop portals applications though, especially for gamescope.

I don't see why this wouldn't be possible though, even if it requires you to have a chroot environment set up to install packages.

TauAkiou commented 1 year ago

it's probably more likely that Gamescope's current lack of support for Wayland clients is the culprit here, since any applications currently run in X11 mode where portals don't apply: https://github.com/Plagman/gamescope/issues/543

brendenhoffman commented 1 year ago

I see. I mean, there is still the issue of installing a usuable portal, but you might be right.

TauAkiou commented 1 year ago

my guess is that the Gamescope issue will be resolved at around the same time Valve decides migrates desktop mode over to Wayland, in which case they'll supply xdg-desktop-portal-kde by default.

shigutso commented 1 year ago

Any workarounds found while a fix is not possible?

elheremes commented 1 year ago

Any workarounds? The default discord screen sharing works in gaming mode, but the discord-screenaudio sharing don't. Works flawless on desktop mode.

maltejur commented 1 year ago

Not any that I know of, besides using both the official client and this client at the same time with different accounts to share video and audio independently :D. You could also follow this guide manually.

But as per https://github.com/maltejur/discord-screenaudio/issues/1#issuecomment-1634330283, there is some work happening in QtWebEngine which could some day make this work properly.

SSUPII commented 1 year ago

Desktop mode with the Flatpak works extremely well, but in my case in Game Mode the app doesn't launch at all spinning indefinitely.

I wanted to confirm if this bug was present on mine or not, but for the moment I can't.

IsaacFehr commented 6 months ago

Has anyone found a workaround for getting video to come through in gaming mode?

I'm seeing the same problem of not being able to choose a window as described above, and sharing the desktop just showing a black screen.

As a note: Vesktop and Webcord (installed through flatpak) can also share audio, but they can select a game window, even if it still shows up all black.

The official Discord client can share a game window in gaming mode, just without audio.

What is the difference between the clients that is causing this?

5310 commented 6 months ago

I just switched to Desktop mode from a Gamemode Tabletop Simulator (native) session where I was using Vesktop to share the game. Have used it with Balatro (Proton) as well, in recent weeks. Both video and audio worked fine for me here!

On Sat, Apr 13, 2024 at 2:17 AM Isaac Fehr @.***> wrote:

Has anyone found a workaround for getting video to come through in gaming mode?

I'm seeing the same problem of not being able to choose a window as described above, and sharing the desktop just showing a black screen.

As a note: Vesktop and Webcord (installed through flatpak) can also share audio, but they can select a game window, even if it still shows up all black.

The official Discord client can share a game window in gaming mode, just without audio.

What is the difference between the clients that is causing this?

— Reply to this email directly, view it on GitHub https://github.com/maltejur/discord-screenaudio/issues/75#issuecomment-2052506435, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA3SEXWALQOSQ7ZL6RBWRDY5BB5FAVCNFSM6AAAAAASHLUM7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJSGUYDMNBTGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>