ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.25k stars 175 forks source link

In-home Streaming + Wayland #6148

Open Mushoz opened 5 years ago

Mushoz commented 5 years ago

Your system information

Please describe your issue in as much detail as possible:

Whenever I run my desktop with Wayland, and connect my steamlink to my Desktop, the screen on the TV will be rubbish with every color of the rainbow all over the screen. The screencapture of the desktop is clearly not going as planned. Actions still work fine, and I can navigate via the controller connected to the steamlink by simply watching what I am doing on my computer screen. Once I launch a game, the corrupted mess disappears and I can properly see the game being streamed to the steamlink.

Steps for reproducing this issue:

  1. Use Wayland (I am using Gnome on Wayland in case that matters)
  2. Start steam
  3. Start steamlink
  4. Connect to desktop

What happens: I see a corrupted mess on my TV

What should happen: I should be seeing steam big-picture mode, as my computer display is showing.

Workaround: Use gnome on Xorg.

VoodaGod commented 7 months ago

Replying to https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-2014787703

image

perroboc commented 7 months ago

Replying to https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-2014794418

Have you tried to run it without those arguments? (pipewire or pipewire-dmabuf). Do you have xwaylandvideobridge? Have you checked if you have any missing libraries? Have you tested the flatpak?

I can tell you, at least in fedora 40, that dialog doesn’t appear when home streaming, I don’t even need those arguments, and I understand xwaylandvideobridge comes by default.

hannemann commented 7 months ago

Does anyone know if there is a possibility to persist the permission on gnome permanently?

csolisr commented 7 months ago

Replying to https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-2014817712

I'm currently using Garuda Linux (based on Arch) and ensured to have xwaylandvideobridge and all missing libraries installed. I tried running without pipewire and it shows a black screen, but it does also pass sound and inputs through.

Luxxii commented 7 months ago

Hey to all the "why does it not persist the screensharing" comments: There is a feature request to exactly implement this behaviour:

10134

As far as i know, this was implemented before the restore option was merged.

perroboc commented 7 months ago

Here's my setup: image image image Steam installed in fedora from rpmfusion repo (dnf install steam)

Here's the evidence it works OK without extra arguments:

https://github.com/ValveSoftware/steam-for-linux/assets/2722773/35b8e64d-f37f-4782-9611-829643a24eca

tgurr commented 7 months ago

For me on Exherbo Linux it also worked straight out of the box on KDE Plasma 6 just logging in to a wayland session instead of x11 (no further manual steps were required, no parameters needed to be passed to the steam client, no screensharing dialogs appearing that had to be approved). Like @perroboc above I'm also opted in to the Steam client beta but for other reasons not related to wayland though.

image

I didn't have the opportunity to test this on NVIDIA yet though, so not sure if it just works the same way with NVIDIA instead of AMD/mesa.

csolisr commented 7 months ago

I wonder if Fedora comes with a default setting that Arch does not include. I'm still having problems displaying the screen over Wayland, with Pipewire or otherwise. (Maybe relevant, but I also have Sunshine enabled as a backup, could it be that Sunshine is overriding Steam Link somehow?)

Zylanx commented 7 months ago

Are you saying this issue is fixed? Because I came here because I just see a black screen like others

What Desktop Environment and distro are you using? And did you install Steam through its package manager or flatpak?

NixOS Unstable with GNOME. Steam is through the NixOS module/nix pkg manager. There are no missing libraries when using the command you listed earlier in the thread.

Bitwolfies commented 7 months ago

Arch, plasma 6, pipewire, xwaylandvideobridge, etc.

Streaming now actually works on wayland without any extra arguments, but its a bit quirky? When a game or BPM isnt booted/focused, steam link now shows this live broadcast please stand by screen that i've never seen before, I guess it cant show the wayland desktop without permission? Once a game starts the screen goes away and the game streams fine.

BPM is also still super unusable on wayland Nvidia, still slow as hell and buggy, opening the side menu kills the stream as I guess its not technically a part of the big picture window? Or its because its broken and displays the window behind due to poor spacing.

alterNERDtive commented 7 months ago

Here's my setup: [snip]

Single or multi monitor setup?

tgurr commented 7 months ago

