You are not logged in.
Yesterday after updating firefox to 115, it stopped working with glxtest showing that VA-API had failed. While I was trying to find a solution, I tried enabling VA-API hardware acceleration by installing the nvidia-vaapi-driver and following through the steps listed. However, for the step where I had to compile ffmpeg with vaapi, I used the following input:
ffmpeg -threads 1 -i file.ext -vaapi_device /dev/dri/renderD128 -vcodec h264_vaapi -vf format='nv12|vaapi,hwupload' output.mp4
Which then produced the following output:
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
[AVHWDeviceContext @ 0x5581dadb60c0] libva: /usr/lib/dri/nvidia_drv_video.so init failed
[AVHWDeviceContext @ 0x5581dadb60c0] Failed to initialise VAAPI connection: 1 (operation failed).
Device creation failed: -5.
Failed to set value '/dev/dri/renderD128' for option 'vaapi_device': Input/output error
Error parsing global options: Input/output error
After that, testing with vainfo produced the following:
Trying display: wayland
Trying display: x11
vainfo: VA-API version: 1.18 (libva 2.18.2)
Meanwhile testing with vdpauinfo produced an error. As for firefox itself, when starting from the terminal, it now produces a different problem than what I had initially before installing and configuring the drivers:
[GFX1-]: glxtest: ManageChildProcess failed
[GFX1-]: No GPUs detected via PCI
[Child 9371, MediaDecoderStateMachine #1] WARNING: Decoder=7f2000f04600 Decode error: NS_ERROR_DOM_MEDIA_CANCELED (0x806e000a) - RefPtr<MediaSourceTrackDemuxer::SeekPromise> mozilla::MediaSourceTrackDemuxer::DoSeek(const mozilla::media::TimeUnit &): manager is detached.: file /build/firefox/src/firefox-115.0/dom/media/MediaDecoderStateMachineBase.cpp:164
I believe I may have messed up a step while trying to find a solution to the initial error(that is, enabling proper firefox support for vaapi hardware acceleration to make it run). I want to know what step do I need to redo to solve these new errors or if I even need hardware acceleration to have firefox working in the first place.
Edit: For context, my laptop has 2 GPUs, one is Intel Iris Plus Graphics G1, the other is NVIDIA GeForce MX230, with an intel i5 CPU. And using cinnamon as my DE.
Last edited by adrit1234 (2023-07-07 17:33:20)
Offline
https://wiki.archlinux.org/title/Hardwa … ion_layers
Read the note, try libva-vdpau-driver
Offline
Ahh okay, I will try it but I did see this in the firefox arch wiki entry:
Since currently there is no DMA-BUF support for VDPAU nor libva-vdpau-driver, this package will not enable hardware video acceleration in Firefox.
In fact, as of Firefox 102, having this installed and media.ffmpeg.vaapi.enabled set will make Firefox crash on startup
So I'm not sure if it will work. I will get back after trying.
Offline
So far, it hasn't worked. I installed libva-vdpau-driver and changed the LIBVA_DRIVER_NAME environment variable to vdpau as well as setting VDPAU_DRIVER to nvidia. But when running vainfo I get:
Trying display: wayland
Trying display: x11
Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
Floating point exception (core dumped)
vdpauinfo:
display: :0 screen: 0
Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
Error creating VDPAU device: 1
Last edited by adrit1234 (2023-07-07 13:58:01)
Offline
Not "libvdpau-va-gl", that's a VDPAU emulation on VAAPI.
You have VDPAU, you want VAAPI
Ftr, the video acceleration situation on linux SUCKS.
The situation w/ browsers SUCKS FUBAR.
I've given up on the latter and settled w/ <conspiracy theory>that's deliberate, nobody can be this incompetent</conspiracy>
For the former also see https://bbs.archlinux.org/viewtopic.php?id=286492
Offline
Right, I see why support for hardware acceleration just sucks right now. I didn't manage to get the thing working with firefox and I'll just disable it for the sake of functionality since it's not really needed unlike what I thought previously. Nonetheless, thank you for helping me through the whole troubleshooting process from the first thread. I'll just mark this thread as solved now.
Offline
Fwwi, there's youtube-viewer and w/ yt-dlp mpv can play video streams from a pleathora of sources directly as well what, w/ the linked caveat for older nvidia GPUs, works rather well.
Offline
Ahh okay, I see, I'll try that one out later too. Again, thanks for the advice!
Offline