Hardware acceleration does not work on AMD

System log
I’m trying to set up hardware acceleration for mpv by following this guide on the Arch wiki: https://wiki.archlinux.org/title/Hardware_video_acceleration
I have an AMD GPU so I installed both libva-vesa-driver and mesa-vdpau to see which works better for me. But when I get to the verification step I have issues, which I think are related to driver files or something like that. My output for vainfo:

libva error: dlopen of /usr/lib/dri/radeonsi_drv_video.so failed: libLLVM-14.so: cannot open shared object file: No such file or directory
vaInitialize failed with error code -1 (unknown libva error),exit

My output for vdpauinfo:

Failed to open VDPAU backend libvdpau_radeonsi.so: cannot open shared object file: No such file or directory
Error creating VDPAU device: 1

I have a AMD GPU… Try this:

# pacman -S libva-utils
# pacman -S libva-mesa-driver
# pacman -S lib32-libva-mesa-driver (only required for 32bit application, such as steam)
# pacman -S libvdpau-va-gl   (translation layer) - VDPAU driver with OpenGL/VAAPI backend. H.264 only.
# pacman -S libva-vdpau-driver (translation layer) - A VDPAU-based backend for VA-API
# pacman -S mesa-vdpau
# pacman -S lib32-mesa-vdpau (only required for 32bit application, such as steam)
# pacman -S vdpauinfo

Then, add to /etc/environment the following:
VDPAU_DRIVER=radeonsi

logout and then:
run vainfo and vdpauinfo

3 Likes

Unfortunately this doesn’t fix the issue

Its working here just by doing the mentioned above… Maybe someone have another idea to help you

vainfo

ainfo: VA-API version: 1.15 (libva 2.15.0)
vainfo: Driver version: Mesa Gallium driver 22.1.3 for AMD Radeon RX 6750 XT (navy_flounder, LLVM 14.0.6, DRM 3.46, 5.18.9-arch1-1)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc

vdpauinfo

display: :0 screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0

Video surface:

name width height types

420 16384 16384 NV12 YV12
422 16384 16384 UYVY YUYV
444 16384 16384 Y8U8V8A8 V8U8Y8A8
420_16 16384 16384
422_16 16384 16384
444_16 16384 16384

Decoder capabilities:

name level macbs width height

MPEG1 — not supported —
MPEG2_SIMPLE 3 78336 4096 4906
MPEG2_MAIN 3 78336 4096 4906
H264_BASELINE 52 78336 4096 4906
H264_MAIN 52 78336 4096 4906
H264_HIGH 52 78336 4096 4906
VC1_SIMPLE 1 78336 4096 4906
VC1_MAIN 2 78336 4096 4906
VC1_ADVANCED 4 78336 4096 4906
MPEG4_PART2_SP 3 78336 4096 4906
MPEG4_PART2_ASP 5 78336 4096 4906
DIVX4_QMOBILE — not supported —
DIVX4_MOBILE — not supported —
DIVX4_HOME_THEATER — not supported —
DIVX4_HD_1080P — not supported —
DIVX5_QMOBILE — not supported —
DIVX5_MOBILE — not supported —
DIVX5_HOME_THEATER — not supported —
DIVX5_HD_1080P — not supported —
H264_CONSTRAINED_BASELINE 0 78336 4096 4906
H264_EXTENDED — not supported —
H264_PROGRESSIVE_HIGH — not supported —
H264_CONSTRAINED_HIGH — not supported —
H264_HIGH_444_PREDICTIVE — not supported —
VP9_PROFILE_0 — not supported —
VP9_PROFILE_1 — not supported —
VP9_PROFILE_2 — not supported —
VP9_PROFILE_3 — not supported —
HEVC_MAIN 186 139264 8192 4352
HEVC_MAIN_10 186 139264 8192 4352
HEVC_MAIN_STILL — not supported —
HEVC_MAIN_12 — not supported —
HEVC_MAIN_444 — not supported —
HEVC_MAIN_444_10 — not supported —
HEVC_MAIN_444_12 — not supported —

Output surface:

name width height nat types

B8G8R8A8 16384 16384 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A8I8 I8A8
R8G8B8A8 16384 16384 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A8I8 I8A8
R10G10B10A2 16384 16384 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A8I8 I8A8
B10G10R10A2 16384 16384 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A8I8 I8A8

Bitmap surface:

name width height

B8G8R8A8 16384 16384
R8G8B8A8 16384 16384
R10G10B10A2 16384 16384
B10G10R10A2 16384 16384
A8 16384 16384

Video mixer:

feature name sup

DEINTERLACE_TEMPORAL y
DEINTERLACE_TEMPORAL_SPATIAL -
INVERSE_TELECINE -
NOISE_REDUCTION y
SHARPNESS y
LUMA_KEY y
HIGH QUALITY SCALING - L1 y
HIGH QUALITY SCALING - L2 -
HIGH QUALITY SCALING - L3 -
HIGH QUALITY SCALING - L4 -
HIGH QUALITY SCALING - L5 -
HIGH QUALITY SCALING - L6 -
HIGH QUALITY SCALING - L7 -
HIGH QUALITY SCALING - L8 -
HIGH QUALITY SCALING - L9 -

parameter name sup min max

VIDEO_SURFACE_WIDTH y 48 4096
VIDEO_SURFACE_HEIGHT y 48 4096
CHROMA_TYPE y
LAYERS y 0 4

attribute name sup min max

BACKGROUND_COLOR y
CSC_MATRIX y
NOISE_REDUCTION_LEVEL y 0.00 1.00
SHARPNESS_LEVEL y -1.00 1.00
LUMA_KEY_MIN_LUMA y
LUMA_KEY_MAX_LUMA y

vp9

$ mpv spring-vp9-vorbis.webm
(+) Video --vid=1 () (vp9 2048x858)
(+) Audio --aid=1 (
) (vorbis 2ch 44100Hz)
[vo/gpu/wayland] GNOME’s wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
Cannot load libcuda.so.1
Using hardware decoding (vaapi).
AO: [pulse] 44100Hz stereo 2ch float
VO: [gpu] 2048x858 vaapi[nv12]
AV: 00:00:01 / 00:07:44 (0%) A-V: 0.012 DS: 2.861/4

Exiting… (Quit)

av1

$ mpv Chimera-AV1-8bit-480x270-552kbps.mp4
(+) Video --vid=1 (*) (av1 480x270 23.976fps)
[vo/gpu/wayland] GNOME’s wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
Cannot load libcuda.so.1
Using hardware decoding (vaapi).
VO: [gpu] 480x270 vaapi[nv12]
V: 00:00:01 / 00:06:12 (0%) DS: 2.500/4

Exiting… (Quit)

1 Like

Upon further digging I noticed that the cause of this error was my llvm being outdated, so I ran a full system update and it worked again (last time I updated was only like 3 or 4 days ago, so I’m confused how this happened). Sorry for the dumb question.

llvm-libs was

Last Updated: 2022-07-02 19:36 UTC

so you might have just missed that one.

I would make sure to have always a fully updated system before I install any new packages.

1 Like

I have a RX 580, is this of any use to me with this card as well?

Use only if vdpauinfo is not working

1 Like

This is why “partial upgrades are not supported”. :wink:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.