@csolisr as you mentioned/asked, I also have the sunshine daemon running in userspace (systemctl status --user sunshine) and it doesn't interfere, of course streaming from both at the same time might, that's something I have not yet tested, but only having the daemon idleing doesn't cause any issue here.

@Bitwolfies looks like xwaylandvideobridge isn't required, at least I don't have that package installed (and never heard of it before). So as long as it's still a separate package and not shipped with e.g. kwin or something that package isn't present here. I also noticed the live broadcast screen appearing for a moment that I had also never seen before, probably like you mentioned when things are not focused / starting. The menu of BPM is very odd, it kinda works for me but looks like it's not part of the big picture window like you mentioned, it displays more or less like on the steam deck just broken and not an overlay but a separate "window" or whatever you can call it. Another thing I've come across is text inputs like when starting a new game in elden ring which requires you to enter a name for your character, the "popup" to do so is also not streamed and had to be done infront of the computer with a regular screen. Can't say anything bad about the performance at the moment though, while on X11 it kinda felt more laggy it appears to actually run smoother on wayland (on mesa/AMD at least). Overall I'm with you with your description of it being "quirky" but at least for me BPM has always had its quirks here and there on X11 as well. So things like the input overlay in elden ring I can only report because I tested it on wayland but maybe it's an issue on X11 as well. For now I'm quite happy it works at all on wayland as that was my last main showstopper switching over from X11 now that the horrible fractional scaling on wayland also has been fixed with KDE Plasma 6.

@alterNERDtive can't talk for @perroboc but only for myself, I have a single screen but another "fake" one with an HDMI EDID dongle which is set to the same resolution as my actual physical screen and to clone mode so I can switch off my physical computer screen when streaming without things turning into a slideshow and without wasting additional power and clocking screen time on the display while noone sits infront of it. That appears to work well for me.

alterNERDtive commented 7 months ago

I got the sneaking suspicion that it works fine for single monitor setups and breaks with multiple.

perroboc commented 7 months ago

I got the sneaking suspicion that it works fine for single monitor setups and breaks with multiple.

It works great too in multi monitor setups. More proof with 2 4k monitors:

https://github.com/ValveSoftware/steam-for-linux/assets/2722773/ea0d355e-17ab-44e3-9c2b-7005b271408f

csolisr commented 7 months ago

@csolisr as you mentioned/asked, I also have the sunshine daemon running in userspace (systemctl status --user sunshine) and it doesn't interfere, of course streaming from both at the same time might, that's something I have not yet tested, but only having the daemon idleing doesn't cause any issue here.

Thanks for the confirmation - I was planning to uninstall Sunshine entirely to see if that was the issue.

@alterNERDtive can't talk for @perroboc but only for myself, I have a single screen but another "fake" one with an HDMI EDID dongle which is set to the same resolution as my actual physical screen and to clone mode so I can switch off my physical computer screen when streaming without things turning into a slideshow and without wasting additional power and clocking screen time on the display while noone sits infront of it. That appears to work well for me.

In related news, I have a EDID dongle, but I've tried both with and without it, same issue unfortunately.

mtalexan commented 7 months ago

Here's my setup: ...

I can second/confirm that it works with the current Steam Beta, but not without. I'm on Fedora 39 (Kinoite, so the KDE Atomic version). The latest steam installed from RPMFusion doesn't show the Big Picture when remoting to a 1920x1080 machine from a SteamLink, though games can be started and work fine. Switching to the Beta channel of Steam in the Steam app settings makes the Big Picture show up as expected on the remote Steam Link.

My system: image

alterNERDtive commented 7 months ago

FTR I’m not using the beta channel (and it doesn’t work); can’t test right now, but if it works reliably in the beta that sounds promising.

User8395 commented 7 months ago

If it helps, I used Xephyr to start an X server in a window and launched steam in that. Steam Link worked perfectly fine like that.

mwpow3ll commented 7 months ago

I'm running stock Fedora 39 (Gnome) with Steam installed from DNF.

