You are not logged in.

#1 2018-05-01 19:34:39

GrimKriegor
Member
Registered: 2018-05-01
Posts: 1

VA-API on a systemd-nspawn container for Steam In-Home streaming

Hello everyone.

For a while now I have had Steam inside an nspawn container and it has been working wonderfully.

However, recently I have wished to stream from a remote, more powerful machine using Steam's In-Home streaming, but have been having trouble getting hardware acceleration for decoding the incoming video stream.

These are the config files I have been successfully using for this container.

/etc/systemd/nspawn/arch.nspawn

[Exec]
Boot=1

[Files]
Bind=/tmp/.X11-unix
Bind=/dev/dri
Bind=/dev/shm
Bind=/dev/input
Bind=/run/user/1000/pulse:/run/user/host/pulse
Bind=/dev/snd

Bind=/media/Storage/Games

/etc/systemd/system/systemd-nspawn@arch.service.d/override.conf

[Service]
DeviceAllow=/dev/dri rw
DeviceAllow=/dev/shm rw
DeviceAllow=char-usb_device rwm
DeviceAllow=char-input rwm
DeviceAllow=char-alsa rwm
ExecStart=
ExecStart=/usr/bin/systemd-nspawn -D /media/Storage/Systems/Containers/%I --quiet --keep-unit --boot --link-journal=try-guest --machine=%I

The container runs on an I5-6600 machine and the hardware decoding is expected to work on its onboard Intel GPU with VA-API. Both host and guest are up to date Arch.

Software running on the container can access the host's Xorg server after I run

xhost +local

Although 3D applications run flawlessly, I get the following vainfo output on the guest:

libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns -1
libva info: User requested driver 'i965'
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva error: /usr/lib/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

As compared with the host:

libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Sandybridge Mobile - 2.1.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:    VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:    VAEntrypointEncSlice
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointEncSlice
      VAProfileH264High               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointEncSlice
      VAProfileH264StereoHigh         :    VAEntrypointVLD
      VAProfileVC1Simple              :    VAEntrypointVLD
      VAProfileVC1Main                :    VAEntrypointVLD
      VAProfileVC1Advanced            :    VAEntrypointVLD
      VAProfileNone                   :    VAEntrypointVideoProc

Steam In-Home streaming also outputs something similar and falls back to software decoding.

I assume this might be a permissions problem, maybe I ought to give the container access to something else.

Posting here in hopes someone has come into contact with a similar issue.

Thank you for your time.

Last edited by GrimKriegor (2018-05-02 03:51:55)

Offline

#2 2018-09-12 15:58:08

skyfoosooc
Member
Registered: 2016-08-06
Posts: 2

Re: VA-API on a systemd-nspawn container for Steam In-Home streaming

Did you ever find a solution to this problem?

I have been having a similar issue[1] with AMD and Intel graphics. I am also trying to get vulkan working and am hoping it's related to the VA-API trouble.

[1]: https://bbs.archlinux.org/viewtopic.php?id=239926

Offline

Board footer

Powered by FluxBB