The officially official Devuan Forum!

You are not logged in.

#1 2020-01-04 22:06:56

Registered: 2019-10-26
Posts: 6  

Howto enable HW accel in vlc on ASCII with e.g. AMD radeonsi driver

When running vlc 3.0.8 from on my ASCII Ryzen 5 2500U driven laptop i encountered:
"Failed to open VDPAU backend"
on the terminal after starting there vlc and opening a video.
On beowulf the same vlc version works as expected and does not require environment variable support.

The build in GPU "AMD Radeon Vega 8" has the ability to accelerate videos if you have the following packages installed

for testing helpful packages are

Unfortunately vlc relies on environment variables to determine the hardware acceleration possibilities of the GPU and defaults to "nvidia".

To "convince" vlc to use the build in video decoding acceleration of the AMD GPU you add the following lines to /etc/environment

sudo echo -e "export LIBVA_DRIVER_NAME=radeonsi\r\nexport VDPAU_DRIVER=radeonsi" >> /etc/environment

should give you the following contence of  /etc/environment.

$ cat /etc/environment
export LIBVA_DRIVER_NAME=radeonsi
export VDPAU_DRIVER=radeonsi

After logout and logging in again, you can check in the terminal with

$ set | grep radeon

for success.
vlc will now run smooth for all local users.

A sample output on the terminal would look like this

$ vlc
VLC media player 3.0.8 Vetinari (revision 3.0.8-0-gf350b6b5a7)
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns -1
libva info: User requested driver 'radeonsi'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0

In this mini howto I only tested my laptop with 2016 HW  "AMD Radeon Vega 8" running on a backported 4.19.0-0.bpo.1-amd64 kernel with mesa-va-drivers and mesa-vdpau-drivers (version 18.2.8 ...).
If you have Intel GPUs you might need "LIBVA_DRIVER_NAME=iHD" or "LIBVA_DRIVER_NAME=i965" or ...
Also "VDPAU_DRIVER=va_gl" might be a good choice - or not.
You have to find out the combinations yourself.

Testing with your hardware is easy.
1) Make sure you have hardware acceleration turned on.

glxinfo | grep Mesa 

in a terminal and if it outputs something like

client glx vendor string: Mesa Project and SGI
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.2.8
OpenGL version string: 4.4 (Compatibility Profile) Mesa 18.2.8
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.2.8

your  acceleration is turned on.

2) check for vdpau and va packages on your system.
e.g. by

$ dpkg --get-selections | grep vdpau

3) set your environment variables in a terminal

$ export LIBVA_DRIVER_NAME=radeonsi
$ export VDPAU_DRIVER=radeonsi

4) run vlc in terminal

$ vlc

and open a video file

5) check for error messages of vlc in the terminal

Failed to open VDPAU backend

6) goto 3) and change the variables...

Good luck!


Last edited by devujan (2020-01-05 14:36:55)


Board footer