![由于 libLLVM-13.so,AMDGPU VA-API 在 Firefox 上失败](https://linux22.com/image/946095/%E7%94%B1%E4%BA%8E%20libLLVM-13.so%EF%BC%8CAMDGPU%20VA-API%20%E5%9C%A8%20Firefox%20%E4%B8%8A%E5%A4%B1%E8%B4%A5.png)
我使用的是 Ubuntu 20.04 LTS x11,内核版本是 5.13.0-39-generic #44~20.04.1-Ubuntu。我安装了 Firefox 并打开了 VA-API,但我注意到错误输出如下
libva info: VA-API version 1.8.0
libva info: Trying to open /opt/amdgpu/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva error: dlopen of /opt/amdgpu/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so failed: libLLVM-13.so: cannot open shared object file: No such file or directory
libva info: va_openDriver() returns -1
每当我尝试播放视频时。
vainfo 似乎有一个很好的输出
libva info: VA-API version 1.8.0
libva info: Trying to open /opt/amdgpu/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.8 (libva 2.6.0)
vainfo: Driver version: Mesa Gallium driver 22.0.0-devel for AMD Radeon RX 5700 XT (navi10, LLVM 13.0.1, DRM 3.44, 5.13.0-39-generic)
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
VAProfileNone : VAEntrypointVideoProc
我也尝试了 snap 和 flatpak 上的 firefox,但都返回了完全相同的错误。我发现访问 VAAPI 的唯一方法是 flatpak 版本的 vlc,它使用 VA-API 版本 1.12.0。这是问题所在吗?
[00007fd60c0033a0] gl gl: Initialized libplacebo v4.192.1 (API v192)
libva info: VA-API version 1.12.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/GL/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_12
libva info: va_openDriver() returns 0
答案1
我从apt.llvm.org对于 Firefox 中的 ubuntu focal 和 vaapi 现在似乎可以使用 MOZ_DISABLE_RDD_SANDBOX=1 环境变量正常工作。
libva info: VA-API version 1.8.0
libva info: Trying to open /opt/amdgpu/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_8
ATTENTION: default value of option mesa_glthread overridden by environment.
libva info: va_openDriver() returns 0
ATTENTION: default value of option mesa_glthread overridden by environment.