Closed Bug 1823333 Opened 2 years ago Closed 2 years ago

[VAAPI] zero copy is disabled on Intel because there is no allowlist rule: "Unsupported modifier, resource creation failed." is spammed into the terminal

Categories

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

Firefox 113
x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox111 --- unaffected
firefox112 --- fixed
firefox113 --- verified

People

(Reporter: pmenzel+bugzilla.mozilla.org, Assigned: stransky)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(3 files)

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.

Attached file Output of `about:support` (deleted) —

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

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
Summary: Messages on terminal when playing VP8: Unsupported modifier, resource creation failed. → Messages on terminal when playing video: Unsupported modifier, resource creation failed.

I just updated the title, as the message is also logged, when playing H264 videos.

Please run with MOZ_LOG="PlatformDecoderModule:5 Dmabuf:5" and attach the log here.
I wonder why we fail here - due to formats or modifiers.
Thanks.

Flags: needinfo?(pmenzel+bugzilla.mozilla.org)

Gnome Wayland, Debian Testing, Intel Iris Graphics 6100 (BDW GT3)
bug 1811878 might not have been fixed and then it became worse.
Tested VP8:

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Attached file 1823333.txt (deleted) —

MOZ_LOG="PlatformDecoderModule:5 Dmabuf:5" mozregression --launch 20230321091911 --pref media.ffmpeg.vaapi.enabled:true -P stdout -a https://upload.wikimedia.org/wikipedia/commons/a/a7/Giessenf%C3%A4lle_VP8.webm > 1823333.txt

Flags: needinfo?(pmenzel+bugzilla.mozilla.org)

Same behavior with ffvpx enabled&disabled:
2023-03-01 = vp8 vaapi is used + error is shown twice.
20230321091911 = vp8 vaapi is used + error is spammed.

with ffvpx disabled:
mozregression --good 2023-03-01 --bad 20230321091911 --pref media.ffmpeg.vaapi.enabled:true media.ffvpx.enabled:false media.rdd-ffvpx.enabled:false media.utility-ffvpx.enabled:false media.rdd-vpx.enabled:false -P stdout -a https://upload.wikimedia.org/wikipedia/commons/a/a7/Giessenf%C3%A4lle_VP8.webm

6:52.05 INFO: Last good revision: 4e74994741271787fa1199005db6a6d8b6034053
6:52.05 INFO: First bad revision: 80ef2f4a6e5d20cc876745fb41963a7ff863b09b
6:52.05 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=4e74994741271787fa1199005db6a6d8b6034053&tochange=80ef2f4a6e5d20cc876745fb41963a7ff863b09b

80ef2f4a6e5d20cc876745fb41963a7ff863b09b stransky — Bug 1802844 [Linux] Disable HW_DECODED_VIDEO_ZERO_COPY on AMD hardware r=aosmond
a308651d8ecb9ab19960c9b7a92f6c0e7bbb9e46 stransky — Bug 1802844 [Linux] Use gfxVars::HwDecodedVideoZeroCopy instead of preference r=alwu
7e4e013e1f126aa0a6112f590c85829d73a71e2a stransky — Bug 1802844 [Linux] Configure FEATURE_HW_DECODED_VIDEO_ZERO_COPY on Linux r=emilio

Same behavior and regression range with h264:

  • h264 vaapi works + error is shown twice:
    mozregression --repo autoland --launch 4e74994741271787fa1199005db6a6d8b6034053 --pref media.ffmpeg.vaapi.enabled:true media.ffvpx.enabled:false media.rdd-ffvpx.enabled:false media.utility-ffvpx.enabled:false media.rdd-vpx.enabled:false -P stdout -a https://bug1619882.bmoattachments.org/attachment.cgi?id=9149605

  • h264 vapai works + error is spammed into terminal:
    mozregression --repo autoland --launch 80ef2f4a6e5d20cc876745fb41963a7ff863b09b --pref media.ffmpeg.vaapi.enabled:true media.ffvpx.enabled:false media.rdd-ffvpx.enabled:false media.utility-ffvpx.enabled:false media.rdd-vpx.enabled:false -P stdout -a https://bug1619882.bmoattachments.org/attachment.cgi?id=9149605

    APPEND_TO_DRIVER_BLOCKLIST(
        OperatingSystem::Linux, DeviceFamily::All,
        nsIGfxInfo::HW_DECODED_VIDEO_ZERO_COPY,
        nsIGfxInfo::FEATURE_ALLOW_ALWAYS, DRIVER_COMPARISON_IGNORED,
        V(0, 0, 0, 0), "FEATURE_ROLLOUT_ALL", "");
Flags: needinfo?(stransky)
Summary: Messages on terminal when playing video: Unsupported modifier, resource creation failed. → [VAAPI] zero copy is disabled on Intel because there is no allowlist rule: "Unsupported modifier, resource creation failed." is spammed into the terminal
Assignee: nobody → stransky
Flags: needinfo?(stransky)
Priority: -- → P3

But well we need to fix surface copy on Intel anyway.

Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/8a4fece0f1e9 [VAAPI] Fix FEATURE_HW_DECODED_VIDEO_ZERO_COPY handling as it's allowlisted feature r=gfx-reviewers,aosmond
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

Should this be uplifted?

Flags: needinfo?(stransky)

Comment on attachment 9324944 [details]
Bug 1823333 [VAAPI] Fix FEATURE_HW_DECODED_VIDEO_ZERO_COPY handling as it's allowlisted feature r?emilio

Beta/Release Uplift Approval Request

  • User impact if declined: Broken VA-API playback on Intel.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): We used that before and broke it accidentally. This just revert previous state.
  • String changes made/needed:
  • Is Android affected?: Yes
Flags: needinfo?(stransky)
Attachment #9324944 - Flags: approval-mozilla-beta?

Comment on attachment 9324944 [details]
Bug 1823333 [VAAPI] Fix FEATURE_HW_DECODED_VIDEO_ZERO_COPY handling as it's allowlisted feature r?emilio

Approved for 112.0b9

Attachment #9324944 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: