Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Hope it helps. Martin
Le ven. 12 nov. 2021 à 09:37, Martin Stransky stransky@redhat.com a écrit :
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Thanks for the documentation Martin.
Few notes: - Only ffmpeg, libva-intel-driver (and intel-media-driver for newer hw) are provided via rpmfusion (in nonfree section for the latter), the other components are in fedora - We might have a special issue for f35 as the introduction of crocus DRI driver broke the X11 DRI/VAAPI mapping. (Fix pending: https://bodhi.fedoraproject.org/updates/FEDORA-2021-83cbfc7e32 - rhbz#2017059)
On 11/12/21 11:04, Nicolas Chauvet wrote:
Le ven. 12 nov. 2021 à 09:37, Martin Stransky stransky@redhat.com a écrit :
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Thanks for the documentation Martin.
Few notes:
- Only ffmpeg, libva-intel-driver (and intel-media-driver for newer
hw) are provided via rpmfusion (in nonfree section for the latter), the other components are in fedora
- We might have a special issue for f35 as the introduction of crocus
DRI driver broke the X11 DRI/VAAPI mapping. (Fix pending: https://bodhi.fedoraproject.org/updates/FEDORA-2021-83cbfc7e32
- rhbz#2017059)
Thanks, feel free to update the page.
Martin
* Martin Stransky:
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Why is libva-intel-driver not part of Fedora?
Thanks, Florian
On Fri, Nov 12, 2021, 11:08 Florian Weimer fweimer@redhat.com wrote:
Why is libva-intel-driver not part of Fedora?
Thanks, Florian
There are licensing / patent issues with the Intel driver. I am slowly progressing with packaging the latest intel-media-driver (not the older libva-intel-driver, and freed from patented stuff) into Fedora, but it'll take some time and some upstream help / assistance.
On Fri, 12 Nov 2021, Martin Stransky wrote:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Along these lines, I am experiencing a pretty big regression in video performance with recent Firefox versions on Fedora. It probably started with FF 93, but got a little better with FF 94. It is really noticeable when using Google Meet. I'm using Wayland on AMD GPU hardware. Is this at all related to this HW acceleration stuff?
Thanks, Scott
On 11/12/21 17:07, Scott Talbert wrote:
On Fri, 12 Nov 2021, Martin Stransky wrote:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Along these lines, I am experiencing a pretty big regression in video performance with recent Firefox versions on Fedora. It probably started with FF 93, but got a little better with FF 94. It is really noticeable when using Google Meet. I'm using Wayland on AMD GPU hardware. Is this at all related to this HW acceleration stuff?
Please file a bug at https://bugzilla.redhat.com/ for further investigation and cc me there. I can name ten reasons why you see it.
On Mon, Nov 15, 2021 at 2:20 PM Martin Stransky stransky@redhat.com wrote:
On 11/12/21 17:07, Scott Talbert wrote:
On Fri, 12 Nov 2021, Martin Stransky wrote:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Along these lines, I am experiencing a pretty big regression in video performance with recent Firefox versions on Fedora. It probably started with FF 93, but got a little better with FF 94. It is really noticeable when using Google Meet. I'm using Wayland on AMD GPU hardware. Is this at all related to this HW acceleration stuff?
Please file a bug at https://bugzilla.redhat.com/ for further investigation and cc me there. I can name ten reasons why you see it.
It sounds quite a lot like this bug filed by mattdm: https://bugzilla.redhat.com/show_bug.cgi?id=2016162
On 11/15/21 15:25, Peter Robinson wrote:
On Mon, Nov 15, 2021 at 2:20 PM Martin Stransky stransky@redhat.com wrote:
On 11/12/21 17:07, Scott Talbert wrote:
On Fri, 12 Nov 2021, Martin Stransky wrote:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Along these lines, I am experiencing a pretty big regression in video performance with recent Firefox versions on Fedora. It probably started with FF 93, but got a little better with FF 94. It is really noticeable when using Google Meet. I'm using Wayland on AMD GPU hardware. Is this at all related to this HW acceleration stuff?
Please file a bug at https://bugzilla.redhat.com/ for further investigation and cc me there. I can name ten reasons why you see it.
It sounds quite a lot like this bug filed by mattdm: https://bugzilla.redhat.com/show_bug.cgi?id=2016162
Please file your own, I can dupe that later. Thanks.
On Fri, 12 Nov 2021 09:37:26 +0100 Martin Stransky stransky@redhat.com wrote:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Hope it helps.
it does help :-) Briefly tested on my F-34/ppc64le with AMD GPU and it seems to make a difference.
Dan
On Fri, Nov 12, 2021 at 9:37 AM Martin Stransky stransky@redhat.com wrote:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Hope it helps. Martin
I appreciate the effort to document ways to improve things. However:
Video decoding on NVIDIA Please buy some real Linux hardware.
This doesn't really help at all. Is it supposed to be funny, or is it just cynical resignation?
I mean, even if I *could* throw a couple hundred bucks out the window to replace a perfectly working NVidia hardware, most places don't even seem to have AMD graphics cards in stock right now. Does that just mean "tough luck" for users like me?
Fabio
On Monday, 15 November 2021 at 13:34, Fabio Valentini wrote:
On Fri, Nov 12, 2021 at 9:37 AM Martin Stransky stransky@redhat.com wrote:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Hope it helps. Martin
I appreciate the effort to document ways to improve things. However:
Video decoding on NVIDIA Please buy some real Linux hardware.
This doesn't really help at all. Is it supposed to be funny, or is it just cynical resignation?
I mean, even if I *could* throw a couple hundred bucks out the window to replace a perfectly working NVidia hardware, most places don't even seem to have AMD graphics cards in stock right now. Does that just mean "tough luck" for users like me?
Well, nVidia refuses to support VA-API like Intel and AMD do and the VA-API-to-VDPAU won't help because dmabuf support is still required. So... tough luck:
https://bugzilla.mozilla.org/show_bug.cgi?id=1669189 https://bugzilla.mozilla.org/show_bug.cgi?id=1210729
... and probably others.
Regards, Dominik
On Monday, November 15, 2021 8:23:59 AM EST Dominik 'Rathann' Mierzejewski wrote:
Well, nVidia refuses to support VA-API like Intel and AMD do and the VA-API-to-VDPAU won't help because dmabuf support is still required. So... tough luck:
I can confirm that nvidia acceleration works fine on Fedora:
# vainfo libva info: VA-API version 1.13.0 libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so libva info: Found init function __vaDriverInit_1_12 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.13 (libva 2.13.0) vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
<snip>
# vdpauinfo display: :1 screen: 0 API version: 1 Information string: NVIDIA VDPAU Driver Shared Library 495.44 Fri Oct 22 06:03:50 UTC 2021
<snip>
I use the negativio repository only because I need the whole cuda stack including cudnn.
Cheers, -Steve
On 11/15/21 16:06, Steve Grubb wrote:
On Monday, November 15, 2021 8:23:59 AM EST Dominik 'Rathann' Mierzejewski wrote:
Well, nVidia refuses to support VA-API like Intel and AMD do and the VA-API-to-VDPAU won't help because dmabuf support is still required. So... tough luck:
I can confirm that nvidia acceleration works fine on Fedora:
# vainfo libva info: VA-API version 1.13.0 libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so libva info: Found init function __vaDriverInit_1_12 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.13 (libva 2.13.0) vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
<snip>
# vdpauinfo display: :1 screen: 0 API version: 1 Information string: NVIDIA VDPAU Driver Shared Library 495.44 Fri Oct 22 06:03:50 UTC 2021
<snip>
I use the negativio repository only because I need the whole cuda stack including cudnn.
Please update the https://fedoraproject.org/wiki/Firefox_Hardware_acceleration#Video_decoding_... page. I don't have supported NVIDIA hardware so I can't test that.
Thanks.
Le lun. 15 nov. 2021 à 16:06, Steve Grubb sgrubb@redhat.com a écrit : ...
I use the negativio repository only because I need the whole cuda stack including cudnn.
Totally undeeded, you can get rpmfusion+nvidia-cuda repository directly and avoid incompatible repository. https://rpmfusion.org/Howto/CUDA
Hello,
On Monday, November 15, 2021 11:02:08 AM EST Nicolas Chauvet wrote:
Le lun. 15 nov. 2021 à 16:06, Steve Grubb sgrubb@redhat.com a écrit : ...
I use the negativio repository only because I need the whole cuda stack including cudnn.
Totally undeeded, you can get rpmfusion+nvidia-cuda repository directly and avoid incompatible repository. https://rpmfusion.org/Howto/CUDA
I used to do that. But the problem is that one day out of the blue, you do a system update, get new video drivers, and now it's incompatible with the cuda layer. Then you find out that nvidia doesn't package things right. They include the version number in the name. This means you have to remove everything, download new packages, and reinstall.
It's much simpler to use a repository that keeps everything in sync so that your projects don't unexpectedly refuse to run.
-Steve
On 11/15/21 13:34, Fabio Valentini wrote:
On Fri, Nov 12, 2021 at 9:37 AM Martin Stransky stransky@redhat.com wrote:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Hope it helps. Martin
I appreciate the effort to document ways to improve things. However:
Video decoding on NVIDIA Please buy some real Linux hardware.
This doesn't really help at all. Is it supposed to be funny, or is it just cynical resignation?
I mean, even if I *could* throw a couple hundred bucks out the window to replace a perfectly working NVidia hardware, most places don't even seem to have AMD graphics cards in stock right now. Does that just mean "tough luck" for users like me?
Please read it as "I'm too stupid for such task". I don't know how to setup/run VA-API on NVIDIA.
On 11/15/21 04:34, Fabio Valentini wrote:
On Fri, Nov 12, 2021 at 9:37 AM Martin Stransky stransky@redhat.com wrote:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Hope it helps. Martin
I appreciate the effort to document ways to improve things. However:
Video decoding on NVIDIA Please buy some real Linux hardware.
This doesn't really help at all. Is it supposed to be funny, or is it just cynical resignation?
After trying to configure HW acceleration on 9xx series GPU, I'll just take that as a serious response. Consider following points: * VDPAU is not compatible with Wayland, our main desktop scenario. * Video decoding in Firefox on X11 is limited to X11/EGL, which does not work with the Nvidia proprietary driver (but at least there's a hope for that scenario). * There's no NVDEC vaapi backend, and I see opinions that it would be hard to fit NVDEC into vaapi model. * Nouveau support ends at VP5 (7xx series).
The wording might be different, but _at the moment_ any recent Nvidia hardware cannot be used for HW video acceleration in Firefox.
Le lun. 15 nov. 2021 à 17:25, Aleksei Bavshin alebastr@fedoraproject.org a écrit :
...
After trying to configure HW acceleration on 9xx series GPU, I'll just take that as a serious response. Consider following points:
- VDPAU is not compatible with Wayland, our main desktop scenario.
True. Still I have raised the concern at https://gitlab.freedesktop.org/vdpau/libvdpau/-/issues/2
- Video decoding in Firefox on X11 is limited to X11/EGL, which does
not work with the Nvidia proprietary driver (but at least there's a hope for that scenario).
- There's no NVDEC vaapi backend, and I see opinions that it would be
hard to fit NVDEC into vaapi model.
Well, technically it's NVDEC support for aarch64 tegra SOC, but it's different than desktop NVDEC (using nouveau) https://github.com/cyndis/vaapi-tegra-driver See also https://bugzilla.redhat.com/show_bug.cgi?id=2023429
Anyway, a more relevant goal is Vulkan Video API.
Video decoding on NVIDIA Please buy some real Linux hardware.
This doesn't really help at all. Is it supposed to be funny, or is it just cynical resignation?
After trying to configure HW acceleration on 9xx series GPU, I'll just take that as a serious response. Consider following points: * VDPAU is not compatible with Wayland, our main desktop scenario. * Video decoding in Firefox on X11 is limited to X11/EGL, which does not work with the Nvidia proprietary driver (but at least there's a hope for that scenario). * There's no NVDEC vaapi backend, and I see opinions that it would be hard to fit NVDEC into vaapi model. * Nouveau support ends at VP5 (7xx series).
The wording might be different, but _at the moment_ any recent Nvidia hardware cannot be used for HW video acceleration in Firefox.
currently,for proprietary nvidia hw accel
useful docs
https://wiki.archlinux.org/title/Hardware_video_acceleration
e.g.
on
lsb_release -rd Description: Fedora release 35 (Thirty Five) Release: 35
with nvidia hw,
hwinfo --gfxcard | egrep " Model| Device| Driver:" Model: "nVidia GP108 [GeForce GT 1030]" Device: pci 0x1d01 "GP108 [GeForce GT 1030]" Driver: "nvidia"
latest upstream driver,
nvidia-settings -q NvidiaDriverVersion
Attribute 'NvidiaDriverVersion' (test.loc:0.0): 495.44 Attribute 'NvidiaDriverVersion' (test.loc:0[gpu:0]): 495.44
lsmod | grep nv nvidia_uvm 1167360 0 nvidia_drm 73728 8 nvidia_modeset 1150976 20 nvidia_drm nvidia 36950016 1354 nvidia_uvm,nvidia_modeset drm_kms_helper 303104 1 nvidia_drm drm 630784 14 drm_kms_helper,nvidia,drm_ttm_helper,nvidia_drm,ttm
currently, this set of relevant pkgs
rpm -qa | egrep "libva|nvidia|vdpau|dkms|kernel-devel|glx|^egl|glvnd|libvpx|vulkan" dkms-2.8.6-1.fc35.noarch egl-utils-8.4.0-12.20210504git0f9e7d9.fc35.x86_64 glx-utils-8.4.0-12.20210504git0f9e7d9.fc35.x86_64 kernel-devel-5.14.17-301.fc35.x86_64 libglvnd-1.3.4-2.fc35.x86_64 libglvnd-core-devel-1.3.4-2.fc35.x86_64 libglvnd-devel-1.3.4-2.fc35.x86_64 libglvnd-egl-1.3.4-2.fc35.x86_64 libglvnd-gles-1.3.4-2.fc35.x86_64 libglvnd-glx-1.3.4-2.fc35.x86_64 libglvnd-opengl-1.3.4-2.fc35.x86_64 libva-2.13.0-2.fc35.x86_64 libva-utils-2.13.0-1.fc35.x86_64 libva-vdpau-driver-0.7.4-110.fc35.x86_64 libvdpau-1.4-6.fc35.x86_64 libvdpau-devel-1.4-6.fc35.x86_64 libvdpau-trace-1.4-6.fc35.x86_64 libvdpau-va-gl-0.4.2-20.fc35.x86_64 libvpx-1.10.0-2.fc35.x86_64 mesa-vdpau-drivers-21.2.5-1.fc35.x86_64 mesa-vulkan-drivers-21.2.5-1.fc35.x86_64 vdpauinfo-1.4-1.fc35.x86_64 vulkan-headers-1.2.189.0-1.fc35.noarch vulkan-loader-1.2.189.0-1.fc35.x86_64 vulkan-loader-devel-1.2.189.0-1.fc35.x86_64 vulkan-tools-1.2.189.0-1.fc35.x86_64
checking for X11
grep -iE 'vdpau | dri driver' /var/log/Xorg.0.log [ 37.637] (II) NVIDIA(0): [DRI2] VDPAU driver: nvidia
verifying
ldd `which mpv` | egrep -i "egl|nvidia|vdpau" libEGL.so.1 => /lib64/libEGL.so.1 (0x00007fadfdbb4000) libwayland-egl.so.1 => /lib64/libwayland-egl.so.1 (0x00007fadfbdbe000) libvdpau.so.1 => /lib64/libvdpau.so.1 (0x00007fadfacea000)
VDPAU_DRIVER=nvidia mpv --hwdec=auto TEST.mp4 (+) Video --vid=1 (*) (h264 1920x1080 30.015fps) (+) Audio --aid=1 --alang=eng (*) (aac 2ch 48000Hz)
Using hardware decoding (nvdec).
AO: [pulse] 48000Hz stereo 2ch float VO: [gpu] 1920x1080 cuda[nv12] AV: 00:00:02 / 00:00:39 (7%) A-V: 0.026 ct: 0.256
for FF
rpm -qa firefox firefox-94.0-1.fc35.x86_64
read
https://www.phoronix.com/scan.php?page=news_item&px=Firefox-94-EGL-Linux... https://mozillagfx.wordpress.com/2021/10/30/switching-the-linux-graphics-sta...
note
"In X.org, since 94, Firefox will run in EGL mode by default which is sufficient [19]."
user.js settings currently include,
user_pref("media.ffmpeg.enabled", true); user_pref("media.ffmpeg.vaapi.enabled", true); user_pref("media.ffmpeg.vaapi-drm-display.enabled", true); user_pref("media.ffvpx.enabled", false); user_pref("media.navigator.mediadatadecoder_vpx_enabled", true); user_pref("media.rdd-ffvpx.enabled", false); user_pref("media.rdd-vpx.enabled", false);
check
grep -iE 'vdpau | dri driver' /var/log/Xorg.0.log [ 216.777] (II) NVIDIA(0): [DRI2] VDPAU driver: nvidia ^^^^^^
hwinfo --gfxcard | grep "SysFS ID" SysFS ID: /devices/pci0000:00/0000:00:03.1/0000:09:00.0
ls -d /sys/devices/pci0000:00/0000:00:03.1/0000:09:00.0/drm/render* /sys/devices/pci0000:00/0000:00:03.1/0000:09:00.0/drm/renderD128/
ls -al /usr/lib64/dri/nvidia_drv_video* lrwxrwxrwx 1 root root 18 Jul 22 12:18 /usr/lib64/dri/nvidia_drv_video.so -> vdpau_drv_video.so* ^^^^^^
launch @ shell
VDPAU_DRIVER=nvidia MOZ_LOG="Dmabuf:5, PlatformDecoderModule:5" firefox
nav to
https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4
@ shell
... [Child 19933: Main Thread]: D/Dmabuf nsDMABufDevice::IsDMABufVAAPIEnabled: EGL 1 DMABufEnabled 1 media_ffmpeg_vaapi_enabled 1 CanUseHardwareVideoDecoding 1 !XRE_IsRDDProcess 1 ... [RDD 20039: Main Thread]: D/PlatformDecoderModule PDMInitializer, Init PDMs in RDD process [RDD 20039: Main Thread]: D/Dmabuf nsDMABufDevice::Configure() [RDD 20039: Main Thread]: D/Dmabuf Loading DMABuf system library libgbm.so.1 ... ... [RDD 20039: Main Thread]: D/Dmabuf DMABuf is enabled, using drm node /dev/dri/renderD128 [RDD 20039: Main Thread]: D/Dmabuf nsDMABufDevice::IsDMABufVAAPIEnabled: EGL 1 DMABufEnabled 1 media_ffmpeg_vaapi_enabled 1 CanUseHardwareVideoDecoding 1 !XRE_IsRDDProcess 0 [RDD 20039: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by platform ... [Child 19933: MediaPDecoder #2]: D/Dmabuf nsDMABufDevice::IsDMABufVAAPIEnabled: EGL 1 DMABufEnabled 1 media_ffmpeg_vaapi_enabled 1 CanUseHardwareVideoDecoding 1 !XRE_IsRDDProcess 1 [Child 19933: MediaPDecoder #2]: D/Dmabuf nsDMABufDevice::IsDMABufVideoEnabled: EGL 1 DMABufEnabled 1 !media_ffmpeg_dmabuf_textures_disabled 1 !XRE_IsRDDProcess() 1 [Child 19933: MediaPDecoder #2]: D/PlatformDecoderModule Initialising VA-API FFmpeg decoder libva info: VA-API version 1.13.0 [Child 19933: MediaPDecoder #2]: D/PlatformDecoderModule Initialising FFmpeg decoder. [Child 19933: MediaPDecoder #2]: D/PlatformDecoderModule FFmpeg init successful. [Child 19933: MediaPDecoder #2]: D/PlatformDecoderModule Choosing FFmpeg pixel format for video decoding. [Child 19933: MediaPDecoder #2]: D/PlatformDecoderModule Requesting pixel format YUV420P. [vp9 @ 0x7f8a48d85800] Format yuv420p chosen by get_format(). [Child 19933: MediaPDecoder #1]: D/PlatformDecoderModule AudioTrimmer[7f8a37ab3e80] ::PrepareTrimmers: sample[0,21000] no trimming information [RDD 20039: MediaPDecoder #1]: D/PlatformDecoderModule OpusDataDecoder[7fb627975080] ::Decode: Opus decoder skipping 312 of 960 frames [Child 19933: MediaPDecoder #3]: D/PlatformDecoderModule AudioTrimmer[7f8a37ab3e80] ::HandleDecodedResult: sample[0,21000] (decoded[0,13500] no trimming needed [Child 19933: MediaPDecoder #2]: D/PlatformDecoderModule DMABuf Got one frame output with pts=0dts=0 duration=33000 opaque=-9223372036854775808 ...
ymmv
On 11/15/21 12:03 PM, PGNet Dev wrote:
launch @ shell
VDPAU_DRIVER=nvidia MOZ_LOG="Dmabuf:5, PlatformDecoderModule:5" firefox
I think you mean:
LIBVA_DRIVER_NAME=nvidia firefox
I gave this a shot today, but running a video crashes the tab. Yes, we are almost there, but the VA-API / VDPAU driver has not seen that much love.
On 11/16/21 22:48, Michael Cronenworth wrote:
On 11/15/21 12:03 PM, PGNet Dev wrote:
launch @ shell
VDPAU_DRIVER=nvidia MOZ_LOG="Dmabuf:5, PlatformDecoderModule:5" firefox
I think you mean:
LIBVA_DRIVER_NAME=nvidia firefox
nope.
https://en.wikipedia.org/wiki/Video_Acceleration_API "As of 2019, VA-API is natively supported by libva-vdpau-driver for cards supported by VDPAU"
libva-vdpau-driver is the translation layer that provides a VDPAU-based backend for VA-API.
@ https://wiki.archlinux.org/title/Hardware_video_acceleration#Configuring_VDP...
" Configuring VDPAU You can override the driver for VDPAU by using the VDPAU_DRIVER environment variable. The correct driver name depends on your setup: ... For NVIDIA's proprietary version set it to nvidia. Note: You can find the installed drivers in /usr/lib/vdpau/. They are used as /usr/lib/vdpau/libvdpau_${VDPAU_DRIVER}.so "
ls -al /usr/lib64/vdpau//libvdpau*nvidia* lrwxrwxrwx 1 root root 25 Nov 15 10:04 /usr/lib64/vdpau//libvdpau_nvidia.so.1 -> libvdpau_nvidia.so.495.44* -rwxr-xr-x 1 root root 620K Nov 15 10:04 /usr/lib64/vdpau//libvdpau_nvidia.so.495.44*
cref:
https://wiki.archlinux.org/title/Hardware_video_acceleration#VDPAU_drivers https://wiki.archlinux.org/title/Hardware_video_acceleration#NVIDIA_driver_o... https://wiki.archlinux.org/title/Hardware_video_acceleration#Application_sup...
Am 17.11.21 um 15:26 schrieb PGNet Dev:
On 11/16/21 22:48, Michael Cronenworth wrote:
On 11/15/21 12:03 PM, PGNet Dev wrote:
launch @ shell
VDPAU_DRIVER=nvidia MOZ_LOG="Dmabuf:5, PlatformDecoderModule:5" firefox
I think you mean:
LIBVA_DRIVER_NAME=nvidia firefox
nope.
https://en.wikipedia.org/wiki/Video_Acceleration_API "As of 2019, VA-API is natively supported by libva-vdpau-driver for cards supported by VDPAU"
libva-vdpau-driver is the translation layer that provides a VDPAU-based backend for VA-API.
@ https://wiki.archlinux.org/title/Hardware_video_acceleration#Configuring_VDP...
" Configuring VDPAU You can override the driver for VDPAU by using the VDPAU_DRIVER environment variable. The correct driver name depends on your setup: ... For NVIDIA's proprietary version set it to nvidia.
Note: You can find the installed drivers in /usr/lib/vdpau/. They are used as /usr/lib/vdpau/libvdpau_${VDPAU_DRIVER}.so "
ls -al /usr/lib64/vdpau//libvdpau*nvidia* lrwxrwxrwx 1 root root 25 Nov 15 10:04 /usr/lib64/vdpau//libvdpau_nvidia.so.1 -> libvdpau_nvidia.so.495.44* -rwxr-xr-x 1 root root 620K Nov 15 10:04 /usr/lib64/vdpau//libvdpau_nvidia.so.495.44*
cref:
https://wiki.archlinux.org/title/Hardware_video_acceleration#VDPAU_drivers https://wiki.archlinux.org/title/Hardware_video_acceleration#NVIDIA_driver_o... https://wiki.archlinux.org/title/Hardware_video_acceleration#Application_sup...
Have you actually been able to get this working with Firefox? I tried a while ago and failed. IIRC the predominant opinion online was that libva-vdpau-driver, which was not updated in almost a decade, was good for passing vainfo but not for much else.
Best regards. Julian
On 11/17/21 8:26 AM, PGNet Dev wrote:
On 11/16/21 22:48, Michael Cronenworth wrote:
On 11/15/21 12:03 PM, PGNet Dev wrote:
launch @ shell
VDPAU_DRIVER=nvidia MOZ_LOG="Dmabuf:5, PlatformDecoderModule:5" firefox
I think you mean:
LIBVA_DRIVER_NAME=nvidia firefox
nope.
Take a closer look at all of those links you threw at me. :)
VDPAU is not VA-API. Setting VDPAU_DRIVER means nothing to Firefox because it is not using VDPAU.
VDPAU is not VA-API
that's correct
Setting VDPAU_DRIVER means nothing to Firefox because it is not using VDPAU.
https://fedoraproject.org/wiki/Changes/VA-API_1.0.0#Detailed_Description https://ffmpeg.org/doxygen/0.8/group__VDPAU__Decoding.html
"libva-vdpau-driver which allows to use the VA-API enabled players with VDPAU backend (such as NVIDIA binary driver)."
https://trac.ffmpeg.org/wiki/HWAccelIntro#PlatformAPIAvailability
VDPAU / Linux / NVIDIA -> 'Fully usable'
ffmpeg -hwaccels ... Hardware acceleration methods:
vdpau
cuda vaapi qsv drm opencl vulkan
find/dl a 'busy' 4K+ h264 vid
e.g. @
https://jell.yfish.us/media/jellyfish-250-mbps-4k-uhd-h264.mkv
T="jellyfish-250-mbps-4k-uhd-h264.mkv" F="jellyfish-250-mbps-4k-uhd-h264.mp4" ffmpeg -i ${T} -codec copy ${F}
ls -al ${F} ${T} -rw-r--r-- 1 test test 896M Dec 21 2016 jellyfish-250-mbps-4k-uhd-h264.mkv -rw-r--r-- 1 test test 896M Nov 17 14:37 jellyfish-250-mbps-4k-uhd-h264.mp4
exec un-accel'd FFmpeg decoder
rm -f test.ts && ffmpeg -i ${F} test.ts sar 1 100 Linux 5.14.17-301.fc35.x86_64 (test.loc) 11/17/2021 _x86_64_ (16 CPU)
02:23:27 PM CPU %user %nice %system %iowait %steal %idle 02:23:28 PM all 0.38 0.00 0.50 1.95 0.00 97.17 02:23:29 PM all 19.29 0.00 1.44 0.00 0.00 79.27 02:23:30 PM all 88.85 0.13 2.01 0.00 0.00 9.02 02:23:31 PM all 88.08 0.00 1.63 0.00 0.00 10.29 02:23:32 PM all 87.38 0.00 1.87 0.00 0.00 10.74 02:23:33 PM all 89.01 0.00 1.76 0.06 0.00 9.17 02:23:34 PM all 87.81 0.06 1.95 0.00 0.00 10.18 02:23:35 PM all 87.95 0.06 1.62 0.00 0.00 10.37 02:23:36 PM all 89.77 0.00 1.95 0.00 0.00 8.29 02:23:37 PM all 89.36 0.00 2.00 0.00 0.00 8.64 02:23:38 PM all 55.63 0.13 1.32 0.19 0.00 42.74 02:23:39 PM all 0.44 0.00 0.56 0.00 0.00 99.00 02:23:40 PM all 0.62 0.00 0.56 0.06 0.00 98.75 ...
exec vaapi<-vdpau accel'd VA-API FFmpeg decoder
rm -f test.ts && ffmpeg -hwaccel vdpau -i ${F} test.ts sar 1 100 Linux 5.14.17-301.fc35.x86_64 (test.loc) 11/17/2021 _x86_64_ (16 CPU)
02:29:09 PM CPU %user %nice %system %iowait %steal %idle 02:29:10 PM all 0.63 0.06 0.31 0.00 0.00 99.00 02:29:11 PM all 0.50 0.00 0.69 0.25 0.00 98.56 02:29:12 PM all 8.48 0.13 2.07 0.31 0.00 89.01 02:29:13 PM all 31.32 0.00 2.76 0.00 0.00 65.91 02:29:14 PM all 31.47 0.00 2.01 0.00 0.00 66.52 02:29:15 PM all 33.98 0.00 2.81 0.00 0.00 63.21 02:29:16 PM all 34.43 0.12 2.79 0.12 0.00 62.54 02:29:17 PM all 32.87 0.13 2.38 0.44 0.00 64.18 02:29:18 PM all 30.01 0.00 2.62 0.19 0.00 67.19 02:29:19 PM all 27.51 0.06 2.62 0.00 0.00 69.81 02:29:20 PM all 29.92 0.06 2.61 0.00 0.00 67.41 02:29:21 PM all 28.58 0.00 2.59 0.06 0.00 68.77 02:29:22 PM all 28.25 0.00 2.46 0.13 0.00 69.17 02:29:23 PM all 5.11 0.06 1.62 0.00 0.00 93.20 02:29:24 PM all 0.31 0.00 0.31 0.00 0.00 99.37 02:29:25 PM all 0.87 0.12 0.81 0.06 0.00 98.13
no vaapi without vdpau translation
rm -f test.ts && ffmpeg -hwaccel vaapi -i ${F} test.ts [AVHWDeviceContext @ 0x557bc805f840] libva: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null) [AVHWDeviceContext @ 0x557bc805f840] Failed to initialise VAAPI connection: -1 (unknown libva error). Device creation failed: -5. [h264 @ 0x557bc78e4a00] No device available for decoder: device type vaapi needed for codec h264. Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> mpeg2video (native)) Device setup failed for decoder on input stream #0:0 : Input/output error
firefox exec, hw accel disabled
VDPAU_DRIVER=nvidia MOZ_LOG="PlatformDecoderModule:5" firefox ${F} -p no_accel
... [Parent 6034: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by platform [Parent 6034: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by platform [Child 6177: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by platform [Child 6177: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by platform [RDD 6236: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by platform
[Child 6177: MediaSupervisor #1]: D/PlatformDecoderModule Hardware WebRender is off, disabled DMABuf & VAAPI.
[Child 6177: MediaPDecoder #1]: D/PlatformDecoderModule Initialising FFmpeg decoder. [Child 6177: MediaPDecoder #1]: D/PlatformDecoderModule FFmpeg init successful. [Child 6177: MediaPDecoder #1]: D/PlatformDecoderModule Choosing FFmpeg pixel format for video decoding. ...
firefox exec, hw accel default enabled
VDPAU_DRIVER=nvidia MOZ_LOG="PlatformDecoderModule:5" firefox ${F} -p default ... [RDD 5789: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by platform
[Child 5746: MediaPDecoder #1]: D/PlatformDecoderModule Initialising VA-API FFmpeg decoder
libva info: VA-API version 1.13.0 [Child 5746: MediaPDecoder #1]: D/PlatformDecoderModule Initialising FFmpeg decoder. [Child 5746: MediaPDecoder #1]: D/PlatformDecoderModule FFmpeg init successful. [Child 5746: MediaPDecoder #1]: D/PlatformDecoderModule Choosing FFmpeg pixel format for video decoding.
[Child 5746: MediaPDecoder #1]: D/PlatformDecoderModule DMABuf Got one frame output with pts=0dts=33375 duration=33000 opaque=-9223372036854775808
...
Take a closer look at all of those links you threw at me. :)
...
Hello,
https://bugzilla.mozilla.org/show_bug.cgi?id=1742229 states that NVIDIA's NVDecod can be used with VA-API.
No idea what it actually means but I'll try to uplift that to Firefox 95.
Martin
On 11/15/21 13:34, Fabio Valentini wrote:
On Fri, Nov 12, 2021 at 9:37 AM Martin Stransky stransky@redhat.com wrote:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Hope it helps. Martin
I appreciate the effort to document ways to improve things. However:
Video decoding on NVIDIA Please buy some real Linux hardware.
This doesn't really help at all. Is it supposed to be funny, or is it just cynical resignation?
I mean, even if I *could* throw a couple hundred bucks out the window to replace a perfectly working NVidia hardware, most places don't even seem to have AMD graphics cards in stock right now. Does that just mean "tough luck" for users like me?
Fabio _______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
On 11/12/21 00:37, Martin Stransky wrote:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Hope it helps. Martin
Intel section fails to mention that accelerated video decoding on the Iris XE (Gen12) GPUs requires intel-media-driver and won't work with older libva-intel-driver. So we're out of luck until the sandboxing issue is resolved and the fix is backported to Fedora Firefox builds.
On 11/15/21 17:38, Aleksei Bavshin wrote:
On 11/12/21 00:37, Martin Stransky wrote:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Hope it helps. Martin
Intel section fails to mention that accelerated video decoding on the Iris XE (Gen12) GPUs requires intel-media-driver and won't work with older libva-intel-driver. So we're out of luck until the sandboxing issue is resolved and the fix is backported to Fedora Firefox builds.
As usually, please update the page. Thanks.
On 11/15/21 08:45, Martin Stransky wrote:
On 11/15/21 17:38, Aleksei Bavshin wrote:
On 11/12/21 00:37, Martin Stransky wrote:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Hope it helps. Martin
Intel section fails to mention that accelerated video decoding on the Iris XE (Gen12) GPUs requires intel-media-driver and won't work with older libva-intel-driver. So we're out of luck until the sandboxing issue is resolved and the fix is backported to Fedora Firefox builds.
As usually, please update the page. Thanks.
Hm. I just reread the whole section again. Martin, did you mean to use intel-media-driver (iHD_drv_video.so) instead of the libva-intel-hybrid-driver (hybrid_drv_video.so)? Because everything makes sense with that substitution and the sandbox bug only mentions iHD_drv_video.so.
To be honest, I have no idea what GPUs even use libva-intel-hybrid-driver alone. libva-intel-driver claims to support everything up to Gen 10 GPUs and Gen11+ (Ice Lake, Tiger Lake, etc..) is handled by the intel-media-driver. And hybrid-driver's only purpose seems to be a VP9 decoding backend for the libva-intel-driver (--enable-hybrid-codec). Can someone confirm that?
On 11/15/21 18:28, Aleksei Bavshin wrote:
On 11/15/21 08:45, Martin Stransky wrote:
On 11/15/21 17:38, Aleksei Bavshin wrote:
On 11/12/21 00:37, Martin Stransky wrote:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Hope it helps. Martin
Intel section fails to mention that accelerated video decoding on the Iris XE (Gen12) GPUs requires intel-media-driver and won't work with older libva-intel-driver. So we're out of luck until the sandboxing issue is resolved and the fix is backported to Fedora Firefox builds.
As usually, please update the page. Thanks.
Hm. I just reread the whole section again. Martin, did you mean to use intel-media-driver (iHD_drv_video.so) instead of the libva-intel-hybrid-driver (hybrid_drv_video.so)? Because everything makes sense with that substitution and the sandbox bug only mentions iHD_drv_video.so.
Frankly I use only libva-intel-driver (i965_drv_video.so) for Intel UHD 620/630 which I have available and other info I have from upstream bugzilla (https://bugzilla.mozilla.org/show_bug.cgi?id=1619585).
Martin
Am 12.11.21 um 09:37 schrieb Martin Stransky:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Hope it helps. Martin
For VP9 on AMD the following set-up seems to work:
media.ffmpeg.vaapi.enabled to true media.ffvpx.enabled to false media.rdd-ffvpx.enabled to false media.rdd-vpx.enabled to false
H264 also seems to work. mp4/h265 from https://test-videos.co.uk/bigbuckbunny/mp4-h265 do not play at all.
Best regards, Julian
Am 12.11.21 um 09:37 schrieb Martin Stransky:
Hi folks,
I was told that people were having trouble with Firefox/HW acceleration/VA-API setup on Fedora so I put some info at wiki at:
https://fedoraproject.org/wiki/Firefox_Hardware_acceleration
Hope it helps. Martin >
With https://bugzilla.mozilla.org/show_bug.cgi?id=1698778 fixed, is there any hope of seeing the patches from that bug in Fedora builds sooner than Firefox 96?
Best regards, Julian
Thank you, Martin!
I've just updated the wiki page to remove the rdd stuff which should no longer be necessary with Firefox 96.
Thanks to the wiki page, one can check whether hardware acceleration is available.
Is there any indication (e.g. in about:support) to see whether video hardware acceleration is working? Or any tool to check?
Is hardware acceleration a prerequisite for using VA-API accelerated video decoding? (Background: my GPU is too old to get hardware acceleration support in firefox, but I do have VA-API with some video decoding support in hardware).
Kind regards, Christian