1

On Ubuntu 16.04.3 Server when I try to launch video in Qt Quick based graphical application (eglfs backend (EGL full screen)) the video begin to twitch (became choppy, jerky, don't know right word). On previous installation video played smoothly. I make a diff of a trees of *.so loaded during video playing for old and new installation. There is not difference. I made an conjecture, that the problem maybe in hardware acceleration.

After I installed the gstreamer1.0-vaapi packet and restart the application it hangs if I push "play" button. The log contains the following messages:

error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so
libva info: va_openDriver() returns -1
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium
debug qml: Error: 1 (Could not initialize supporting library.) (qrc:///qml/imports/FileManager/components/VideoPlayer.qml:41)
warning default: Error: "Could not initialize supporting library." (unknown:0)
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium

error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so
libva info: va_openDriver() returns -1
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium
debug qml: Error: 1 (Could not initialize supporting library.) (qrc:///qml/imports/FileManager/components/VideoPlayer.qml:41)
warning default: Error: "Could not initialize supporting library." (unknown:0)
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=gallium

Then I type:

# apt-file search /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so
mesa-va-drivers: /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so
# apt install mesa-va-drivers
# ls /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so
ls: cannot access '/usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so': No such file or directory

How is it possible? There is evidence, that package mesa-va-drivers should contain that *.so file. No other package did. Should I build mesa va drivers by myself?

Both old and new systems have the following configuration: AMD A10-7800 Radeon R7, 12 Compute Cores 4C+8G.

vainfo:

error: can't connect to X server!
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/gallium_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
  • I would not rely on apt-file like this - run apt-file update before the search ! Maybe try sudo apt-get install --reinstall mesa-va-drivers? – Robert Riedl Feb 14 '18 at 10:02
  • Surely bases of apt-file are updated to be recent. Also I tried to apt-get --reinstall install more then one time. – Orient Feb 14 '18 at 10:14
  • Maybe problem not in driver. Because it turns out, that on the old system there is also no that *.so. Therefore problem is splitted into the two separate independent ones. – Orient Feb 14 '18 at 10:15
  • Interesting... I had a look into the deb package of mesa-va-drivers and the gallium_drv_video.so is there... – Robert Riedl Feb 14 '18 at 10:32
  • locate _drv_video.so lists only dummy, i965, nvidia, s3g and vdpau drivers. Arch docs says, that Since version 12.0.1 libva-mesa-driver provides radeonsi instead of gallium.. Invocation in form LIBVA_DRIVER_NAME=radeonsi vainfo works fine. – Orient Feb 14 '18 at 11:03
1

I actually did just have this exact same thing. Yes, @RobertRiedl comment about where the gallium_drv_video.so is correct. However, it is not listed as that as it is only a link to another file.

To fix it I did the following:

cd /usr/lib/x86_64-linux-gnu/dri/
sudo rm gallium_drv_video.so
sudo apt install mesa_va_drivers
sudo ln -s radeonsi_drv_video.so gallium_drv_video.so

After running the above, then checking the vainfo worked fine:

To correct the can't connect to the X server run:

export DISPLAY=:0
xhost +

Running vainfo to make sure it is working:

:~$ vainfo
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva 1.7.1)
vainfo: Driver version: Mesa Gallium driver 18.1.0-devel for AMD RS880 (DRM 2.50.0 / 4.13.0-36-generic, LLVM 6.0.0)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.