Closed Bug 1787102 Opened 2 years ago Closed 2 years ago

VA-API does not work - egl: failed to create dri2 screen - hybrid mesa (WebGL uses llvmpipe + "We're missing DRM render device!")

Categories

(Core :: Graphics, defect)

Firefox 105
Unspecified
Linux
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: skoruppa, Unassigned)

Details

Attachments

(3 files)

Attached file about_support.txt

Steps to reproduce:

I think I tried everything (on both Firefox 104 and 105) and still can't get VAAPI to work.

I have a hybrid system (Ubuntu 22.04) on Wayland with Intel and Nvidia graphics cards. Property drivers are installed (510.85.02) and Mesa is up to date (22.0.5)

According to 1771898 and 1773377 the issue may be caused by my Nvidia card but even though it should be already fixed with Firefox 104, VAAPI still does not work for me.

In Firefox logs I always see:
MESA: error: Failed to query drm device.
libEGL warning: DRI2: failed to create dri screen

maybe it is related. I'm testing if VAAPI is used by intel_gpu_top command and monitoring the "video" percentage. It is always at 0%. With VLC everything works fine

pskorupa@pskorupa-precision:~$ vainfo
libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 ()
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointFEI
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointFEI
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointFEI
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointFEI
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD

Actual results:

Executing:
MOZ_DISABLE_RDD_SANDBOX=1 MOZ_LOG="Dmabuf:5" firefox-trunk

and going to youtube:
[Parent 58766: Main Thread]: D/Dmabuf wl_drm is available.
[Parent 58766: Main Thread]: D/Dmabuf zwp_linux_dmabuf_v1 is available.
[Parent 58766: Main Thread]: D/Dmabuf We're missing DRM render device!
[Parent 58766: Main Thread]: D/Dmabuf nsDMABufDevice::Configure()
[Parent 58766: Main Thread]: D/Dmabuf Loading DMABuf system library libgbm.so.1 ...
[Parent 58766: Main Thread]: D/Dmabuf Failed to create drm render device
MESA: error: Failed to query drm device.
libEGL warning: DRI2: failed to create dri screen
Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs
[2022-08-25T06:21:07Z ERROR mp4parse] Found 2 nul bytes in "\u{0}\u{0}"
[2022-08-25T06:21:07Z ERROR mp4parse] Found 2 nul bytes in "\u{0}\u{0}"
[2022-08-25T06:21:07Z ERROR mp4parse] Found 2 nul bytes in "\u{0}\u{0}"
[2022-08-25T06:21:07Z ERROR mp4parse] Found 2 nul bytes in "\u{0}\u{0}"

Executing:
MOZ_DISABLE_RDD_SANDBOX=1 MOZ_LOG="Dmabuf:5" firefox-trunk

and going to youtube:
MOZ_DISABLE_RDD_SANDBOX=1 MOZ_DRM_DEVICE=/dev/dri/renderD128 MOZ_LOG="Dmabuf:5" firefox-trunk

[Parent 60736: Main Thread]: D/Dmabuf wl_drm is available.
[Parent 60736: Main Thread]: D/Dmabuf zwp_linux_dmabuf_v1 is available.
[Parent 60736: Main Thread]: D/Dmabuf Using DRM device /dev/dri/renderD128
[Parent 60736: Main Thread]: D/Dmabuf nsDMABufDevice::Configure()
[Parent 60736: Main Thread]: D/Dmabuf Loading DMABuf system library libgbm.so.1 ...
MESA: error: Failed to query drm device.
[Parent 60736: Main Thread]: D/Dmabuf DMABuf is enabled
MESA: error: Failed to query drm device.
libEGL warning: DRI2: failed to create dri screen
Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs

Expected results:

VAAPI should work

The Bugbug bot thinks this bug should belong to the 'Core::Graphics' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics
Product: Firefox → Core
Component: Graphics → Audio/Video: Playback
OS: Unspecified → Linux
Summary: VA-API does not work - egl: failed to create dri2 screen - hybrid mesa → VA-API does not work - egl: failed to create dri2 screen - hybrid mesa (WebGL uses llvmpipe + "We're missing DRM render device!")

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Severity: -- → S4
Flags: needinfo?(jmathies)

The main problem here is your GFX driver:

GPU #1
Active: Yes
Description: llvmpipe (LLVM 13.0.1, 256 bits)
Vendor ID: Mesa/X.org
Device ID: llvmpipe (LLVM 13.0.1, 256 bits)
Driver Vendor: mesa/llvmpipe
Driver Version: 22.0.5.0

That means SW rendering. So Firefox uses SW backend where VA-API is disabled.
Can you attach output of 'lspci' command?

No longer blocks: egl-linux-vaapi
Component: Audio/Video: Playback → Graphics
Flags: needinfo?(skoruppa)
Attached file lspci.txt
Flags: needinfo?(skoruppa)

If you need anything else, let me know. I would love to have a working VAAPI in firefox ><

(In reply to skoruppa from comment #5)

If you need anything else, let me know. I would love to have a working VAAPI in firefox ><

VAAPI not working really looks like a side effect here - the main issue is that something, likely in your setup, is borked. You really should not get llvmpipe as your driver :/

But the CometLake-H GT2 [UHD Graphics] is supposed to be running. What's output of 'glxinfo' terminal command?

Flags: needinfo?(skoruppa)
Attached file about_support_new.txt
Flags: needinfo?(skoruppa)

:rmader
your comment made me think, so I decided to update my kernel from 5.18.3 to 6.0.8 and... magic! It does work now :) I didn't change anything else. In my new about:support I think I have a correct driver now: "driverVendor": "mesa/iris"

:stransky
Do you want me to still check the glxinfo command with the 5.18.3 kernel?

(In reply to skoruppa from comment #9)

:rmader
your comment made me think, so I decided to update my kernel from 5.18.3 to 6.0.8 and... magic! It does work now :) I didn't change anything else. In my new about:support I think I have a correct driver now: "driverVendor": "mesa/iris"

:stransky
Do you want me to still check the glxinfo command with the 5.18.3 kernel?

No need if that works for you.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: