[KDE] Firefox crashes during playback of HDR video with gfx.wayland.hdr enabled - invalid dmabuf modifiers
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox141 | --- | fixed |
People
(Reporter: anton, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Attachments
(8 files, 1 external file, 1 obsolete file)
Enable HDR in KDE
Set gfx.wayland.hdr to True
Open a mp4 video file with HDR (colormatrix bt.2020-ncl). A local file from disk (file:///home/test.mp4)
Firefox crashes
Crash report: https://crash-stats.mozilla.org/report/index/2e28c859-4048-4cae-95a7-d8cd30250520
MOZ_CRASH Reason:
(kde) zwp_linux_buffer_params_v1#86: error 7: importing the supplied dmabufs failed
Proxy: WP:E WP:CA WP:CPCA
Top 10 frames:
0 libxul.so MOZ_CrashSequence(void*, long) mfbt/Assertions.h:248
0 libxul.so MOZ_Crash(char const*, int, char const*) mfbt/Assertions.h:381
0 libxul.so mozilla::widget::WlLogHandler(char const*, __va_list_tag*) widget/gtk/nsWaylandDisplay.cpp:634
1 libwayland-client.so.0 wl_log /usr/src/debug/wayland-1.23.1-1.fc42.x86_64/src/wayland-util.c:463
2 libwayland-client.so.0 display_handle_error /usr/src/debug/wayland-1.23.1-1.fc42.x86_64/src/wayland-client.c:1091
3 libffi.so.8 ffi_call_unix64 /usr/src/debug/libffi-3.4.6-5.fc42.x86_64/src/x86/unix64.S:104
4 libffi.so.8 ffi_call_int /usr/src/debug/libffi-3.4.6-5.fc42.x86_64/src/x86/ffi64.c:673
5 libffi.so.8 ffi_call /usr/src/debug/libffi-3.4.6-5.fc42.x86_64/src/x86/ffi64.c:710
6 libwayland-client.so.0 wl_closure_invoke /usr/src/debug/wayland-1.23.1-1.fc42.x86_64/src/connection.c:1228
7 libwayland-client.so.0 dispatch_event /usr/src/debug/wayland-1.23.1-1.fc42.x86_64/src/wayland-client.c:1674
| Reporter | ||
Updated•1 year ago
|
Comment 1•1 year ago
|
||
Moving this bug to a component that I believe is a better fit. If this isn’t the right place, please feel free to move it to a more appropriate one.
Thanks!
| Assignee | ||
Comment 2•1 year ago
|
||
Please run latest nightly with MOZ_LOG="Dmabuf:5" env variable on terminal and attach the log here.
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_Nightly_binaries
Thanks.
| Reporter | ||
Comment 3•1 year ago
|
||
| Reporter | ||
Comment 4•1 year ago
|
||
| Reporter | ||
Comment 5•1 year ago
|
||
I should mention that I always use nightly
Name Firefox
Version 140.0a1
Build ID 20250522090848
| Assignee | ||
Comment 6•1 year ago
|
||
Please share the test video so I can reproduce it.
Thanks.
| Reporter | ||
Comment 7•1 year ago
|
||
| Reporter | ||
Comment 8•1 year ago
|
||
Just checked if it crashes with http url
MOZ_LOG="Dmabuf:5" firefox --profile /home/a/.mozilla/firefox/d1q2wc6n.TEST https://bugzilla.mozilla.org/attachment.cgi?id=9490324
Seems the same crash
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 9•1 year ago
|
||
Please attach your about:support page.
Thanks.
| Reporter | ||
Comment 10•1 year ago
|
||
| Reporter | ||
Comment 11•1 year ago
|
||
| Reporter | ||
Comment 12•1 year ago
|
||
| Assignee | ||
Comment 13•1 year ago
•
|
||
Thanks, there's related part of the log:
[1011148.810] {Default Queue} -> zwp_linux_dmabuf_v1#48.create_params(new id zwp_linux_buffer_params_v1#80)
[Parent 31445: Renderer]: D/Dmabuf [7fffb337f4c0]: layer [0] modifier ffffffffffffff
[1011148.835] {Default Queue} -> zwp_linux_buffer_params_v1#80.add(fd 399, 0, 0, 4096, 16777215, 4294967295)
[Parent 31445: Renderer]: D/Dmabuf [7fffb337f4c0]: layer [1] modifier ffffffffffffff
[1011148.856] {Default Queue} -> zwp_linux_buffer_params_v1#80.add(fd 400, 1, 0, 4096, 16777215, 4294967295)
[Parent 31445: Renderer]: D/Dmabuf [7fffb337f4c0]: zwp_linux_buffer_params_v1_create_immed() [1920 x 1080], fourcc [30313050]
[1011148.878] {Default Queue} -> zwp_linux_buffer_params_v1#80.create_immed(new id wl_buffer#69, 1920, 1080, 808530000, 0)
[Parent 31445: Renderer]: D/Dmabuf [7fffb337f4c0]: created wl_buffer [7fffa6b94940]
[1034913.188] {Display Queue} wl_display#1.error(zwp_linux_buffer_params_v1#80, 7, "importing the supplied dmabufs failed")
[GFX1-]: (kde) Wayland protocol error: zwp_linux_buffer_params_v1#80: error 7: importing the supplied dmabufs failed
So looks like KDE doesn't like the invalid modifier here.
| Assignee | ||
Comment 14•1 year ago
|
||
Does it crash immediately or do yo use any video frames before crash?
Thanks.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 15•1 year ago
|
||
This looks related:
/**
* @ingroup iface_zwp_linux_buffer_params_v1
*
* This request adds one dmabuf to the set in this
* zwp_linux_buffer_params_v1.
*
* The 64-bit unsigned value combined from modifier_hi and modifier_lo
* is the dmabuf layout modifier. DRM AddFB2 ioctl calls this the
* fb modifier, which is defined in drm_mode.h of Linux UAPI.
* This is an opaque token. Drivers use this token to express tiling,
* compression, etc. driver-specific modifications to the base format
* defined by the DRM fourcc code.
*
* Starting from version 4, the invalid_format protocol error is sent if
* the format + modifier pair was not advertised as supported.
*
* Starting from version 5, the invalid_format protocol error is sent if
* all planes don't use the same modifier.
*
* This request raises the PLANE_IDX error if plane_idx is too large.
* The error PLANE_SET is raised if attempting to set a plane that
* was already set.
*/
so perhaps we need to use advertised modifiers only.
| Assignee | ||
Comment 16•1 year ago
|
||
Yes, I see it now. Your system is missing support for DRM 30313050 format ( VA_FOURCC_P010) so it can't be composited and it's not HDR capable.
| Reporter | ||
Comment 17•1 year ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #16)
Yes, I see it now. Your system is missing support for DRM 30313050 format ( VA_FOURCC_P010) so it can't be composited and it's not HDR capable.
What do you mean " it's not HDR capable."?
In windows (dualboot) it plays HDR content on youtube...
In KDE display (itself by OSD) reports HDR...
| Reporter | ||
Comment 18•1 year ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #14)
Does it crash immediately or do yo use any video frames before crash?
Thanks.
When debugged I only saw loading video screen placeholder (rotating circle) then it crashes
| Reporter | ||
Comment 19•1 year ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #16)
Yes, I see it now. Your system is missing support for DRM 30313050 format ( VA_FOURCC_P010) so it can't be composited and it's not HDR capable.
Just retested on dGPU (AMD rx560, same monitor but HDMI output, KDE HDR is On) - it still crashes
| Reporter | ||
Comment 20•1 year ago
|
||
Firefox log on AMD HDMI with export KWIN_DRM_DEVICES=/dev/dri/card1 plasmashell --replace
| Assignee | ||
Comment 21•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Comment 22•1 year ago
|
||
iface_zwp_linux_buffer_params_v1 extension doesn't advertise dmabuf YUV P010 format used for HDR rendering so we see the crash here. If you believe it's a bug you need to report it at KDE bug tracker / KWin component. From application perspective HDR is not supported. You can also try MPV in HDR mode to test it.
| Reporter | ||
Comment 23•1 year ago
|
||
| Reporter | ||
Comment 24•1 year ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #22)
iface_zwp_linux_buffer_params_v1 extension doesn't advertise dmabuf YUV P010 format used for HDR rendering so we see the crash here. If you believe it's a bug you need to report it at KDE bug tracker / KWin component. From application perspective HDR is not supported. You can also try MPV in HDR mode to test it.
Just tested with Gnome OS nightly with HDR enabled
firefox plays video without issues
| Reporter | ||
Comment 25•1 year ago
|
||
| Reporter | ||
Comment 26•1 year ago
|
||
I've submit the bug to KDE
https://bugs.kde.org/show_bug.cgi?id=505468
| Reporter | ||
Comment 27•1 year ago
|
||
It works with neon-unstable-developer-20250609-0038.iso and current nightly
Comment 28•1 year ago
|
||
Comment 29•1 year ago
|
||
| bugherder | ||
Description
•