Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming (Sunshine or Steam Link) does not capture Steam UI #1276

Open
rcarmo opened this issue Jun 24, 2024 · 23 comments
Open

Streaming (Sunshine or Steam Link) does not capture Steam UI #1276

rcarmo opened this issue Jun 24, 2024 · 23 comments
Labels
sunshine Self-hosted game stream host for Moonlight

Comments

@rcarmo
Copy link

rcarmo commented Jun 24, 2024

Describe the bug

Right now, when streaming to another machine using Steam Link or sunshine, I cannot get the remote machine to see the Steam UI - it is simply not rendered in the stream.

That is, if I am playing a game:

snapshot

...and I hit the Steam button (or equivalent mapped to my remote controller), I will see this on the machine's physical display (captured with a PiKVM):

snapshot-2

...and after pressing "down", the UI becomes translucent:

snapshot-3

However, sunshine/Moonlight/Steam Link will display none of it. On the client machine will always see the game layer, without anything overlaid (although I can hear the UI audio):

snapshot

I have tried Steam Link settings, checked If sunshine is running with setcap, and also tried a number of different images (see #1260 to get an idea), but the issue happens on both deck and non-deck images, on GNOME or KDE.

Am curious to understand if this is a Wayland or AMD thing and if there are any fixes/workarounds.

What did you expect to happen?

I expected the stream to match the physical display.

Output of rpm-ostree status

State: idle
Deployments:
  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck-gnome:40-stable-20240611
                   Digest: sha256:26b268ec5de0c1618f0618855761b2da934614dfb060fd5d69ffed4fad14d2b9
                  Version: 40.20240611.0 (2024-06-11T16:59:32Z)
                     Diff: 460 removed, 193 added
          LayeredPackages: fio python3.11 python3.11-devel sunshine
                Initramfs: '"-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf"' 

● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:40-stable-20240611
                   Digest: sha256:6c59a228186bdbd3417580129702a9337c2edadac0206b0d4773df53dca58413
                  Version: 40.20240611.0 (2024-06-11T17:01:53Z)
          LayeredPackages: fio python3.11 python3.11-devel sunshine
                Initramfs: '"-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf"' 

  ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck-gnome:40-stable-20240611
                   Digest: sha256:26b268ec5de0c1618f0618855761b2da934614dfb060fd5d69ffed4fad14d2b9
                  Version: 40.20240611.0 (2024-06-11T16:59:32Z)
          LayeredPackages: fio python3.11 python3.11-devel sunshine
                Initramfs: '"-I /etc/crypttab /etc/modprobe.d/amdgpu.conf /etc/modprobe.d/deck-blacklist.conf"'

Hardware

                                            me@bazzite
     %%%%%%====%%%%%%%%%%                
   %%%%%%%%    %%%%%%%%%%%%%%             󱋩  bazzite-deck:stable 
  %%%%%%%%%    %%%%%%%%%%%%%%%%           󰣛  Fedora Linux 40 (Kinoite) x86_64
  %%%%%%%%%    %%%%%%%%%%%%%%%###           Linux 6.8.12-301.fsync.fc40.x86_64
  %%%%%%%%%    %%%%%%%%%%%%%######        󰅐  2 hours, 30 mins
  ==                  =======######       󰔠  Spawned on Feb 27 2024
  ==                  =========#####     
  %%%%%%%%%    %%%%%%%####======#####     󰾰  HCAR6000-MI2
  %%%%%%%%%    %%%%%#######=====#####     󰻠  AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (16) @ 6.08 GHz
  %%%%%%%%%    %%%#########=====#####     󰍛  AMD Radeon 780M @ 0.80 GHz [Integrated]
  %%%%%%%%%    %%##########=====#####       5.15 GiB / 30.60 GiB (17%)
  %%%%%%%%%====###########=====######       384.69 GiB / 475.35 GiB (81%) - btrfs [Read-only]
   %%%%%%%%====#########======######      󰍹  1920x1080 @ 50Hz [External]
    %%%%%%%=====#####========######       󰖺  PiKVM Composite KVM Device
     %%%%###===============#######        󰖺  Mouse passthrough
      %#######==========#########        
        #######################             bash 5.2.26
          ###################               /dev/pts/1
              ###########                 󰏖  2717 (rpm), 79 (flatpak-system), 41 (flatpak-user)

                                           ● ● ● ● ● ● ● ●

Extra information or context

No response

@HikariKnight
Copy link
Member

Don't think this is something we can fix as i vaguely remember this also being a problem on SteamOS

@rcarmo
Copy link
Author

rcarmo commented Aug 3, 2024

I've been investigating this with a few friends who have SteamDecks and as it turns out, this week I confirmed this works on SteamOS (with SteamLink). And I have a recollection of it working in earlier releases in both Steam Link and sunshine, although it was almost a year back and in another device.

@Darksk0pe
Copy link

Darksk0pe commented Aug 12, 2024

Same problem hope you can fix it :)

