Closed toojays closed 2 years ago
Hello, per "Added support for VA-API hardware encoding on Linux (can be disabled by turning off AMD and Intel hardware encoding in the Remote Play advanced host settings)" in the 2021-11-02 Steam client beta update, please opt into Steam's client beta and retest this issue.
Statistics show VA-API encoding when connected via the Steam Link app on Android!
EDIT: I solved it, i just had to install the 32 bit version of VAAPI, i forgot that steam needs 32 bit libraries, now it works
streaming_log.txt Not working for me, running an RX 480 and still getting "Game Vulkan RGB + libyuv + libx264 main (4 threads)", i enabled hardware encoding in steam settings and made sure VAAPI is installed
Seems to be working here. Ubuntu 21.10 + rx5500xt. Thanks! :)
Thanks everyone!
it's working on Ubuntu 20.04 LTS + RX 470. thank you very much for your hard work!
... btw, is there any way to select GPU for encoding on multiple GPU machine? ;)
PC1
$ lspci | grep VGA 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev cf) 09:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 730] (rev a1) 0a:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev c8) $ ls /dev/dri/ by-path card0 card1 renderD128 renderD129
PC2
$ lspci | grep VGA 01:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 710] (rev a1) 04:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 710] (rev a1) 06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev cf) $ ls /dev/dri/ by-path card0 renderD128
I quickly tested on Fedora 34 with Radeon 580, it seems to be working. Thanks!
Can't seem to get this working on Kubuntu 21.10. Using the latest Steam beta client, Settings > Remote Play > ADVANCED HOST OPTIONS > "Enable hardware encoding" is enabled.
My streaming client is still reporting the encoder as "Desktop OpenGL NV12 + Libx264 main (3 threads)".
lspci | grep VGA:
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev e7)
vainfo:
libva info: VA-API version 1.12.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_12
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.12 (libva 2.10.0)
vainfo: Driver version: Mesa Gallium driver 21.2.2 for Radeon RX 580 Series (POLARIS10, DRM 3.41.0, 5.13.0-20-generic, LLVM 12.0.1)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
I also tried setting exporting LIBVA_DRIVER_NAME
as "radeonsi" but that did not make a difference.
Hello @Thrickles, you're testing 64 bit VA-API, but Steam can be using 32 bit VA-API. Please verify you have mesa-va-drivers:i386
with something like apt policy mesa-va-drivers mesa-va-drivers:i386
and install the 32 bit package variant if it isn't already.
Thank you @kisak-valve! Really appreciate the quick response and overall support here. I do have i386 mesa packages installed, but I did not have libva2:i386 installed. Once installed, my streams now show "VAAPI H264" for the encoder.
Question to all testers: Does HEVC (H.265) work or is VA-API support limited to H.264 for now? I have only tested against the Steam flatpak and suspect that it might be a limitation (or missing dependency?) there, but am curious what native users are reporting.
Seems to work with the RX 5500 XT 8GB mostly, but the screen occasionally goes black for a moment. Sometimes every few seconds, sometimes it'll go for minutes at a time with no interruption. It seems like maybe the stream is restarting or something, because sometimes when it comes back up it takes a couple moments for it to come up to full encoding quality. Could it be something weird with the 8GB model or do I need to update the Steam Link I'm using to the beta too? Oh, and I noticed the fast/balanced/beautiful selector in Remote Play client settings doesn't do anything either. Not sure if that's related or not. The quality and latency are both good while it's working.
@falk4243 I'm only seeing it come up in H.264 mode but I don't know how to change it for testing anything else.
Kind of works for me on RX 480 showing VAAPI 264. But it seems, when the GPU load is high, the game freezes (tested with GRIP: Combat Racing (Coop) and Redout: Enhanced Edition (Coop)). Menus worked fine, but shortly after the races started, the game froze. With a bit of waiting the game continued, until it froze again. Without GPU acceleration it works without problem. (There was no obvious problem logged in journalctl.)
@Urfoex This is a limitation of VAPPI with that hardware. The encoder will freeze up if the GPU runs out of resources. If the game is running over 60FPS, capping it with something in game or Mangohud can help lower the usage and get a stable stream.
For those running archlinux based systems, other than installing lib32-libva-mesa-driver
(in addition to libva-mesa-driver
), you also need to run with the native runtime by installing steam-native-runtime
and running steam through the steam-native
script.
Works like a charm for me now under Arch Linux. VAAPI picks up the Intel GPU on my laptop and uses the hardware H264 encoder there to provide a hugely improved streaming experience! Thanks!
@ieyi4ooPAig1ui5U Very late answer, but you can change the setting client-side on the iOS and the Android Steam Link app. No support for HEVC when streaming from PC to PC (whether Linux or Windows) it seems.
In the meantime, I tinkered a bit more and could only get h264 encoding to work, which is a shame with AMD hardware since their h265 encoding is better by miles and leagues. Streaming with Sunshine instead (which supports HEVC encoding), the difference is like night and day.
Sadly it's still not working for me on Manjaro. Every time I start the stream steam just crashes and restarts. About my system: Manjaro with Gnome DE, AMD CPU and GPU.
What I've done:
Steam itself gives these logs:
Switching video stream from NONE to Desktop_MovieStream
ffmpeg verbose: libva: VA-API version 1.13.0
ffmpeg verbose: libva: User environment variable requested driver 'radeonsi'
ffmpeg verbose: libva: Trying to open /usr/lib32/dri/radeonsi_drv_video.so
ffmpeg verbose: libva: Found init function __vaDriverInit_1_13
ac: Unknown GPU, using 0 for raster_config
CLIENT: Got control packet k_EStreamControlSetTargetBitrate
CLIENT: Got control packet k_EStreamControlSetSpectatorMode
CLIENT: Got control packet k_EStreamControlSetCaptureSize
CLIENT: Got control packet k_EStreamControlSetTitle
CLIENT: Got control packet k_EStreamControlSetIcon
CLIENT: Got control packet k_EStreamControlSetActivity
My GPU is an RX 480. When streaming to the steam link from Linux, my streaming_log.txt shows:
Whereas from Windows, I get:
Unsurprisingly, I get a better picture, and smoother performance when streaming from Windows.
Recent versions of Mesa support hardware encoding of H264 on this GPU:
Please enhance the Steam Linux client to take advantage of this for streaming to the Steam Link.