Open Mushoz opened 5 years ago
Could you try if pipewire-based (and xdg-portal based) screensharing works at all in Wayland for you? I am not sure which environment you use, but you need to have the relevant portals installed on your system (
xdg-desktop-portal
, as well asxdg-desktop-portal-gnome
and-gtk
if you use GNOME,-kde
for KDE, etc).
It does work with the link you posted. Firefox is running on Wayland (checked with qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole
), and I am able to share my screen:
.
Maybe I'm a bit lost. What is the -pipewire flag supposed to do? I mean, to see if I'm missing something.
Thanks. This shows that everything should be working, and that the problem probably comes from Steam. I think.
When visiting that website with Firefox, the browser should ask you if you want to share your screen, and offer you to "use operating system settings" as the only choice. Then, your desktop environment should present a window or some mechanism for you to confirm that you want to share your screen, and perhaps select a specific app or screen. On KDE, it should look similar to this: https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-1176885572
Maybe I'm a bit lost. What is the -pipewire flag supposed to do? I mean, to see if I'm missing something.
When using the -pipewire
flag, the same desktop environment pop-up should appear while steam starts, and you should be able to select the whole screen. The image data is then sent over pipewire to Steam, which will keep the connection active (I don't know whether this uses resources). The -pipewire-dmabuf
variant is supposed to be more resource-efficient, but a bit more complex to handle for both Steam and desktop environments.
That means Steam is allowed to capture your screen, and receives the video feed, as Firefox did in your screenshot. However, instead of simply displaying it as in the "getUserMedia test page", steam link will compress that data and send it over the network to be displayed remotely.
Now, there are a few things that could lead to issues, and Steam introduced that feature at a time when pipewire (and especially the dma-buf variant) still wasn't widely supported across graphics drivers, compositors/desktop environments, and applications. It's much better now, but I don't know how much the feature has been worked on since. Things that could cause issues are "DRM modifiers" among others, if you have specific hardware or drivers, as pixels may not be stored the same way in memory. But visually, that should appear as corruption, not black.
Practically speaking, you should see the following when launching Steam in a terminal:
CDesktopCapturePipeWire: Opening DRM render node /dev/dri/renderD128
# After selecting the screen in the DE-provided window:
CDesktopCapturePipeWire: Start signal received.
I just tried it again (sway), it was a bit glitchy with software encoding (works well for a few seconds, then a freeze on the client, as well as a previous frame that keeps popping up with dma-buf), but works pretty well with hardware encoding enabled (AMD GPU, open source drivers). Also steam has trouble quitting if started with these options: it restarts, I have to kill it. This is for the Flatpak version.
Edit: I see you live-editing your post, could you confirm that your DE asks what screen to share when launching with -pipewire
?
Testing to connect from an iphone, the audio and controller connect succesfully. The video only streams the mouse pointer over a black screen, and if I move it in the host, it moves in the streaming client. So... yeah, I'm streaming video, just not steam BPM nor proton games.
Same results either running steam
or steam -pipewire -pipewire-dmabuf
. Only difference is that in the latter, I get a lot of these messages:
CDesktopCapturePipeWire: Couldn't import dmabuf: Function not implemented
CDesktopCapturePipeWire: Failed to mmap memory: Operation not permitted
CDesktopCapturePipeWire: Couldn't get image data
Note: I tested installing lib32-mesa-vdpau
and lib32-libva-mesa-driver
, rebooted, and launching steam from a terminal to have a log. The result is the same, it seems these 32 bit versions are not used.
This is for the Flatpak version.
Let me test that, since I've been using the one in Arch pacman.
EDIT: same results. But I'll stick with the flatpak for now
Edit: I see you live-editing your post, could you confirm that your DE asks what screen to share when launching with
-pipewire
?
yeah, I get this screen
And I'm able to confirm I get the same output you get:
CDesktopCapturePipeWire: Opening DRM render node /dev/dri/renderD128
System startup time: 2.41 seconds
CDesktopCapturePipeWire: Start signal received.
And this is what I see on my iPhone (notice that I see the cursor)
I'm not sure if it fits this usecase, but would using xwaylandvideobridge help? In addition to the flatpak, it's in Fedora 38's repo now.
I'm not sure if it fits this usecase, but would using xwaylandvideobridge help? In addition to the flatpak, it's in Fedora 38's repo now.
I just tried it and read about it. The thing is that it helps on sharing windows, but not the full desktop. From https://discuss.kde.org/t/fixing-wayland-xwayland-screen-casting/217/15
is that would it work on whole screen sharing
What I wrote wouldn’t work for that. It’d probably be doable, but a lot more work than just rendering content into a window.
I kinda get brutal crashes using (Hardware) Steamlink on my Nobara (Fedora) distro. X11 works mostly fine... but there is sometimes a bug where you'll be able to "move" the size of the Big Picture Mode Window when streaming. When doing so you might be able to caues your computer to crash (hard). Same goes for using Wayland though that doesn't seem to work at all since it will send a Blackscreen to the TV. Then sometimes (happend during i tried to get it work) playing around with the Steam Menu.. and clicking "stop streaming to steam link" it also caused a hard crash.
Hello @CaptainCoward, that reads like a video driver issue. It might be worthwhile to also mention it to your video driver vendor.
@CaptainCoward are you perhaps also using an Intel card with the i915 driver? Because I have the exact same issue with my Arc A770.
I'm using a AMD RX6600.
Hello @CaptainCoward, that reads like a video driver issue. It might be worthwhile to also mention it to your video driver vendor.
Feeling stupid but where do i actually do that? I'm using the amdgpu driver/Mesa. I never had to report anything like that and have no clue where to do that lol.
Feeling stupid but where do i actually do that? I'm using the amdgpu driver/Mesa. I never had to report anything like that and have no clue where to do that lol.
Here: https://gitlab.freedesktop.org/drm/amd/-/issues
But since it effects both an amd card and an intel card I doubt it is a driver issue.
Hello @kisak-valve any progress to share on this? I just tried again on my Samsung TV and I get a black screen with either -pipewire
or -pipewire-dmabuf
.
Unfortunately, @perroboc workaround doesn't scale too well at 4k as performance tanks.
- /usr/bin/gamescope --nested-width 1920 --nested-height 1080 --nested-refresh 144 --output-width 1920 --output-height 1080 --fullscreen --steam -- /usr/bin/steam-runtime -tenfoot
Testing to connect from an iphone, the audio and controller connect succesfully. The video only streams the mouse pointer over a black screen, and if I move it in the host, it moves in the streaming client. So... yeah, I'm streaming video, just not steam BPM nor proton games.
Same results either running
steam
orsteam -pipewire -pipewire-dmabuf
. Only difference is that in the latter, I get a lot of these messages:CDesktopCapturePipeWire: Couldn't import dmabuf: Function not implemented CDesktopCapturePipeWire: Failed to mmap memory: Operation not permitted CDesktopCapturePipeWire: Couldn't get image data
Note: I tested installing
lib32-mesa-vdpau
andlib32-libva-mesa-driver
, rebooted, and launching steam from a terminal to have a log. The result is the same, it seems these 32 bit versions are not used.
For those still interested, I had those exact messages and after installing lib32-libva (on Archlinux) the 32bit radeonsi driver now loads properly and streaming works using -pipewire or -pipewire-dmabuf.
Replying to https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-1659413829
Thank you! I can confirm that this indeed fixes the issue, and I'm able to stream to other devices. Thanks!
Also, with this in mind, please check if steam in Arch is not missing any other libraries: https://wiki.archlinux.org/title/Steam/Troubleshooting#Finding_missing_runtime_libraries
Checking this, I had to install:
pacman -S lib32-fontconfig lib32-freetype2 lib32-gdk-pixbuf2 lib32-gtk2 lib32-libice lib32-libnm lib32-libpulse lib32-sdl2 lib32-libva lib32-libvdpau lib32-libudev0-shim lib32-openal lib32-libsm
If I'll be playing remotely, I close my regular steam, and launch it with this:
/usr/bin/gamescope --nested-width 1920 --nested-height 1080 --nested-refresh 144 --output-width 1920 --output-height 1080 --fullscreen --steam -- /usr/bin/steam-runtime -tenfoot
, which allows me to stream games with no issues
I got this to work with the flatpak version:
flatpak run --command=/bin/sh com.valvesoftware.Steam
gamescope --nested-width 1920 --nested-height 1080 --nested-refresh 144 --output-width 1920 --output-height 1080 --fullscreen --steam -- steam -tenfoot
Unfortunately I did not manage to get this into a single command. Also when trying to connect in crashes.
Hello @kisak-valve any progress to share on this? I just tried again on my Samsung TV and I get a black screen with either
-pipewire
or-pipewire-dmabuf
.Unfortunately, @perroboc workaround doesn't scale too well at 4k as performance tanks.
Tapping in on this to say that adding in the -pipewire
flag does make this work on my GNOME Wayland session... except that now it flashes an old frame in between the actual frames. Note that when this is running on X11 that is not the case for me anymore.
Not to mention that some games just do not stream the whole window well and just share the screen instead.
Replying to https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-1722157902
Do you have an Nvidia card? My boyfriend has the same exact problem with Discord screen sharing from Linux, but not Windows. Frames seem to be captured out of order, or rotating through a buffer in the wrong order. I don't think it's Valve's fault if they're using Pipewire capture.
Replying to https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-1722157902
Following up on this I just got it to work as intended without the flashing after installing lib32-mesa-vdpau
and lib32-libva-mesa-driver
as stated above by @perroboc.
Replying to https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-1722162486
No I have an AMD card, should have specified beforehand
Whoops. Maybe the bug is specific to certain Pipewire clients, then. I never have such issues with OBS Studio's Pipewire capture. Maybe the frames pulled out of it are out of order and have timestamps associated with their presentation order? Other than that guess, I got nothing, and will cease posting here unless I have something actually relevant to add again.
Latest steam version (beta and non beta) completely crashes my Arch installation when trying to stream with and without gamescope sessions, even after a full reinstallation of steam (deleting ~/.local/share/Steam and ~/.steam before reinstalling). This happens when connecting from steam link on iOS.
When trying to stream games using my Steam Deck, I get no picture, only audio.
pacman -Syu is up to date, too. Would be glad to share logs, but I don't know which ones.
NV + wayland, Arch, beta steam.
Unfortunately neither pipewire command works, it asks for my display fine but activating streaming causes only audio and my mouse to display on my TV, followed shortly by a crash.
Despite giving it full desktop acccess, it seems like the mouse is stuck to steam? It doesnt move on my tv unless its hovering over steam, maybe its not receiving the full desktop permission?
AMD + KDE + Wayland.
I get video, but no audio. Controls work fine. Launched steam with -pipewire
AMD + KDE + Wayland here (Mesa 23.2.1 / Arch Linux ): Still a black screen in Steam but streaming possible in-game. Same thing for Pipewire OBS capture being fine, screen-sharing being fine in up-to-date Electron app but black screen for Steam itself...
Streaming on Wayland using Gamescope works very well as an alternative. I currently use Sunshine and Moonlight since it has objectively better quality and latency, but it works with Steam as well. Its also nice to set up a separate audio sink that is used directly for the game so that audio is only played through the stream and not the PC.
Streaming on Wayland using Gamescope works very well as an alternative.
Unfortunately it has huge performance problems on anything >1080p on my end.
Just switched to Wayland and running into this. Has this bug seriously not been fixed in 4 years⁈
Same problem here.
Audio and controlling works, but nothing but no image: just a black screen is shown on link. Nvidia, wayfire. @
If you’re on NVidia and on a Wlroots-based compositor, check if screenshare works at all elsewhere. If it doesn’t, your problem is not Steam.
A wlroots problem coredumps the portal because of an unsupported pixel type (the reason I’m not saying ‘a nvidia problem’ here is because wayland specs explicitly support many pixel types, so to my understanding wlroots is not following it properly) if you’re on NVidia. This can be fixed by forcing a pixel type on your compositor if it supports this.
If your compositor does not support setting an specific pixel time (the one I use doesn’t), you can use a hack/patch to ‘fix’ this.
Conciliating self-compiled programs with programs from the repositories is a pain, so what I did for myself was publishing the patched package on my repository for zypper. If you’re also on openSUSE Tumbleweed, feel free to use it too. You’ll need to add the repository with a higher priority and then install libwlroots11 with --allow-vendor-change on your zypper in. Note that this hack can potentially break stuff for other gpus and maybe even break some features on nvidia even tho everything seems to be working fine for me, so use it at your own risk.
Note that you should not have wofi, slurp or bmenu installed. If you do, Steam will show you a menu to select the monitor you wanna share - this will break remote access since you wouldn’t be able to select the monitor if you’re not at home. (Edit: This seems to me something that Steam could fix on their side tho! OBS, for example, only shows the menu once and then selects the monitor automatically - only showing the menu again if you press a ‘change monitor’ button. Steam could implement this by automatically detecting in which output its window is being displayed (if that’s even possible on wayland) and automatically select that monitor to share (note that right now the menu is shown even if only one monitor is connected) instead of asking for the menu every time)
If you’re on NVidia and on a Wlroots-based compositor, check if screenshare works at all elsewhere. If it doesn’t, your problem is not Steam.
I’m not on Nvidia and it does work elsewhere :)
Note that you should not have wofi, slurp or bmenu installed. If you do, Steam will show you a menu to select the monitor you wanna share - this will break remote access since you wouldn’t be able to select the monitor if you’re not at home.
Interesting. I’m not getting any menu. And since you mentioned OBS: that one works flawlessly.
Replying to https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-1659413829
I had this problem while having libva (32bit) installed, and had to install the package "libva-compat" aswell. Just if anyone is facing this issue on gentoo.
Same problem here. I tested all the alternatives mentioned.
So I've reinstalled everything, and right now I'm testing steam beta on EndeavourOS (arch based distro), AMD GPU, KDE Plasma 5, Wayland, Pipewire.
gamescope
gamescope --nested-width 1280 --nested-height 800 --nested-refresh 60 --output-width 1280 --output-height 800 --steam -- /usr/bin/steam-runtime -tenfoot
The gamescope workaround works for most games. I do need to restart my steam deck every time I shut down and restart Steam on my Host/Desktop, otherwise it won't detect it as a streaming host.
From my testing:
--skip-launcher
.--launcher-skip
.-pipewire
steam -pipewire
This works after following the steps in the arch wiki to install missing runtime libraries, which you can list with these commands:
$ cd ~/.steam/root/ubuntu12_32
$ file * | grep ELF | cut -d: -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found' | sort | uniq
From my testing:
--launcher-skip
.Err.. something weird is going on though. Just tried to stream without any special parameters, and most games work, proton and native. Both desktop and steam deck are in beta versions.
steam
Yeah, this is weird. Games just stream with the same issues as in gamescope BUT TOO DARK, looks like the gamma just dropped to 0. Might be because I have an HDR monitor in my desktop host? In 4K I use STEAM_FORCE_DESKTOPUI_SCALING=2.0 steam
Is anyone else able to test this, too?
Good job, Valve! :D
I ran into problems this week trying remote play for the first time.
For context, I'm on Fedora 39 running the RPMFusion version of Steam and trying to remote play on a stock LCD Steamdeck.
Running steam -pipewire
helps a lot, but isn't a complete success. Hades works great, but Stray has either given me (1) a black screen with control and audio, (2) a video steam with no control, (3) control and video for ~30 seconds then video freezes, or (4) complete success.
Running just steam
as suggested by @perroboc resulted in a black screen with control and audio, for what it's worth.
Regarding Elden Ring: If I disable EAC by skipping the protected launcher, I can stream without issues. Might be because the executable file doesn't change and Steam keeps streaming the first launched executable.
So maybe some games with launchers dont stream because the streamer is stuck in the launcher PID.
cmd=(%command%); cmd[-1]=eldenring.exe; "${cmd[@]}"
eval $(echo "%command%" | sed "s|2KLauncher/LauncherPatcher\.exe|MidnightSuns/Binaries/Win64/MidnightSuns-Win64-Shipping.exe|")
@banduccm I don't have Stray in my library, but I know it has issues when using different resolutions form the native one (which happens when you stream). PC Gaming Wiki has a set of instructions that might help in this case.
The In-Home Streaming is not connected with any apparent error. The game is started on the host (win11) with no issue, but Steam never connects and closes the stream window after a second (it shows only spinner)
I tried with and without "-pipewire"/"-pipweire-dmabuf".
I'm sometimes getting the next error output:
src/tier0/threadtools.cpp (3017) : Bad thread local
The remote play hardware decoding for the client is disabled.
Steam output
$ steam -pipewire
steam.sh[39104]: Running Steam on arch rolling 64-bit
steam.sh[39104]: STEAM_RUNTIME is enabled automatically
setup.sh[39176]: Steam runtime environment up-to-date!
steam.sh[39104]: Steam client's requirements are satisfied
tid(39228) burning pthread_key_t == 0 so we never use it
[2024-02-11 12:12:58] Startup - updater built Jan 13 2024 00:51:43
[2024-02-11 12:12:58] Startup - Steam Client launched with: '/home/max/.local/share/Steam/ubuntu12_32/steam' '-pipewire'
02/11 12:12:58 Init: Installing breakpad exception handler for appid(steam)/version(1705108172)/tid(39228)
[2024-02-11 12:12:58] Loading cached metrics from disk (/home/max/.local/share/Steam/package/steam_client_metrics.bin)
[2024-02-11 12:12:58] Using the following download hosts for Public, Realm steamglobal
[2024-02-11 12:12:58] 1. https://client-update.akamai.steamstatic.com, /, Realm 'steamglobal', weight was 1000, source = 'update_hosts_cached.vdf'
[2024-02-11 12:12:58] 2. https://cdn.cloudflare.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'update_hosts_cached.vdf'
[2024-02-11 12:12:58] 3. https://cdn.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'baked in'
[2024-02-11 12:12:58] Verifying installation...
[2024-02-11 12:12:58] Verification complete
Steam logging initialized: directory: /home/max/.local/share/Steam/logs
XRRGetOutputInfo Workaround: initialized with override: 0 real: 0xdd8f4dc0
XRRGetCrtcInfo Workaround: initialized with override: 0 real: 0xdd8f3500
steamwebhelper.sh[39263]: Runtime for steamwebhelper: defaulting to /home/max/.local/share/Steam/ubuntu12_64/steam-runtime-heavy
steamwebhelper.sh[39263]: glibc >= 2.34, partially disabling sandbox until CEF supports clone3()
CAppInfoCacheReadFromDiskThread took 27 milliseconds to initialize
Steam Runtime Launch Service: starting steam-runtime-launcher-service
Steam Runtime Launch Service: steam-runtime-launcher-service is running pid 39383
bus_name=com.steampowered.PressureVessel.LaunchAlongsideSteam
BRefreshApplicationsInLibrary 1: 1ms
CDesktopCapturePipeWire: Opening DRM render node /dev/dri/renderD128
BuildCompleteAppOverviewChange: 338 apps
RegisterForAppOverview 1: 18ms
RegisterForAppOverview 2: 18ms
CDesktopCapturePipeWire: Start signal received.
reaping pid: 39734 -- IPC:CSteamEngin
[2024-02-11 12:14:12] Shutdown
vainfo:
vainfo
Trying display: wayland
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: Mesa Gallium driver 23.3.5-arch1.1 for AMD Radeon Graphics (radeonsi, gfx1103_r1, LLVM 16.0.6, DRM 3.57, 6.7.4-arch1-1)
In related information, when using Steam over Wayland, every time I boot steam-runtime
with pipewire
or pipewire-dmabuf
(as required to make Remote Play work over WL), the system always requires to reconfigure the screens to be shared, and does not seem to honor the "Allow restoring in future sessions" option:
Any progress on this? I find this issue particularly relevant now that KDE ships wayland as the default session. This is a feature breaking bug, one that doesn't require the users to change anything to encounter. Please fix it and please provide native Wayland support! Your OS uses KDE and it will break the Steam client on the next update!
I'm using plasma 6 Wayland, it works ok without extra arguments, as stated in previous posts. Tested on Fedora 40.
I'm using plasma 6 Wayland, it works ok without extra arguments, as stated in previous posts. Tested on Fedora 40.
It isn't working for sure on iOS devices, like iPads and Apple TVs
I'm using plasma 6 Wayland, it works ok without extra arguments, as stated in previous posts. Tested on Fedora 40.
It isn't working for sure on iOS devices, like iPads and Apple TVs
It does, here:
Replying to https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-2001973704
I guess they fixed it then, I'll try again later. Thanks!
I'm using plasma 6 Wayland, it works ok without extra arguments, as stated in previous posts. Tested on Fedora 40.
Are you saying this issue is fixed? Because I came here because I just see a black screen like others
Replying to https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-2001973704
On Arch it isn't working. I just see a black screen: https://github.com/ValveSoftware/steam-for-linux/assets/94871794/19920a20-14fb-45d1-82b8-0d7b70b007fb
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?
On Arch it isn't working. I just see a black screen: https://github.com/ValveSoftware/steam-for-linux/assets/94871794/19920a20-14fb-45d1-82b8-0d7b70b007fb
Back when I used Arch, I fixed it by installing missing libraries: https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-1660537074
Can you check if you're missing any?
Replying to https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-2003586496
I fixed the missing libraries but I still have a black screen
Now the command
file * | grep ELF | cut -d: -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found' | sort | uniq
Shows no missing libraries
In related information, when using Steam over Wayland, every time I boot
steam-runtime
withpipewire
orpipewire-dmabuf
(as required to make Remote Play work over WL), the system always requires to reconfigure the screens to be shared, and does not seem to honor the "Allow restoring in future sessions" option:
does anyone know why "Allow restoring in future sessions" seems to not work as expected? is this something steam has to support? or is it not working in plasma yet?
Replying to https://github.com/ValveSoftware/steam-for-linux/issues/6148#issuecomment-2014745324
It’s a plasma 5 quirk. That dialog doesn’t appear in plasma 6.
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:
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.