After installing the candidate/vaapi channel, I still do not get hardware acceleration for video decoding from my NVIDIA gpu, see:
```
$ LIBVA_MESSAGING_LEVEL=2 snap run chromium
Gtk-Message: 09:07:37.215: Failed to load module "canberra-gtk-module"
Gtk-Message: 09:07:37.216: Failed to load module "canberra-gtk-module"
libva info: VA-API version 1.7.0
libva info: Trying to open /snap/chromium/1191/usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
[141337:141337:0710/090737.297551:ERROR:vaapi_wrapper.cc(480)] vaInitialize failed: unknown libva error
```
For me, I am on Focal, so I had to manually install the vdpau-va-driver from cosmic from https://launchpad.net/ubuntu/+source/vdpau-video/0.7.4-7, (presumably on i.e. 18.04 I could just have installed it with apt install), which provides the various files in /var/lib/snapd/gl/vdpau, and then I also had to add that package along with libvdpau1 into the chromium snap, at which point it loads the libraries but I then run into very relevant errors:
```
libva info: VA-API version 1.7.0
libva info: Trying to open /snap/chromium/x3/usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
[121136:121136:0710/082840.674481:ERROR:vaapi_wrapper.cc(900)] vaQuerySurfaceAttributes failed, VA error: invalid parameter
[121136:121136:0710/082840.674608:ERROR:vaapi_wrapper.cc(789)] FillProfileInfo_Locked failed for va_profile VAProfileMPEG2Simple and entrypoint 1
[121136:121136:0710/082840.674647:ERROR:vaapi_wrapper.cc(900)] vaQuerySurfaceAttributes failed, VA error: invalid parameter
[121136:121136:0710/082840.674680:ERROR:vaapi_wrapper.cc(789)] FillProfileInfo_Locked failed for va_profile VAProfileMPEG2Main and entrypoint 1
[121136:121136:0710/082840.674709:ERROR:vaapi_wrapper.cc(900)] vaQuerySurfaceAttributes failed, VA error: invalid parameter
[121136:121136:0710/082840.674739:ERROR:vaapi_wrapper.cc(789)] FillProfileInfo_Locked failed for va_profile VAProfileMPEG4Simple and entrypoint 1
[121136:121136:0710/082840.674791:ERROR:vaapi_wrapper.cc(900)] vaQuerySurfaceAttributes failed, VA error: invalid parameter
[121136:121136:0710/082840.674817:ERROR:vaapi_wrapper.cc(789)] FillProfileInfo_Locked failed for va_profile VAProfileMPEG4AdvancedSimple and entrypoint 1
[121136:121136:0710/082840.674844:ERROR:vaapi_wrapper.cc(900)] vaQuerySurfaceAttributes failed, VA error: invalid parameter
[121136:121136:0710/082840.674870:ERROR:vaapi_wrapper.cc(789)] FillProfileInfo_Locked failed for va_profile VAProfileH264Baseline and entrypoint 1
[121136:121136:0710/082840.674896:ERROR:vaapi_wrapper.cc(900)] vaQuerySurfaceAttributes failed, VA error: invalid parameter
[121136:121136:0710/082840.674920:ERROR:vaapi_wrapper.cc(789)] FillProfileInfo_Locked failed for va_profile VAProfileH264Main and entrypoint 1
[121136:121136:0710/082840.674946:ERROR:vaapi_wrapper.cc(900)] vaQuerySurfaceAttributes failed, VA error: invalid parameter
[121136:121136:0710/082840.674971:ERROR:vaapi_wrapper.cc(789)] FillProfileInfo_Locked failed for va_profile VAProfileH264High and entrypoint 1
[121136:121136:0710/082840.674996:ERROR:vaapi_wrapper.cc(900)] vaQuerySurfaceAttributes failed, VA error: invalid parameter
[121136:121136:0710/082840.675020:ERROR:vaapi_wrapper.cc(789)] FillProfileInfo_Locked failed for va_profile VAProfileVC1Simple and entrypoint 1
[121136:121136:0710/082840.675046:ERROR:vaapi_wrapper.cc(900)] vaQuerySurfaceAttributes failed, VA error: invalid parameter
[121136:121136:0710/082840.675073:ERROR:vaapi_wrapper.cc(789)] FillProfileInfo_Locked failed for va_profile VAProfileVC1Main and entrypoint 1
[121136:121136:0710/082840.675097:ERROR:vaapi_wrapper.cc(900)] vaQuerySurfaceAttributes failed, VA error: invalid parameter
[121136:121136:0710/082840.675122:ERROR:vaapi_wrapper.cc(789)] FillProfileInfo_Locked failed for va_profile VAProfileVC1Advanced and entrypoint 1
```
at which point I am stuck trying to get it to work.
FWIW, this is with ubuntu 20.04, snapd 2.45.1, nvidia drivers 440, and X11 with gdm.
After installing the candidate/vaapi channel, I still do not get hardware acceleration for video decoding from my NVIDIA gpu, see:
``` _LEVEL= 2 snap run chromium gtk-module" gtk-module" 1191/usr/ lib/x86_ 64-linux- gnu/dri/ nvidia_ drv_video. so 141337: 0710/090737. 297551: ERROR:vaapi_ wrapper. cc(480) ] vaInitialize failed: unknown libva error
$ LIBVA_MESSAGING
Gtk-Message: 09:07:37.215: Failed to load module "canberra-
Gtk-Message: 09:07:37.216: Failed to load module "canberra-
libva info: VA-API version 1.7.0
libva info: Trying to open /snap/chromium/
libva info: va_openDriver() returns -1
[141337:
```
For me, I am on Focal, so I had to manually install the vdpau-va-driver from cosmic from https:/ /launchpad. net/ubuntu/ +source/ vdpau-video/ 0.7.4-7, (presumably on i.e. 18.04 I could just have installed it with apt install), which provides the various files in /var/lib/ snapd/gl/ vdpau, and then I also had to add that package along with libvdpau1 into the chromium snap, at which point it loads the libraries but I then run into very relevant errors:
``` x3/usr/ lib/x86_ 64-linux- gnu/dri/ nvidia_ drv_video. so 121136: 0710/082840. 674481: ERROR:vaapi_ wrapper. cc(900) ] vaQuerySurfaceA ttributes failed, VA error: invalid parameter 121136: 0710/082840. 674608: ERROR:vaapi_ wrapper. cc(789) ] FillProfileInfo _Locked failed for va_profile VAProfileMPEG2S imple and entrypoint 1 121136: 0710/082840. 674647: ERROR:vaapi_ wrapper. cc(900) ] vaQuerySurfaceA ttributes failed, VA error: invalid parameter 121136: 0710/082840. 674680: ERROR:vaapi_ wrapper. cc(789) ] FillProfileInfo _Locked failed for va_profile VAProfileMPEG2Main and entrypoint 1 121136: 0710/082840. 674709: ERROR:vaapi_ wrapper. cc(900) ] vaQuerySurfaceA ttributes failed, VA error: invalid parameter 121136: 0710/082840. 674739: ERROR:vaapi_ wrapper. cc(789) ] FillProfileInfo _Locked failed for va_profile VAProfileMPEG4S imple and entrypoint 1 121136: 0710/082840. 674791: ERROR:vaapi_ wrapper. cc(900) ] vaQuerySurfaceA ttributes failed, VA error: invalid parameter 121136: 0710/082840. 674817: ERROR:vaapi_ wrapper. cc(789) ] FillProfileInfo _Locked failed for va_profile VAProfileMPEG4A dvancedSimple and entrypoint 1 121136: 0710/082840. 674844: ERROR:vaapi_ wrapper. cc(900) ] vaQuerySurfaceA ttributes failed, VA error: invalid parameter 121136: 0710/082840. 674870: ERROR:vaapi_ wrapper. cc(789) ] FillProfileInfo _Locked failed for va_profile VAProfileH264Ba seline and entrypoint 1 121136: 0710/082840. 674896: ERROR:vaapi_ wrapper. cc(900) ] vaQuerySurfaceA ttributes failed, VA error: invalid parameter 121136: 0710/082840. 674920: ERROR:vaapi_ wrapper. cc(789) ] FillProfileInfo _Locked failed for va_profile VAProfileH264Main and entrypoint 1 121136: 0710/082840. 674946: ERROR:vaapi_ wrapper. cc(900) ] vaQuerySurfaceA ttributes failed, VA error: invalid parameter 121136: 0710/082840. 674971: ERROR:vaapi_ wrapper. cc(789) ] FillProfileInfo _Locked failed for va_profile VAProfileH264High and entrypoint 1 121136: 0710/082840. 674996: ERROR:vaapi_ wrapper. cc(900) ] vaQuerySurfaceA ttributes failed, VA error: invalid parameter 121136: 0710/082840. 675020: ERROR:vaapi_ wrapper. cc(789) ] FillProfileInfo _Locked failed for va_profile VAProfileVC1Simple and entrypoint 1 121136: 0710/082840. 675046: ERROR:vaapi_ wrapper. cc(900) ] vaQuerySurfaceA ttributes failed, VA error: invalid parameter 121136: 0710/082840. 675073: ERROR:vaapi_ wrapper. cc(789) ] FillProfileInfo _Locked failed for va_profile VAProfileVC1Main and entrypoint 1 121136: 0710/082840. 675097: ERROR:vaapi_ wrapper. cc(900) ] vaQuerySurfaceA ttributes failed, VA error: invalid parameter 121136: 0710/082840. 675122: ERROR:vaapi_ wrapper. cc(789) ] FillProfileInfo _Locked failed for va_profile VAProfileVC1Adv anced and entrypoint 1
libva info: VA-API version 1.7.0
libva info: Trying to open /snap/chromium/
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
[121136:
```
at which point I am stuck trying to get it to work.
FWIW, this is with ubuntu 20.04, snapd 2.45.1, nvidia drivers 440, and X11 with gdm.