Closed Bug 1824458 Opened 2 years ago Closed 1 year ago

[VAAPI] Intel: If surface copy is tested/used as fallback/force-enabled, "Unsupported modifier, resource creation failed." is spammed into the terminal.

Categories

(Core :: Audio/Video: Playback, defect)

Firefox 113
x86_64
Linux
defect

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox-esr102 --- unaffected
firefox111 --- disabled
firefox112 --- disabled
firefox113 --- disabled

People

(Reporter: stransky, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

+++ This bug was initially created as a clone of Bug #1823333 +++

Steps to reproduce:

This problem happens since a while, currently with Nightly 113.0a1, 20230319214532. It does not happen with Firefox 110.0.1.

Play VP8 video like Jellyfish.

Actual results:

The message below is printed to the terminal:

Unsupported modifier, resource creation failed.

(VA-API works though.)

With MOZ_LOG="PlatformDecoderModule:5 Dmabuf:1":

$ ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
[ERROR glean_core] Error setting metrics feature config: Json(Error("EOF while parsing a value", line: 1, column: 0))
[Child 39251: Main Thread]: D/PlatformDecoderModule PDMInitializer, Init PDMs in Content process
[Child 39251: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type video/vp8
[Child 39251: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type video/vp8
[RDD 39365: Main Thread]: D/PlatformDecoderModule PDMInitializer, Init PDMs in RDD process
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder rejects requested type 'video/avc'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'video/avc'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'video/avc'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'video/vp9'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'video/vp9'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'video/vp8'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'video/vp8'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'video/av1'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'video/av1'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder rejects requested type 'video/theora'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder rejects requested type 'video/theora'
[RDD 39365: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type 'video/theora'
[RDD 39365: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type 'video/theora'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder rejects requested type 'audio/mp4a-latm'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'audio/mp4a-latm'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'audio/mp4a-latm'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'audio/mpeg'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'audio/mpeg'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder rejects requested type 'audio/opus'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder rejects requested type 'audio/opus'
[RDD 39365: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type 'audio/opus'
[RDD 39365: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type 'audio/opus'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder rejects requested type 'audio/vorbis'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder rejects requested type 'audio/vorbis'
[RDD 39365: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type 'audio/vorbis'
[RDD 39365: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type 'audio/vorbis'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'audio/flac'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'audio/flac'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder rejects requested type 'audio/x-wav'
[RDD 39365: Main Thread]: D/PlatformDecoderModule FFmpeg decoder rejects requested type 'audio/x-wav'
[RDD 39365: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type 'audio/x-wav'
[RDD 39365: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type 'audio/x-wav'
[Child 39251: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type video/vp8
[Child 39251: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type video/vp8
[RDD 39365: MediaSupervisor #1]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'video/vp8'
[RDD 39365: MediaSupervisor #1]: D/PlatformDecoderModule FFmpeg decoder supports requested type 'video/vp8'
[RDD 39365: MediaSupervisor #1]: D/PlatformDecoderModule FFVPX: FFmpegVideoDecoder::FFmpegVideoDecoder MIME video/vp8 Codec ID 139
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Initialising VA-API FFmpeg decoder
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   codec vp8 : On2 VP8
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: FFmpegVideoDecoder::GetAcceleratedFormats()
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   Profile H264Main:
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:     codec h264 format nv12              3         12
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:     codec h264 format nv12              3         12
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:     codec h264 format nv12              3         12
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   Profile H264High:
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:     codec h264 format nv12              3         12
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:     codec h264 format nv12              3         12
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:     codec h264 format nv12              3         12
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   Profile H264ConstrainedBaseline:
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:     codec h264 format nv12              3         12
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:     codec h264 format nv12              3         12
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:     codec h264 format nv12              3         12
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   Profile VP8Version0_3:
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:     codec vp8 format nv12              3         12
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   Supported accelerated formats:
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:       h264
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:       vp8
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   VA-API FFmpeg init successful
[RDD 39365: MediaPDecoder #1]: V/PlatformDecoderModule ProcessDecode: mDuration=33000µs ; mTime=0µs ; mTimecode=0µs
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Choosing FFmpeg pixel format for VA-API video decoding.
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Requesting pixel format VAAPI_VLD
[vp8 @ 0x7f2a8b064400] Format vaapi chosen by get_format().
[vp8 @ 0x7f2a8b064400] Format vaapi requires hwaccel initialisation.
[vp8 @ 0x7f2a8b064400] Considering format 0x3231564e -> nv12.
[vp8 @ 0x7f2a8b064400] Picked nv12 (0x3231564e) as best match for yuv420p.
[AVHWFramesContext @ 0x7f2a8b08c480] Created surface 0.
[AVHWFramesContext @ 0x7f2a8b08c480] Direct mapping possible.
[AVHWFramesContext @ 0x7f2a8b08c480] Created surface 0x1.
[AVHWFramesContext @ 0x7f2a8b08c480] Created surface 0x2.
[AVHWFramesContext @ 0x7f2a8b08c480] Created surface 0x3.
[AVHWFramesContext @ 0x7f2a8b08c480] Created surface 0x4.
[AVHWFramesContext @ 0x7f2a8b08c480] Created surface 0x5.
[AVHWFramesContext @ 0x7f2a8b08c480] Created surface 0x6.
[AVHWFramesContext @ 0x7f2a8b08c480] Created surface 0x7.
[AVHWFramesContext @ 0x7f2a8b08c480] Created surface 0x8.
[AVHWFramesContext @ 0x7f2a8b08c480] Created surface 0x9.
[AVHWFramesContext @ 0x7f2a8b08c480] Created surface 0xa.
[AVHWFramesContext @ 0x7f2a8b08c480] Created surface 0xb.
[AVHWFramesContext @ 0x7f2a8b08c480] Created surface 0xc.
[vp8 @ 0x7f2a8b064400] Decode context initialised: 0x12/0x10000000.
[vp8 @ 0x7f2a8b064400] Param buffer (type 0, 112 bytes) is 0.
[vp8 @ 0x7f2a8b064400] Param buffer (type 13, 1072 bytes) is 0x1.
[vp8 @ 0x7f2a8b064400] Param buffer (type 1, 64 bytes) is 0x2.
[vp8 @ 0x7f2a8b064400] Slice 0 param buffer (72 bytes) is 0x3.
[vp8 @ 0x7f2a8b064400] Slice 0 data buffer (61278 bytes) is 0x4.
[vp8 @ 0x7f2a8b064400] Decode to surface 0xc.
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Frame decode finished, time 7.32 ms averange decode time 7.32 ms decoded 1 frames
[RDD 39365: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: VA-API Got one frame output with pts=0 dts=0 duration=33000 opaque=-9223372036854775808
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
Unsupported modifier, resource creation failed.
Unsupported modifier, resource creation failed.
Unsupported modifier, resource creation failed.
Unsupported modifier, resource creation failed.
[…]

Expected results:

No failure messages should be printed to the terminal.

Bug 1767243 2 is about a similar issue, and it was analyzed to be a Mesa problem. I am using a Mesa 23.0.0~rc4-1, which has the fix mentioned in the Mesa issue.

As it does not happen with Firefox 110.0.1, no idea if it’s a Mesa issue in this case.

Overview:

  • 2023-01-19 (111): bug 1809162 introduced and enforced surface copy: It broke VAAPI on Intel with 'Unsupported modifier, resource creation failed.' (bug 1811878)

  • 2023-01-25 (111): bug 1811210 made surface copy a fallback by heuristic which made it unlikely to hit the problem.

  • 2022-02-08 (111): bug 1812290 introduced a surface copy check which unbroke VAAPI, but causes one 'Unsupported modifier, resource creation failed.' in any case.

MOZ_LOG="Dmabuf:5,PlatformDecoderModule:5" mozregression --repo autoland --launch 5bb5f6bf2fd7 --pref media.ffmpeg.vaapi.enabled:true  -P stdout -a https://bug1619882.bmoattachments.org/attachment.cgi?id=9149605

 0:31.99 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf Loading DMABuf system library libgbm.so.1 ...'
 0:32.00 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf DMABuf is enabled'
 0:32.00 INFO: b'Unsupported modifier, resource creation failed.'
 0:32.00 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf     Failed to create GbmBufferObject: Permission denied'
 0:32.00 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf DMABufSurfaceYUV::ReleaseTextures() UID 2'
 0:32.00 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf DMABufSurfaceYUV::ReleaseEGLImages() UID 2'
 0:32.00 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf DMABufSurfaceYUV::ReleaseTextures() UID 1'
 0:32.01 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf DMABufSurfaceYUV::ReleaseSurface() UID 2'
 0:32.01 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf DMABufSurfaceYUV::ReleaseTextures() UID 2'
 0:32.01 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf DMABufSurface::ReleaseDMABuf() UID 2'
 0:32.02 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf DMABufSurfaceYUV::ReleaseSurface() UID 1'
 0:32.02 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf DMABufSurfaceYUV::ReleaseTextures() UID 1'
 0:32.02 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf DMABufSurface::ReleaseDMABuf() UID 1'
 0:32.02 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf   DMABuf texture copy is broken'
 0:32.02 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf VideoFrameSurface: creating surface UID 3'
 0:32.02 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf Created new VA-API DMABufSurface UID 3'
 0:32.02 INFO: b'[RDD 47317: MediaPDecoder #2]: D/Dmabuf Surface pool size 1 used copied 0 used ffmpeg 0 (max 24) free ratio 1.000000'
  • 2022-02-09 (111): bug 1811878 allowed surface copy (and its test) to fall back to using dmabuf without modifiers which caused the second 'Unsupported modifier, resource creation failed.' in any case. Plus if surface copy is enabled, the terminal is spammed with this error.
MOZ_LOG="Dmabuf:5,PlatformDecoderModule:5" mozregression --repo autoland --launch ff9ad7a4fb13 --pref media.ffmpeg.vaapi.enabled:true  -P stdout -a https://bug1619882.bmoattachments.org/attachment.cgi?id=9149605

 0:42.74 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf Loading DMABuf system library libgbm.so.1 ...'
 0:42.77 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABuf is enabled'
 0:42.77 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf     Creating with modifiers'
 0:42.77 INFO: b'Unsupported modifier, resource creation failed.'
 0:42.77 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf     Creating without modifiers'
 0:42.77 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::CreateTexture() UID 1 plane 0'
 0:42.77 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::CreateEGLImage() UID 1 plane 0'
 0:42.77 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf   Success.'
 0:42.79 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::CreateTexture() UID 2 plane 1'
 0:42.79 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::CreateEGLImage() UID 2 plane 1'
 0:42.79 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf   Success.'
 0:42.79 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::CreateYUVPlane() UID 1 size 640 x 360'
 0:42.79 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf     Creating with modifiers'
 0:42.79 INFO: b'Unsupported modifier, resource creation failed.'
 0:42.79 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf     Creating without modifiers'
 0:42.79 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::CreateTexture() UID 1 plane 1'
 0:42.79 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::CreateEGLImage() UID 1 plane 1'
 0:42.79 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf   Success.'
 0:42.79 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::ReleaseTextures() UID 2'
 0:42.79 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::ReleaseEGLImages() UID 2'
 0:42.79 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::ReleaseTextures() UID 1'
 0:42.79 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::ReleaseEGLImages() UID 1'
 0:42.80 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::ReleaseSurface() UID 2'
 0:42.80 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::ReleaseTextures() UID 2'
 0:42.80 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurface::ReleaseDMABuf() UID 2'
 0:42.80 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::ReleaseSurface() UID 1'
 0:42.80 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurfaceYUV::ReleaseTextures() UID 1'
 0:42.80 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf DMABufSurface::ReleaseDMABuf() UID 1'
 0:42.80 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf VideoFrameSurface: creating surface UID 3'
 0:42.80 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf Created new VA-API DMABufSurface UID 3'
 0:42.80 INFO: b'[RDD 47826: MediaPDecoder #1]: D/Dmabuf Surface pool size 1 used copied 0 used ffmpeg 0 (max 24) free ratio 1.000000'
  • 2022-03-09 (112): bug 1802844 accidentally enabled surface copy in any case.
  • 2022-03-27 (113): bug 1823333 enabled zero copy again for Intel, surface copy is used as fallback by heuristic.
Regressed by: 1811878, 1812290
No longer regressed by: 1802844
Summary: [VAAPI] Intel: "Unsupported modifier, resource creation failed." is spammed into the terminal → [VAAPI] Intel: If surface copy is tested/used as fallback/force-enabled, "Unsupported modifier, resource creation failed." is spammed into the terminal.

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: -- → S3
Flags: needinfo?(jmathies)

I don't think there's anything actionable on our side. We don't copy surfaces by default and fallback to non-modifier version.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.