i tryed the service https://clouddeck.app/ its an Nobara Linux 39 in gamemode .. and all overlays works perfect. they found a way

@thekk1
Copy link

thekk1 commented Aug 17, 2024

I have this issue too on my UM790pro.
Additional the mouse cursor is not rendered, so mouse/keyboard games are impossible at remote play.

This works fine with ChimeraOS and with SteamDeck with original SW.

This tells me that this is a real issue in bazzite.

@thekk1
Copy link

thekk1 commented Aug 18, 2024

I have done more research and it turns out that there are more issues with remote play than the two above.
Here is a complete list:

Game Mode:

  • No Steam overlay while remote play
    • Works with SteamOS, ChimeraOS and clouddeck.app
    • Affects any client (SteamLink HW, Android, Linux, Windows)
  • No mouse cursor if mouse is connected with the client device
    • Only testes with SteamLink HW

Desktop Mode:

  • Switching to desktop mode breaks BPM and so Remote Play, too
    • Workaround is to restart steam in desktop mode or disable BPM in remote device before switching do desktop mode
  • in BPM the steam overlay works but the background is not visible. There is only the menu visible and centered like "full screen"
  • Remote play in desktop mode breaks the mouse cursor for the gaming|server device if there is a mouse connected at the remote device. The cursor is only visible to remote device until you restart.

@kasper-madsen
Copy link

kasper-madsen commented Aug 22, 2024

I sort of have this also, but however using mouse mode via Xbox controller brings the overlay up or move the mouse via my iPad also fixes this but when the mouse hides so does the overlay

@TeleBooth
Copy link

TeleBooth commented Aug 28, 2024

I’m running into this issue in the same manner that @kasper-madsen is describing. I have tried this on Nobara 40, the latest Bazzite, and even the latest ChimeraOS. All the same.

I have a feeling that something changed around May/June that has affected all of these builds. I can try backdating to an older version of these systems to see if it works.

edit: The issue appears using both Sunshine and Steam Remote Play.

@Zaunei
Copy link

Zaunei commented Sep 29, 2024

When I activate the performance overlay on level 2, I suddenly see the Steam overlay within the Sunshine stream, but the performance overlay is then only displayed on the real monitor.

Otherwise, I also have issues when I set a game to a lower resolution (in the game itself) than the normal resolution used in Steam:
Screenshot 2024-09-29 at 10 06 24@2x

As soon as the Steam overlay is displayed, it scales correctly.

Screenshot 2024-09-29 at 10 06 04@2x

@WeslyG
Copy link

WeslyG commented Oct 4, 2024

I tested moonlight on different clients, and found in the native client for mac os that when you press the Esc button, the window turns black, but the steam menus that were previously unavailable are transformed. But only they (left and right). It's funny, and I haven't found a way to get back to regular steam other than restarting the moonlight session.

@floppyFK
Copy link

