Intel hardware decoding (vaapi) for Steam in home streaming

Hi, I have an opensuse i5 laptop with intel graphics as a streaming client for steam in home streaming, but I can’t seem to get intel hardware decoding to work. It’s enabled in steam, but still defaults to software decoding which produces a ton of latency.

There’s a guide for Arch here https://bbs.archlinux.org/viewtopic.php?id=187922 and one for mint here http://voltaicforge.com/linux/steam-vaapi-fix-linux/ but I can’t find a way to do this successfully in opensuse.

I’ve tried linking the libva files from /usr/lib but this only results in the stream crashing immediately. Has anyone found another way to get intel hardware decoding working?

some of the strace output:

libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
Initializing player
Refresh rate: 60.00
Effective rate: 59.75
Video size: 1920x1080, output size: 1920x1080
Video rect: 1920x1080 at 0,0
Texture rect: 1920x1080 at 0,0
Initialized player
Server available at address: 192.168.2.204:27031
Connecting to server at address: 192.168.2.204:27031
Session state Idle -> Connecting
Session state Connecting -> Handshake
Video size: 1920x1080, output size: 1920x1080
Video rect: 1920x1080 at 0,0
Texture rect: 1920x1080 at 0,0
Session state Handshake -> Authenticating
Got control packet k_EStreamControlServerHandshake
Session state Authenticating -> Negotiating
Got control packet k_EStreamControlAuthenticationResponse
Got control packet k_EStreamControlNegotiationInit
Session state Negotiating -> StreamStarting
Got control packet k_EStreamControlNegotiationSetConfig
Session state StreamStarting -> Streaming
Sending HID device 0eef/a108/0 at 0002:0004:00
Sending HID device 2516/0003/0 at 0002:0007:00
Sending HID device 0000/0000/-1 Sony Vaio Keys at sdl://0
Got control packet k_EStreamControlSetQoS
Got control packet k_EStreamControlSetTargetBitrate
Starting audio stream: frequency=48000, channels=2
Opened audio device: format=2, channels=2, frequency=48000
Initialized audio decoder: codec=3, sample rate=48000, channels=2
Got control packet k_EStreamControlStartAudioData
Got control packet k_EStreamControlSetSpectatorMode
Got control packet k_EStreamControlSetTitle
Got control packet k_EStreamControlSetIcon
Got control packet k_EStreamControlSetCursor
Got control packet k_EStreamControlSetActivity
Got control packet k_EStreamControlSetCursorImage
Got control packet k_EStreamControlSetTitle
Got control packet k_EStreamControlSetCursor
Got control packet k_EStreamControlSetCursorImage
Got control packet k_EStreamControlHideCursor
Got control packet k_EStreamControlSetCursor
Video size: 1920x1080, output size: 1920x1080
Video rect: 1920x1080 at 0,0
Texture rect: 1920x1080 at 0,0
Got control packet k_EStreamControlStartVideoData
Got control packet k_EStreamControlVideoEncoderInfo
ffmpeg verbose: Opened VA display via X11 display :0.
ffmpeg error: Failed to initialise VAAPI connection: -1 (unknown libva error).
CVAAPIAccel: av_hwdevice_ctx_create() failed
libavcodec software decoding with 4 threads
ffmpeg verbose: Reinit context to 1920x1088, pix_fmt: yuv420p
Video size: 1920x1080, output size: 1920x1080
Video rect: 1920x1080 at 0,0
Texture rect: 1920x1080 at 0,0
Targeting 29.88 FPS
Got control packet k_EStreamControlSetTargetFramerate
Targeting 29.88 FPS
Got control packet k_EStreamControlSetTargetFramerate
Got control packet k_EStreamControlVideoEncoderInfo
ffmpeg verbose: Opened VA display via X11 display :0.
ffmpeg error: Failed to initialise VAAPI connection: -1 (unknown libva error).
CVAAPIAccel: av_hwdevice_ctx_create() failed
libavcodec software decoding with 4 threads
ffmpeg verbose: Reinit context to 1920x1088, pix_fmt: yuv420p
Marking frame 191 complete with status k_EStreamFrameResultDroppedLate
Targeting 59.75 FPS

was able to adapt one of the scripts to work with Opensuse, but the problem now seems to be that Leap 15 and just about every other distro now uses libva2, while steam expects and only seems to work with libva 1.3. Looks like until steam for linux is updated to use libva2, we’re stuck using older distros still using 1.3.