Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

VA-API support in Firefox Snap

  • No replies
  • 1 has this problem
  • 10 views
more options

In 21.04, I was able to successfully enable VA-API support for Firefox for hardware video acceleration using my amdgpu on Wayland. Mainly, following steps from https://ubuntuhandbook.org/index.php/2021/08/enable-hardware-video-acceleration-va-api-for-firefox-in-ubuntu-20-04-18-04-higher/

Since upgraded to 21.10 which uses snap version by default, I've noticed increased CPU usage when playing youtube videos. When I checked by running Firefox from command line, I can see that I can't seems to open vaapi driver correctly:

$ /snap/bin/firefox Importing existing firefox profiles from /home/ymchen/.mozilla/firefox Found default profile: dhjf4r7r.default-1587103347891 Import done in 3.141 s amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description. If they do, bad things may happen! libva info: VA-API version 1.7.0 libva info: Trying to open /snap/firefox/631/gnome-platform/usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so libva info: va_openDriver() returns -1 libva info: VA-API version 1.7.0 libva info: Trying to open /snap/firefox/631/gnome-platform/usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so libva info: va_openDriver() returns -1

Installing firefox from apt, I can see that vaapi still works:

$ /usr/bin/firefox 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: Found init function __vaDriverInit_1_12 libva info: va_openDriver() returns 0 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: Found init function __vaDriverInit_1_12 libva info: va_openDriver() returns 0 libva info: VA-API version 1.12.0

Curiously, VA-API version available in snap version is older 1.7.0 compared to the apt installed version 1.12.0. Perhaps the "packaged" version of the dependencies in snap version is outdated?

I've also noticed that the file /snap/firefox/631/gnome-platform/usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so does not exist.

Any idea how to get Firefox snap to work with VA-API? Thanks

In 21.04, I was able to successfully enable VA-API support for Firefox for hardware video acceleration using my amdgpu on Wayland. Mainly, following steps from https://ubuntuhandbook.org/index.php/2021/08/enable-hardware-video-acceleration-va-api-for-firefox-in-ubuntu-20-04-18-04-higher/ Since upgraded to 21.10 which uses snap version by default, I've noticed increased CPU usage when playing youtube videos. When I checked by running Firefox from command line, I can see that I can't seems to open vaapi driver correctly: $ /snap/bin/firefox Importing existing firefox profiles from /home/ymchen/.mozilla/firefox Found default profile: dhjf4r7r.default-1587103347891 Import done in 3.141 s amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description. If they do, bad things may happen! libva info: VA-API version 1.7.0 libva info: Trying to open /snap/firefox/631/gnome-platform/usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so libva info: va_openDriver() returns -1 libva info: VA-API version 1.7.0 libva info: Trying to open /snap/firefox/631/gnome-platform/usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so libva info: va_openDriver() returns -1 Installing firefox from apt, I can see that vaapi still works: $ /usr/bin/firefox 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: Found init function __vaDriverInit_1_12 libva info: va_openDriver() returns 0 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: Found init function __vaDriverInit_1_12 libva info: va_openDriver() returns 0 libva info: VA-API version 1.12.0 Curiously, VA-API version available in snap version is older 1.7.0 compared to the apt installed version 1.12.0. Perhaps the "packaged" version of the dependencies in snap version is outdated? I've also noticed that the file /snap/firefox/631/gnome-platform/usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so does not exist. Any idea how to get Firefox snap to work with VA-API? Thanks