I have the same problem: No Steam overlay is visible in a streamed session (sunshine/moonlight as well as steam link). On the Host PC however, I can see the overlay. I use the bazzite-deck-stable.iso (KDE) image on my desktop PC with an AMD 7900XTX.

Now I have tested also the bazzite-stable.iso (KDE), where i enabled the big picture on startup of Steam and voila: The Steam overlay appears now also in the stream.
The problem seems to be related to the deck-specific GUI of Steam.

@nlflint
Copy link

nlflint commented Dec 13, 2024

Btw, I'm seeing this bug in Arch too, so I don't think it's a Bazzite bug. I'm on an AMD rx6800.

I'm trying to repo it on the lastest official release of Sunshine (v0.23.1), as Bazzite is on an unstable Sunshine version and so is Arch. The stable version is available on the AUR, but it's broken. I'm trying to build from the official git repo on tag v0.23.1... will report back later at what I find.

@nlflint
Copy link

nlflint commented Dec 14, 2024

will report back later at what I find.

For the life of me, I cannot build sunshine v0.23.1 on Arch, so many deprecated libs, especially boost 1.83. So instead, I tested on a ChimeraOS v45-1 machine with sunshine v0.23.1, and it does NOT exhibit this bug.

Then I upgraded my Chimera box to Sunshine v2024.1102.190004.r0.g39bab45-1 (AUR package sunshine-git), and Sunshine still does NOT exhibit this bug. However, this same Sunshine version DOES exhibit the bug on my Arch box, therefore I don't think the bug is directly related to Sunshine.

Next, I'm going to try to downgrade the kernel on my Arch box to match ChimeraOS 45-1 (v6.6.10), and see if the bug repros on Arch.

@nlflint
Copy link

nlflint commented Dec 14, 2024

I tested back to kernels 6.5.0 and 6.6.64 (LTS), and the bug still exists, so it's probably not kernel related either. So strange that it doesn't repro on my Chimera v45-1 box, so many possibilities, who knows.

@scottsweb
Copy link

@nlflint It happens on both Sunshine and Steam Link, so I have ruled out Sunshine as the culprit for now too.

If I remember correctly, you can get it work if you switch to desktop in Bazzite and then stream a game from there. This skips the gamescope specific session, but it comes at the cost of a few nice things like scaling controls etc.

There seems to be lots of people with similar issues:

@nlflint
Copy link

nlflint commented Dec 15, 2024 via email

@nlflint
Copy link

nlflint commented Dec 16, 2024

Update: I was able to make the bug go away on Arch, but I had to take some extreme measures to do it:

  1. Installed fresh Arch with all packages locked to official package archives from Feb 2nd 2024. Almost year old packages at this point.
  2. Installed the various gamescope session packages from the AUR, but resetting the package build repos to their commits on Feb 2nd.
  3. Installed the exact same linux kernel as ChimeraOS 45-1 (v6.6.10-chos1-chimeraos-2). They've got custom patches in there...

I'm going bisect this stuff until I can narrow down the problem. Probably gonna take awhile. However, it does seem kernel related after all, as just changing to a regular kernel (non-chimeraos, but same version) brings the bug back.

@nlflint
Copy link

nlflint commented Dec 28, 2024

Update:

On my test system, I've bisected the bug to two components, it takes the right combination of versions for the bug to appear/disapper:

  1. Gamescope
  2. ChimeraOS's custom kernel

For gamescope, this commit is where the bug first shows up: ValveSoftware/gamescope@04ad0c9 titled: drm: Update AMD color management for Linux 6.8. This commit was reverted for several releases after it was introduced. Finally, it was permanently present in release v3.14.8 and later. The latest release where the bug does NOT reproduce is v3.14.7.

Technically my bisect was done against ChimeraOS's fork of Gamescope called gamescope-plus, where this screenshot comes from. Chimera keeps it's fork up to date, and any build from these commits exactly matches Valves official repo. Note, I marked commits with branch names working and broken to indicated which commits contain the undesired behavior:
Image

