ValveSoftware / steam-for-linux

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

Steam Deck uses different Hardware decoding method between Desktop and Game Mode for Remote Play #8929

Open joeknock90 opened 1 year ago

joeknock90 commented 1 year ago

Your system information

Please describe your issue in as much detail as possible:

After changing back to SteamOS 3.3 from 3.4 to regain hardware decoding capability (https://github.com/ValveSoftware/SteamOS/issues/903)

Streaming from Game Mode from an Arch Linux Host uses "VAAPI tiled hardware decoding"

Stream from SteamOS Desktop Mode from the same host uses "VAAPI DRM hardware decoding"

It seems as though VAAPI DRM Hardware decoding produces a SIGNIFICANTLY smoother streaming experience, free from micro stutter. This issue persists when streaming from both X11 and Wayland running on the host.

I am unable to produce the same effect when using my desktop as a Streaming Client. It seems to always use VAAPI DRM hardware decoding.

Proposed solution:

Use VAAPI DRM hardware decoding everywhere.

Steps for reproducing this issue:

  1. In game mode, start a stream from a Linux Host (I am unsure if this issue happens from a Windows host, I do not have one to test with) with "show Details" on
  2. See that it's using VAAPI tiled hardware decoding, experience micro stutter and/or screen tearing in video output
  3. Close stream, try the same from SteamOS desktop mode
  4. See that it's using VAAPI DRM hardware decoding
  5. No noticeable screen tearing or micro stutter. Experience is much smoother.
SaltyBet commented 1 year ago
  1. In game mode, start a stream from a Linux Host (I am unsure if this issue happens from a Windows host, I do not have one to test with) with "show Details" on

Can confirm this exact issue happens from a Windows host:

mrtnptrs commented 9 months ago

I can confirm this too.

Remote Play Streaming when in Game Mode: constant stutter, low FPS and crushed/darker colors. Remote Play Streaming in Desktop Mode: extremely few stutters, high FPS and normal colors (for this LCD panel anyways).

It seems like the hardware decoding in Game Mode is producing a subpar result compared to the one in Desktop Mode. At least that is my suspicion. Don't know how to find out which decoding method is used in either case and thus if it is indeed an issue of VAAPI DRM hardware decoding vs VAAPI tiled hardware decoding as @SaltyBet suggested.

Edit: ok, found out eventually that the stuttering also could occur when using Steam Link streaming and Remote Play Streaming in Game Mode and Desktop Mode. I tracked the cause of the stuttering down to the Nvidia Reflex settings;

Tested with both Ratchet & Clank: Rift Apart and Spider-Man Remastered. The seemingly low FPS was likely just due to enormous amounts of stutter. The stutter is thus likely not caused by the hardware encoding on the Steam Deck, but by the Boost functionality of Nvidia Reflex. Boost reduces CPU latency, so somehow that is causing stuttery encoded footage to get sent to the Steam Deck it seems. The crushed colors remain when streaming using Remote Play Streaming in Game Mode. But both issues are separate from this issues, so gonna report them both if they haven't been already. But the stutter issue is then likely not even Steam for Linux-based in cause (more likely in the Windows client), but the crushed colors issue might. Would need more testing from my side using my laptop.

Excuses thus for my previously incorrectly supplied information and I will do my best to report the individual issues in the proper places. And now actually see that this whole issue is about streaming FROM Steam Deck and not TO the Steam Deck... again, sorry.

ethan021021 commented 9 months ago

Same issue here. Subscribing