libva
                                
                                 libva copied to clipboard
                                
                                    libva copied to clipboard
                            
                            
                            
                        An alternative to MOZ_DRM_DEVICE for libva "LIBVA_DRM_DEVICE"
We have LIBVA_DRIVER_NAME, and LIBVA_DRIVERS_PATH to find libva driver libraries. But there is no replacement for MOZ_DRM_DEVICE https://bugzilla.mozilla.org/show_bug.cgi?id=1751710 (LIBVA_DRM_DEVICE=/dev/dri/renderD129 or LIBVA_DRM_DEVICE=/dev/dri/card1) so that we can specify the right default path to drm and not use the automatic search which may fail https://github.com/intel/libva-utils/blob/2.19.0/common/va_display_drm.c#L49-L51 with an undefined error #750.
/dev/dri/renderD128 - NVIDIA /dev/dri/renderD129 - Intel HD Graphics (KBL)
$ env | grep LIBVA_ LIBVA_DRIVER_NAME=iHD $ vainfo DRM_IOCTL_VERSION, unsupported drm device by media driver: nvid libva error: /usr/lib/dri/iHD_drv_video.so init failed
$ env | grep LIBVA_ LIBVA_DRIVER_NAME=iHD $ env LIBVA_DRIVER_NAME=iHD vainfo --display drm --device /dev/dri/renderD128 Trying display: drm DRM_IOCTL_VERSION, unsupported drm device by media driver: nvid DRM_IOCTL_VERSION, unsupported drm device by media driver: nvid libva error: /usr/lib/dri/iHD_drv_video.so init failed vaInitialize failed with error code 18 (invalid parameter),exit
$ env | grep LIBVA_ LIBVA_DRIVER_NAME=iHD $ env LIBVA_DRIVER_NAME=nvidia vainfo --display drm --device /dev/dri/renderD129 Trying display: drm libva error: /usr/lib/dri/nvidia_drv_video.so init failed vaInitialize failed with error code 1 (operation failed),exit
$ env | grep LIBVA_ LIBVA_DRIVER_NAME=iHD $ google-chrome-stable libva error: vaGetDriverNames() failed with unknown libva error DRM_IOCTL_VERSION, unsupported drm device by media driver: nvid DRM_IOCTL_VERSION, unsupported drm device by media driver: nvid libva error: /usr/lib/dri/iHD_drv_video.so init failed
https://github.com/intel/libva/issues/677
Just stumbled upon this after having issues with electron apps trying to use my dedicated NVIDIA gpu to run VAAPI. Specifically, I've been getting one of the errors listed by @denji above:
conor ~ > chromium
DRM_IOCTL_VERSION, unsupported drm device by media driver: nvid
DRM_IOCTL_VERSION, unsupported drm device by media driver: nvid
libva error: /usr/lib/dri/iHD_drv_video.so init failed
As seen from the log, even though my VAAPI driver is set to my iGPU, chromium is trying to run it using the dGPU. obsidian and webcord (and probably all electron apps) do too.
I'm running an Arch distro on an Optimus laptop with Intel CPU and NVIDIA GPU.
I'd really like to see this too. I was hoping to use my Intel iGPU to handle hardware decode tasks since NVIDIA is still largely unsupported for that, but I can't since just about everything defaults to the first render device (the NVIDIA GPU in my case, like OP) with no way to specify another.