This is an awareness ticket about the NVDEC and VDPAU backend VA-API drivers co-existing. I installed NVDEC (nvdec_drv_video.so, nvidia_drv_video.so points to nvdec) and VDPAU (vdpau_drv_video.so). Using NVIDIA graphics, Firefox and the Mpv media player benefit from the NVDEC backend. Google Chrome and derivatives benefit from the VDPAU backend. The NVDEC driver works in both Xorg and Wayland. However, the VDPAU driver works in Xorg, but not Wayland. $ cd /usr/lib64/dri $ ls -l nv* vdpau* -rwxr-xr-x. 1 root root 87096 Oct 11 04:17 nvdec_drv_video.so lrwxrwxrwx. 1 root root 18 Oct 11 04:17 nvidia_drv_video.so -> nvdec_drv_video.so -rwxr-xr-x. 1 root root 120032 Oct 11 04:17 vdpau_drv_video.so I tested the following steps using Fedora 37 Beta. # Any updates? sudo dnf -y update reboot At this point, the screen may flash. I submitted a ticket. So, try to open a terminal window and install the NVIDIA display driver. All is fine afterwards. You may see flashing windows using Nouveau driver with NVIDIA RTX 3000 series. https://bugzilla.redhat.com/show_bug.cgi?id=2133658 # Install the display driver. sudo dnf -y install xorg-x11-drv-nvidia nvidia-modprobe kmod-nvidia reboot # HiDPI? Fonts > Scaling Factor (display DPI / 96 rounded to 2 decimal places) sudo dnf -y gnome-tweaks # Install dependencies for enabling hardware acceleration # https://github.com/marioroy/nvidia-driver-on-clear-linux/tree/main/HWAccel sudo dnf -y install gstreamer1-plugins-bad-free-devel nv-codec-headers sudo dnf -y install libdrm-devel libva-utils libva-devel libvdpau-devel sudo dnf -y install autoconf automake libtool meson # Run the build-all and clean-all scripts from the HWAccel folder. They work in Fedora 37. # Install Brave, Google-Chrome, Chromium-Freeworld, or Vivaldi as described in the README file. Install the Not, AV1 extension if your graphics lacks AV1 support. For Firefox, copy the desktop file and run the sed command, as described in the README. Enable via about:config "media.ffmpeg.vaapi.enabled". Disable "media.av1.enabled" if your graphics lacks AV1 support. Running NVIDIA 470 drivers? Enable "widget.dmabuf.force-enabled". # Re-launch browser(s) and try playing a YouTube video. Launch NVIDIA Settings and check the Video Engine Utilization. Select 1080p or higher if low percentage. # Install dependencies for https://github.com/marioroy/youtube-play. sudo dnf -y install ffmpeg-free mpv python3-devel python3-pip python3-wheel # Install YouTube Downloader (run as a user). pip3 install --user --upgrade yt-dlp # Run youtube-play to test various codecs as described in the usage. The result is that hardware acceleration works in Firefox, Brave, Google Chrome, Chromium-Freeworld, and Vivaldi. Also, the Mpv media player. It's quite nice. Needless to say, I'm switching over to Fedora 37.
Well, I've tried to report the issue to nvidia_vaapi_driver and libva projects at some point, feel free to weight on theses reports. See also : https://forums.developer.nvidia.com/t/nvidia-va-api-implementation-v0-0-1-release https://github.com/intel/libva/pull/554 As such, I'm not whiling to take this bug here, please forward the issue upstream. Note: nvidia-vaapi-driver is available in rpmfusion-nonfree...
Also to note: It would be wiser to retire libva-vdpau-driver bridge instead But removing the conflicting symlink might be what you wanted ? maybe...
> It would be wiser to retire libva-vdpau-driver bridge instead. The vdpau driver is needed for Google Chrome and derivatives, else we will lose hardware acceleration. > Note: nvidia-vaapi-driver is available in rpmfusion-nonfree... Thank you. This ticket is an awareness that both backends may co-exist. Basically, I renamed the file to nvdec_drv_video.so in the nvdec spec file. As the Mpv player works better with nvdec, the nvidia_drv_video.so file is a symbolic link to nvdec_drv_video.so. The vdpau_drv_video.so file is built using the https://github.com/xuanruiqi/vdpau-va-driver-vp9 repository. The nvidia symbolic link is not installed in the vdpau spec file. Thus, no conflicts.
https://forums.developer.nvidia.com/t/nvidia-va-api-implementation-v0-0-1-release The author mentions, "there’s nothing that prevents the library being renamed by the packagers and pointing the existing nvidia_drv_video.so symlink to it." That works, which is the path I have taken. Although the repo was made for Clear Linux, the build-all and clean-all scripts, in the HWAccel folder, work in Fedora 37. https://github.com/marioroy/nvidia-driver-on-clear-linux/tree/main/HWAccel Likewise, in Ubuntu. Both nvdec and vdpau backend drivers co-exist. https://github.com/marioroy/nvidia-acceleration-on-ubuntu/tree/main/scripts
(In reply to marioroy from comment #3) > > It would be wiser to retire libva-vdpau-driver bridge instead. > > The vdpau driver is needed for Google Chrome and derivatives, else we will > lose hardware acceleration. hopefully fixed when chrome_driver branch got merged in nvidia-vaapi-driver upstream. > This ticket is an awareness that both backends may co-exist. Basically, I > renamed the file to nvdec_drv_video.so in the nvdec spec file. As the Mpv > player works better with nvdec, the nvidia_drv_video.so file is a symbolic > link to nvdec_drv_video.so. You know that mpv has native nvdec support right ? > The vdpau_drv_video.so file is built using the > https://github.com/xuanruiqi/vdpau-va-driver-vp9 repository. The nvidia I could switch to this implementation in libva-vdpau-driver fedora package, but then I still hope nvidia-vaapi-driver is the way forward.
> The author mentions, "there’s nothing that prevents the library being renamed by the packagers and pointing the existing nvidia_drv_video.so symlink to it." RPM packages cannot cope with different symlink in different packages, so this ends an end-user issue. Or there is a need to install a better name for the nvdec (that may latter to nvenc) vaapi backend. Then patch libva with the appropriate mapping...
> You know that mpv has native nvdec support right ? Yes. The youtube-play repo was made to test the various hardware implementatations. For example, I run youtube-play-vaapi to test the NVDEC backend driver. Today, I added code to set LIBVA_DRIVER_NAME to nvdec, if available. > RPM packages cannot cope with different symlink in different packages, so this ends an end-user issue. Understood. The author of the module did not want to rename the file to nvdec_drv_video.so, leaving that to package maintainers to decide as to which nvdec or vdpau package provides the symbolic link. That's why I created the HWAccel folder and updates for Fedora 37. Both packages co-exist on my system. The nvdec package provides the symbolic link. The vdpau backend is still needed for Google Chrome and derivatives. It's true, "... so this ends an end-user issue". It requires setting LIBVA_DRIVER_NAME accordingly. Firefox uses nvdec whereas Chrome uses vdpau.
> I could switch to this implementation in libva-vdpau-driver fedora package, https://github.com/xuanruiqi/vdpau-va-driver-vp9 The xuanruiqi vdpau repo works better in Chrome e.g. the video engine is utilized. > but then I still hope nvidia-vaapi-driver is the way forward. https://github.com/elFarto/nvidia-vaapi-driver/tree/chrome-support There is a branch for Chrome support.
> It's true, "... so this ends an end-user issue". It requires setting > LIBVA_DRIVER_NAME accordingly. Firefox uses nvdec whereas Chrome uses vdpau. None of which are valid vaapi mapping names. so If I remove the symlink from the packages, none of theses vaapi backend will work anymore by default... That's the very much reason why I mentioned weighting on libva/pull/554
Thanks. In the meantime, I chose the path that both packages may co-exist. The nvidia symbolic link exists and points to nvdec by default. Currently: Two packages exist, but only one can be installed due to naming conflict. Co-exist path: Both packages co-existing. The nvdec package provides the symbolic link, whereas the vdpau package does not. -rwxr-xr-x. 1 root root 87096 Oct 11 04:17 nvdec_drv_video.so lrwxrwxrwx. 1 root root 18 Oct 11 04:17 nvidia_drv_video.so -> nvdec_drv_video.so -rwxr-xr-x. 1 root root 120032 Oct 11 04:17 vdpau_drv_video.so Minimally, one does not need to set LIBVA_DRIVER_NAME unless running Chrome. The vdpau backend is what works in Chrome at this time. Using NVIDIA graphics in Fedora? This is an awareness ticket on how one may enjoy hardware acceleration in Firefox and Chrome.
> Both packages co-existing. The nvdec package provides the symbolic link, whereas the vdpau package does not. I got what you mean, I can implement that for f37+ (to not break existing users).
> to not break existing users If you want, the vdpau package may require the nvdec package as a dependency. That will ensure users have also, nvidia_drv_video.so from the nvdec package.
Created attachment 1918892 [details] Google Chrome 4K decoding Added Google Chrome image decoding 4K media via VDPAU VA-API driver. I installed the Not, AV1 extension to ensure hardware acceleration in Chrome.
Created attachment 1918893 [details] Firefox 4K decoding Added Firefox image decoding 4K media via NVDEC VA-API driver. My 3070 RTX supports AV1 as well as the NVDEC backend driver. So, not necessary to install the Not, AV1 extension or disable AV1 via an about:config setting.