Everything works great on X11, but when I switch to a Wayland session, All I get streaming to my Steamlink hardware is a black screen with the default mouse cursor in the center of it. I know Steam BPM is running because while the mouse cursor doesn't move, I'm able to blindly move through Steam BPM UI with my controller. I can even launch a game, and I will hear the game audio as though it is running and sitting on the title screen. Oddly enough, the default mouse cursor will even switch to the mouse cursor used by the game, but it remains fixed in the center of a black screen.

I tried installing Xwaylandvideobridge, but this doesn't work...

To my knowledge, pipewire and pipewire-dmabuf are default with Steam, so I haven't tried those...

perroboc commented 7 months ago

Replying to https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-2024123257

Have you tested Steam Beta?

User8395 commented 7 months ago

Replying to #6148 (comment)

Have you tested Steam Beta?

@mwpow3ll You should. It fixed everything for me plus it added a Please Stand By message that pops up when the Big Picture window is out of focus.

User8395 commented 7 months ago

My only problem was switching back to the Steam UI from the game. Holding the Steam button and Tab did nothing, and I had to intervene myself on the computer.

YoinkerBoinker commented 7 months ago

It sorta works on my End. However if i "minimize" steam which i do regulary to stream movies for example i'll get "live broadcast please stand by" on my TV. And i can't seem to do anything. Which makes it pretty much unusable for me. Any clue why is that? I also can't press a "steam button" since i'm using a small keyboard for my TV.

Nowa-Ammerlaan commented 7 months ago

Any clue why is that?

It's because an xwayland application such as steam is not allowed to just capture the wayland desktop. It has to go through pipewire, and then the user will be prompted to select if and what to share. There is some experimental support for this which can be enabled by launching steam with the -pipewire argument. However when I tried this on my system it worked rather poorly, it was slow, crashed, and there were a bunch of graphical artifacts.

YoinkerBoinker commented 7 months ago

Ty that's really sad. So i'm pretty much stuck to x11. Is there actually anything that can be done when seeing the "stand by" message? It seems like everytime i see it i have to go to the computer to get rid of it? Maybe i should try to add firefox as a non-steam game and see if that works lol.

tgurr commented 7 months ago

However if i "minimize" steam which i do regulary to stream movies for example i'll get "live broadcast please stand by" on my TV. And i can't seem to do anything.

@YoinkerBoinker For your usecase a look at Sunshine/Moonlight might be worth a try as it offers to select streaming the desktop in addition to e.g. individual applications like Steam (Big Picture) and also works on wayland (utilizing dmabuf/kmsgrab as far as I understand):

image

Wgelyjr commented 7 months ago

Replying to #6148 (comment)

Have you tested Steam Beta?

@mwpow3ll You should. It fixed everything for me plus it added a Please Stand By message that pops up when the Big Picture window is out of focus.

Also confirmed fixed for me, Fedora 39 plasma Wayland, 6700xt. Steam link is working flawlessly on the most recent beta client.

OSCrustacean commented 7 months ago

Same as the above, Fedora 39 with Plasma 5.27 has Steam Link working on Steam Client Beta (Flatpak) on an RX 5700 XT. The only thing I've noticed is that launching big picture takes a considerable amount of time when launching from the button in the client for the first time of a session, but it is fully functional if you wait a minute or so. Launching "flatpak run com.valvesoftware.Steam -bigpicture" or selecting stream in the Steam Link app allows big picture to launch almost immediately, not sure what the difference is.

d3vilguard commented 5 months ago

Plasma, Wayland. Before I was able to get games going using gamescope, now I can only get portal streaming.. SteamUI streams also. Switching to X is not an option! ps, beta steam doesn't fix anything. Don't fall for the comments. ps2, it's terrible.

User8395 commented 5 months ago

My setup is that I normally use Steam Link on Wayland, however if something happens, then I use Moonlight to fix any problems then I go back to Steam Link

User8395 commented 5 months ago

Pipewire should have an option where you can permanently give screen access to a specific program.

YellowOnion commented 5 months ago

Capture apps request access to a opaque capture device, pipewire facilitates the communication and routing of video and audio streams, but like with sound, it doesn't actually produce or consume a video stream, that's for pipewire clients, It's up to your Wayland window manager via a xdg-desktop-portal to handle requests and create a capture source, the protocol supports the ability reuse old sessions, it's up to your portal and Steam to handle session reuse correctly though.

