protonscr

VAAPI hardware decoding video freeze

steamclosed Streaming
ValveSoftware/steam-for-linux#7150 · opened 2020-05-31 by James-C-000 · updated 2020-06-03 · 6 comments · github
JJames-C-000 2020-05-31 github

Your system information

  • Steam client version (build number or date): May 30 2020, 20:39:29
  • Distribution (e.g. Ubuntu): Void Linux
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

When using VAAPI hardware decoding with Steam in home streaming, I get video freezes every few minutes. I still get audio, just not video. Switching to software decoding gives me no freezes.

Relevant installed packages:

  • xf86-video-amdgpu-19.1.0_2
  • libva-2.7.1_1
  • libva-32bit-2.7.1_1
  • libva-utils-2.7.1_1
  • mesa-20.0.7_1
  • mesa-32bit-20.0.7_1
  • mesa-dri-20.0.7_1
  • mesa-dri-32bit-20.0.7_1
  • mesa-vaapi-20.0.7_1
  • mesa-vaapi-32bit-20.0.7_1

Steam settings (client):

  • Quality: Beautiful
  • Performance Overlay: Details
  • Limit bandwidth to: Unlimited
  • Limit resolution to: Display resolution
  • Speaker configuration: Stereo
  • Enable hardware decoding
  • Steam settings (host)

Steam settings (host):

  • Play audio on host: Disabled
  • Change desktop resolution to match streaming client: Disabled
  • Dynamically adjust capture resolution: Disabled
  • Use NVFBC capture on NVIDIA GPU: Disabled
  • Enable hardware encoding: Enabled
  • Enable hardware encoding on NVIDIA GPU: Enabled
  • Enable hardware encoding on AMD GPU: Disabled
  • Enable hardware encoding on Intel iGPU: Disabled
  • Number of software encoding threads: Automatic
  • Prioritize network traffic: Enabled

Client specs:

  • Linux 5.4.42_1 #1 SMP PREEMPT Thu May 21 07:35:36 UTC 2020 x86_64 GNU/Linux
  • Intel i5-8500
  • AMD Radeon RX 570
  • 16GB DDR4 2666MHz

Host specs:

  • Windows 10 Pro x64 v.1909
  • Intel i5-3470
  • Nvidia GeForce GTX 1070ti w/ driver version 446.14
  • 8GB DDR3 1600MHz

Here's a log file that details the crash. Looks like something wrong with ffmpeg? steamLog.txt
Sometimes the stream will stay on the black screen and needs to be pkilled, but sometimes it will crash with
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted
I don't think it's anything host side either, I've tried using different encoders and different rendering engines and I still get a freeze client side.

Steps for reproducing this issue:

  1. Enable VAAPI hardware decoding
  2. Launch a game and play for a few minutes
  3. Observe
JJames-C-000 2020-05-31 github

I've tested VAAPI hardware decode on another machine. The specs are:

  • Linux 5.4.43_1 #1 SMP PREEMPT Thu May 28 18:13:34 UTC 2020 x86_64 GNU/Linux (Void Linux)
  • Intel i5-8300H
  • Intel UHD Graphics 630
  • 8GB DDR4

Relevant installed packages:

  • intel-media-driver-20.1.1_1
  • intel-gmmlib-20.1.1_1
  • libva-intel-driver-2.4.0_2
  • libva-intel-driver-32bit-2.4.0_2
  • libvdpau-1.3_1
  • libvdpau-32bit-1.3_1
  • libvdpau-va-gl-0.4.2_2
  • libvdpau-va-gl-32bit-0.4.2_2

Using both the Steam client beta and stable, I have no VAAPI video freezes. Still freezes on original machine even after testing switching to Steam stable. I suspect this is an issue with VAAPI decoding on AMD hardware. Continuing to investigate...

JJames-C-000 2020-05-31 github

I'm including some more logs here in case it helps with anything. I've noticed that I'm getting

Failed to open VDPAU backend libvdpau_radeonsi.so: cannot open shared object file: No such file or directory ffmpeg error: VDPAU device creation on X11 display :0 failed.

now in the console output. I've tried deleting the steam libraries to fallback on system libs, and I've tried symlinking all the libvdpau libraries to ~/.local/share/Steam/ubuntu12_32/steam-runtime/usr/lib/i386-linux-gnu/vdpau no to avail. Worth noting that I know the packages work as moonlight can use VDPAU fine.

vdpauinfoOutput.txt
vainfoOutput.txt
I get the same output when running in a regular shell vs running with ~/.local/share/Steam/ubuntu12_32/steam-runtime/run.sh, so I'm just including the two files from the regular shell.

glxinfoOutput.txt
systemInfo.txt

JJames-C-000 2020-06-01 github

I switched my bandwidth limit from unlimited to 50Mbps and it seemed to delay the crash. Not sure if this is a one off or not, but I will investigate this tomorrow morning.

JJames-C-000 2020-06-03 github

Can confirm after extensive testing that the lower you set the bandwidth limit, the longer it takes to crash. I find that unlimited/50mbps usually crashes around the 5 minute mark, 25mbps takes about 12 minutes, and <=10mbps lasts around 25 minutes.

JJames-C-000 2020-06-03 github

Just found case #6765 and I'm 100% certain this is the same issue. I monitored with htop and there is a memory leak somewhere.

Kkisak-valve maintainer 2020-06-03 github

Hello @TomokoK, let's track this issue on the older issue report. Feel free to add your findings to it.

Nothing extracted yet.