For the kernel, I'm using ChimeraOS's kernel. My bisect located two boundaries. Essentially, the bug appears in version v6.6.4-chos2-2 and earlier, goes away from v6.6.4-chose3-1 to v6.6.17-chos2-1. Finally the bug reappears in all their v6.8.x builds and later. See screenshot with my branches marked bugged vs works to see what I tested. For this, I haven't nailed down the actual kernel commits. I looked into it and the diff is hard to make sense of. I plan to better bisect this as I have time.
Image

Bottom line, the bug GOES AWAY when these two conditions are met:

  1. When your Gamescope or gamescope-plus version is v3.14.7 or earlier.
  2. Your ChimeraOS's kernel is v6.6.4-chos3-1 to v6.6.17-chos2-1

Any combination outside those versions will contain this sunshine overlay bug.

For now, to work around this bug, I'm using the Arch community mirror archive to back-date my Arch install to Apr 11, 2024, and running ChimeraOS kernel v6.6.17-chos2-1, with gamescope-plus v3.14.7, and all the gamescope session related packages, to make it boot directly into game mode.

@speakradmin
Copy link

Amazing work @nlflint !

Really hoping that this infuriating bug can be fixed soon

@chunky-games
Copy link

@nlflint I have found a weird glitch with this as well. if all settings in steams displays are left to default, then you enter a game and change the in-game resolution to below the monitor's base resolution, the steam UI will appear and work as normal. but this work around is extremely settings based, for example. in quick settings when you press Xbox button + A (or whatever controller you play with) your per game profile needs to be switched on and the scaling filter has to be switched off of linear, either to pixel, fsr, or nis. It's extremely odd but it works for some reason.

And just for reference, I'm on the regular bazzite-deck release.

@chunky-games
Copy link

@chunky-games also in the steam quick settings you need to have disable frame limit turned on. or else the steam UI will not work also

@bugs181
Copy link

bugs181 commented Jan 27, 2025

I sort of have this also, but however using mouse mode via Xbox controller brings the overlay up or move the mouse via my iPad also fixes this but when the mouse hides so does the overlay

You are a life saver! This workaround works for me too. Had I known this, I would have been enjoying decky loader far more for a couple weeks now.

Edit: Spoke too soon. Navigating the menu makes it disappear again. So annoying. Where does this bug come from? The capture method, Steam overlay, gamescope? Although a much different beast, and had it's own issues - steam-headless will show the overlay.

@nlflint
Copy link

nlflint commented Jan 28, 2025

@bugs181 @chunky-games

None of those workarounds made a difference on my machine (I'm on arch, so maybe because I have slightly different package versions). I tried playing around with more Steam display settings, and QAM settings, and nothing fixed it but....

Enabling HDR fixes it! (for the most part). I have a new overlay issue with one of my games, but the overlays work as expected in all the other games I tested. HDR looks great on my livingroom TV w/AppleTV4k. However, it's not a permanent fix as I have a client w/o an HDR monitor and the colors are messed up when in HDR.

This is with the latest packages and kernel as of today on Arch.

@bugs181
Copy link

bugs181 commented Jan 29, 2025

@bugs181 @chunky-games

None of those workarounds made a difference on my machine (I'm on arch, so maybe because I have slightly different package versions). I tried playing around with more Steam display settings, and QAM settings, and nothing fixed it but....

Enabling HDR fixes it! (for the most part). I have a new overlay issue with one of my games, but the overlays work as expected in all the other games I tested. HDR looks great on my livingroom TV w/AppleTV4k. However, it's not a permanent fix as I have a client w/o an HDR monitor and the colors are messed up when in HDR.

This is with the latest packages and kernel as of today on Arch.

I'll try to give HDR setting a go. Unfortunately, I don't have any HDR capable displays yet. Depending how bad the colors are messed up, it might be a temporary workaround worth using if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sunshine Self-hosted game stream host for Moonlight
Projects
None yet
Development

No branches or pull requests