common portals: GNOME xdg-desktop-portal-gnome KDE xdg-desktop-portal-kde

User8395 commented 5 months ago

The reason I still use Xorg is because when I'm running Minecraft: Java Edition from Steam Wayland, Steam Link will stay at "Please Stand By" until I select a game from the Minecraft Launcher.

TheJackiMonster commented 5 months ago

Pipewire should have an option where you can permanently give screen access to a specific program.

It's definitely supported in GNOME. Works with OBS for me.

User8395 commented 5 months ago

It's definitely supported in GNOME. Works with OBS for me.

Yeah but I'm never using GNOME

alterNERDtive commented 5 months ago

This is an issue tracker, not a chat channel.

User8395 commented 5 months ago

This is an issue tracker, not a chat channel.

Well aware

LuNeder commented 5 months ago

Pipewire should have an option where you can permanently give screen access to a specific program.

That’s your xdg-desktop-portal’s job. Open an issue (or even better: pull request) to the portal you use requesting this feature.

Depending on your portal you might also be able to make a script for that. For instance, wlroots’ xdg-desktop-portal-wlr let’s you change the selection menu from dmenu to literally anything else - such as your own script that makes some checks before asking or automatically allowing and automatically choosing a monitor. I was initially planning to do that, but wlroots sucks and works like shit so I just stopped using it and migrated back to x11 and compiz before getting to it (at least until I can do something with smithay myself or something). Still, if you can get the program that’s requesting your screen then the script would be pretty straightforward. Not sure how this works on other portals, but you could always open an issue to yours if one doesn’t exist already.

perroboc commented 5 months ago

Back on topic: Current stable release works fine using Wayland on Plasma 6. I was able to stream Hades just fine.

There's no need to use Beta version.

Using Fedora 40, Plasma 6, Wayland, AMDGPU.

Steam Beta Branch:  Stable Client
Steam Version:  1716584667
Steam Client Build Date:  Fri, May 24 4:48 PM UTC -08:00
Steam Web Build Date:  Fri, May 24 4:31 PM UTC -08:00
Steam API Version:  SteamClient021
Operating System: Fedora Linux 40
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.8.11-300.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 7950X 16-Core Processor
Memory: 31,0 GiB of RAM
Graphics Processor: AMD Radeon RX 7900 XTX
Manufacturer: ASUS
LuNeder commented 5 months ago

That said, are we sure that the original problem in this issue even still exists?

Admittedly I haven’t used wayland in a while, but when I did I never had a problem that was caused by Steam. Everything worked fine for me from the Steam side, as long as it was launched with -pipewire.
Of course, wlroots was (and still is) a problem and you have to apply a hack/patch in order for it to work (and good luck opening an issue about that on their tracker), but then again that’s not a Steam issue. Just use a window manager that’s based on an actually good library and you’ll be fine. There are some really cool wms coming out using smithay these days.

What I mean is that this issue miiiiiight be ready to be closed imo, if no one is having a problem actually caused by Steam.

VoodaGod commented 5 months ago

With this setup:

Steam Beta Branch:  Stable Client
Steam Version:  1716584667
Steam Client Build Date:  Fri, May 24 22:48 UTC -08:00
Steam Web Build Date:  Fri, May 24 22:31 UTC -08:00
Steam API Version:  SteamClient021
Operating System: Manjaro Linux 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.9.3-3-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X3D 8-Core Processor
Memory: 62,7 GiB of RAM
Graphics Processor: AMD Radeon RX 6700 XT
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: X570 AORUS PRO
System Version: -CF

running steam without pipewire, i can stream the big picture UI fine, but as soon as focus shifts to a started game or i alt tab to anything else, i just get the "please stand by" screen until i refocus the steam window

interestingly, with pipewire i still always get the screen capture select popup, but the permission seems to be remembered, because streaming works fine without interacting with the popup

Nicceboy commented 4 months ago

Replying to https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-2165154095

In last year and early this year, I played Elden Ring about 200 hours without problems by streaming it with Steam Link, by using Wayland + sway and pipewire. Now, with new UI and this "broadcast" window, it just stopped working. It just wants to stream the content of this "broadcast" window, which has just the abort game button. BigUI seems to still work, but it no more wants to stream anything else.