[NVIDIA] Video decode attempts to use incorrect EGL display
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr91 | --- | unaffected |
firefox97 | --- | unaffected |
firefox98 | --- | disabled |
firefox99 | --- | disabled |
People
(Reporter: elfarto, Unassigned)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 file)
88.59 KB,
image/png
|
Details |
Steps to reproduce:
Play any video on Wayland with proprietary NVIDIA drivers and nvidia-vaapi-driver.
Actual results:
The following is printed, and FF falls back to software decoding:
[32522-32559] ../src/export-buf.c: 52 debug [EGL] eglGetDisplay: X screen is not using the NVIDIA driver.
libEGL warning: DRI2: failed to create dri screen
[32522-32559] ../src/export-buf.c: 52 debug [EGL] eglCreateImageKHR: _eglParseImageAttribList
[RDD 32522: MediaPDecoder #1]: D/PlatformDecoderModule failed to create texture over DMABuf memory!
After some debugging, it seems that the gdk_display_get_default
calls that occur in the RDD process return NULL
, which causes the eglGetDisplay
to use the wrong display, swrast in this case.
More info: https://github.com/elFarto/nvidia-vaapi-driver/issues/52
Expected results:
The video should have used hardware decoding.
Updated•3 years ago
|
Comment 1•3 years ago
|
||
IIRC we don't even initialize gtk on the RDD process, so this might be a bit tricky, perhaps.
Setting the environment variable EGL_PLATFORM=wayland
seems to work around the issue.
The root cause seems to be calling eglGetDisplay asking for the default display, under wayland, with XWayland running (and DISPLAY set) seems to confuse the NVIDIA driver, which tries to init under X11 and fails.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
I'm getting similar errors, on the same range of firefox versions. However, I am using the i965 driver on wayland(non-xwayland).
Latest 97.0 standard does not give these errors, but 98.0 up to latest nightly(99.0a1 (20220213092920)) does.
[RDD 3911: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: VA-API Got one frame output with pts=0dts=0 duration=17000 opaque=-9223372036854775808
[RDD 3911: MediaPDecoder #1]: D/PlatformDecoderModule Created new VA-API DMABufSurface UID = 1
[RDD 3911: MediaPDecoder #1]: D/PlatformDecoderModule VideoFrameSurfaceVAAPI: creating surface UID = 1
[RDD 3911: MediaPDecoder #1]: D/PlatformDecoderModule failed to create texture over DMABuf memory!
[RDD 3911: MediaPDecoder #1]: D/PlatformDecoderModule VideoFrameSurfaceVAAPI: deleting dmabuf surface UID = 1
[RDD 3911: MediaPDecoder #1]: D/PlatformDecoderModule VideoFrameSurfaceVAAPI: VAAPI releasing dmabuf surface UID = 1
(In reply to nicopwn from comment #3)
I'm getting similar errors, on the same range of firefox versions. However, I am using the i965 driver on wayland(non-xwayland).
Latest 97.0 standard does not give these errors, but 98.0 up to latest nightly(99.0a1 (20220213092920)) does.[RDD 3911: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: VA-API Got one frame output with pts=0dts=0 duration=17000 opaque=-9223372036854775808 [RDD 3911: MediaPDecoder #1]: D/PlatformDecoderModule Created new VA-API DMABufSurface UID = 1 [RDD 3911: MediaPDecoder #1]: D/PlatformDecoderModule VideoFrameSurfaceVAAPI: creating surface UID = 1 [RDD 3911: MediaPDecoder #1]: D/PlatformDecoderModule failed to create texture over DMABuf memory! [RDD 3911: MediaPDecoder #1]: D/PlatformDecoderModule VideoFrameSurfaceVAAPI: deleting dmabuf surface UID = 1 [RDD 3911: MediaPDecoder #1]: D/PlatformDecoderModule VideoFrameSurfaceVAAPI: VAAPI releasing dmabuf surface UID = 1
+1, with iHD driver.
I am very worried about that, because FF is the only browser that brings VAAPI on my laptop for today. :(
Comment 5•3 years ago
|
||
(In reply to Ivan from comment #4)
+1, with iHD driver.
(Offtopic) Regardless of hardware, Firefox 98 and 99 need to be started with MOZ_DISABLE_RDD_SANDBOX=1 environment variable to make VAAPI work: bug 1751363
Comment 6•3 years ago
|
||
(In reply to Stephen from comment #2)
Setting the environment variable
EGL_PLATFORM=wayland
seems to work around the issue.The root cause seems to be calling eglGetDisplay asking for the default display, under wayland, with XWayland running (and DISPLAY set) seems to confuse the NVIDIA driver, which tries to init under X11 and fails.
I saw this in a different project now and apparently the platform that's tried in the nullptr
case is undefined - i.e. the fact that it usually works on Mesa is just luck. So IIUC the right fix is to explicitly ask for the right EGL platform - just like you do here, but instead we should do it in the code.
Comment 7•3 years ago
|
||
Hello! I have tried to reproduce the issue with firefox 99.0a1(2022-02-07) on Ubuntu 20.04 with the steps provided in the comments.
Tried installing the VA-API decoder but I get the error as per the attached screenshot. If some could point me in the right direction in order to reproduce the issue.
Tried installing the VA-API decoder but I get the error as per the attached screenshot. If some could point me in the right direction in order to reproduce the issue.
Raise an issue on the Github project, https://github.com/elFarto/nvidia-vaapi-driver, with the output ofNVD_LOG=1 vainfo
, and we're try and get to the bottom of the issue.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 9•3 years ago
|
||
The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.
Updated•3 years ago
|
Description
•