Bug 460563 - kwin_wayland crashes in Plasma 5.26 with error "No provider of eglQueryDmaBufModifiersEXT found." when attempting to screen share or use OBS (due to an aurorae theme)
Summary: kwin_wayland crashes in Plasma 5.26 with error "No provider of eglQueryDmaBuf...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.26.0
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-17 01:12 UTC by p d
Modified: 2022-11-02 17:51 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description p d 2022-10-17 01:12:33 UTC
SUMMARY
On Fedora 37 KDE with KDE 5.26 packages from the @kdesig/kde COPR repo, Kwin (Wayland) crashes when attempting to screen share / use OBS. This is with Intel HD 620 graphics.

The error message in the log shows:
Oct 16 19:09:08 fedora-t580 kwin_wayland_wrapper[4491]: No provider of eglQueryDmaBufModifiersEXT found.  Requires one of:
Oct 16 19:09:08 fedora-t580 kwin_wayland_wrapper[4491]:    EGL_EXT_image_dma_buf_import_modifiers


STEPS TO REPRODUCE
1. Be on Fedora 37 KDE with Intel HD 620 graphics (or maybe similar)
2. Use KDE 5.26 on Fedora 37
3. Try to screen share / record screen in OBS
4. Notice Kwin Wayland instantly crashes

OBSERVED RESULT

kwin_wayland crashes

EXPECTED RESULT

For it to not crash. It works fine in KDE 5.25.5

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 37
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 5.19.15-301.fc37.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-7300U CPU @ 2.60GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 620
Manufacturer: LENOVO
System Version: ThinkPad T580

ADDITIONAL INFORMATION
This is different from https://bugs.kde.org/show_bug.cgi?id=460553 , the crash appears to be for a different reason.
Comment 1 p d 2022-10-17 10:29:00 UTC
due to corrupt kwinrc
Comment 2 p d 2022-10-17 12:41:02 UTC
I found the cause. It's caused by an aurorae theme ( https://store.kde.org/p/1887668 ) and I don't think it's specific to just that theme. If I set that aurorae theme, and reboot, I get crashing when I try to screen share, in Wayland. If I set it back to Breeze, and reboot, screen sharing works normally.
Comment 3 Nicolas Fella 2022-10-17 16:51:25 UTC
For crashes we need a backtrace

Please see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl and try to obtain a backtrace for kwin_wayland
Comment 4 p d 2022-10-18 21:27:58 UTC
(In reply to Nicolas Fella from comment #3)
> For crashes we need a backtrace
> 
> Please see
> https://community.kde.org/Guidelines_and_HOWTOs/Debugging/
> How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl
> and try to obtain a backtrace for kwin_wayland

(gdb) bt
#0  0x00007f29b06d3ccc in __pthread_kill_implementation () from /lib64/libc.so.6
#1  0x00007f29b0683aa6 in raise () from /lib64/libc.so.6
#2  0x00007f29b066d7fc in abort () from /lib64/libc.so.6
#3  0x00007f29b0b084d5 in QMessageLogger::fatal(char const*, ...) const () from /lib64/libQt5Core.so.5
#4  0x00007f29b19d141b in QGuiApplicationPrivate::createPlatformIntegration() () from /lib64/libQt5Gui.so.5
#5  0x00007f29b19d18c8 in QGuiApplicationPrivate::createEventDispatcher() () from /lib64/libQt5Gui.so.5
#6  0x00007f29b0d05ab1 in QCoreApplicationPrivate::init() () from /lib64/libQt5Core.so.5
#7  0x00007f29b19d3c83 in QGuiApplicationPrivate::init() () from /lib64/libQt5Gui.so.5
#8  0x00007f29b260b31d in QApplicationPrivate::init() () from /lib64/libQt5Widgets.so.5
#9  0x000055e92c3efd23 in main (argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/xdg-desktop-portal-kde-5.26.0-1.fc37.x86_64/src/xdg-desktop-portal-kde.cpp:25

Hope this helps.
Comment 5 Aki 2022-10-19 04:51:09 UTC
I encountered this error too with nvidia card.
It does not happens if I switch to intel igpu.

Below is the stacktrace of kwin_wayland.

0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007f14c5e3bc46 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007f14c5e227fc in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007f14c7d8bcaa in  () at /lib/x86_64-linux-gnu/libepoxy.so.0
#6  0x00007f14c7d8bcf0 in  () at /lib/x86_64-linux-gnu/libepoxy.so.0
#7  0x00007f14c7d8dd62 in  () at /lib/x86_64-linux-gnu/libepoxy.so.0
#8  0x0000564066424099 in KWin::querySupportedModifiers (format=875713089, eglDisplay=0x5640669a7220)
    at /home/aki/kde/src/kwin/src/plugins/screencast/screencaststream.cpp:323
#9  KWin::ScreenCastStream::createStream() (this=this@entry=0x564066ba5a50) at /home/aki/kde/src/kwin/src/plugins/screencast/screencaststream.cpp:344
#10 0x00005640664247b8 in KWin::ScreenCastStream::init() (this=this@entry=0x564066ba5a50)
    at /home/aki/kde/src/kwin/src/plugins/screencast/screencaststream.cpp:295
#11 0x000056406641ca40 in KWin::ScreencastManager::integrateStreams(KWaylandServer::ScreencastStreamV1Interface*, KWin::ScreenCastStream*)
    (this=<optimized out>, waylandStream=0x564067230e60, stream=0x564066ba5a50)
    at /home/aki/kde/src/kwin/src/plugins/screencast/screencastmanager.cpp:201
#12 0x000056406641cc74 in KWin::ScreencastManager::streamOutput(KWaylandServer::ScreencastStreamV1Interface*, KWin::Output*, KWaylandServer::ScreencastV1Interface::CursorMode) (this=<optimized out>, waylandStream=<optimized out>, streamOutput=<optimized out>, mode=<optimized out>)
    at /home/aki/kde/src/kwin/src/plugins/screencast/screencastmanager.cpp:148
#13 0x000056406641cdab in KWin::ScreencastManager::streamVirtualOutput(KWaylandServer::ScreencastStreamV1Interface*, QString const&, QSize const&, double, KWaylandServer::ScreencastV1Interface::CursorMode)
    (this=<optimized out>, stream=0x564067230e60, name=<optimized out>, size=<optimized out>, scale=<optimized out>, mode=KWaylandServer::ScreencastV1Interface::Metadata) at /home/aki/kde/src/kwin/src/plugins/screencast/screencastmanager.cpp:114
#14 0x00007f14c70f36ff in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007f14c8b9da7f in KWaylandServer::ScreencastV1Interface::virtualOutputScreencastRequested(KWaylandServer::ScreencastStreamV1Interface*, QString const&, QSize const&, double, KWaylandServer::ScreencastV1Interface::CursorMode) (this=this@entry=0x564066b55bc0, _t1=<optimized out>, 
    _t1@entry=0x564067230e60, _t2=..., _t3=..., _t4=<optimized out>, _t4@entry=1, _t5=<optimized out>, 
    _t5@entry=KWaylandServer::ScreencastV1Interface::Metadata)
    at /home/aki/kde/build/kwin/src/kwin_autogen/IEXH3JLKNG/moc_screencast_v1_interface.cpp:342
#16 0x00007f14c8e402b4 in KWaylandServer::ScreencastV1InterfacePrivate::zkde_screencast_unstable_v1_stream_virtual_output(QtWaylandServer::zkde_screencast_unstable_v1::Resource*, unsigned int, QString const&, int, int, int, unsigned int)
    (this=<optimized out>, resource=0x5640670a2870, streamid=32, name=..., width=<optimized out>, height=<optimized out>, scale=256, pointer=4)
    at /home/aki/kde/src/kwin/src/wayland/screencast_v1_interface.cpp:88
#17 0x00007f14c8eec85a in QtWaylandServer::zkde_screencast_unstable_v1::handle_stream_virtual_output(wl_client*, wl_resource*, unsigned int, char const*, int, int, int, unsigned int)
    (client=<optimized out>, resource=<optimized out>, stream=32, name=0x5640670a4570 "fake", width=1920, height=1080, scale=256, pointer=4)
--Type <RET> for more, q to quit, c to continue without paging--
   awn/kde/build/kwin/src/wayland/qwayland-server-zkde-screencast-unstable-v1.cpp:298
#18 0x00007f14c42e8e2e in  () at /lib/x86_64-linux-gnu/libffi.so.8
#19 0x00007f14c42e5493 in  () at /lib/x86_64-linux-gnu/libffi.so.8
#20 0x00007f14c5a442a0 in  () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#21 0x00007f14c5a48694 in  () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#22 0x00007f14c5a470fa in wl_event_loop_dispatch () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#23 0x00007f14c8e16109 in KWaylandServer::Display::dispatchEvents() (this=<optimized out>) at /home/aki/kde/src/kwin/src/wayland/display.cpp:114
#24 0x00007f14c70f36ff in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007f14c70f6b83 in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007f14c70f73b5 in QSocketNotifier::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007f14c676bf32 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007f14c70bae38 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007f14c7111e2b in QEventDispatcherUNIXPrivate::activateSocketNotifiers() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x00007f14c7112317 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00005640664e42f1 in QUnixEventDispatcherQPA::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
#32 0x00007f14c70b97cb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#33 0x00007f14c70c1c2a in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00005640663f2b94 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/aki/kde/src/kwin/src/main_wayland.cpp:613
Comment 6 Zamundaaa 2022-10-20 12:31:52 UTC
https://invent.kde.org/plasma/kwin/-/merge_requests/3077 should fix it
Comment 7 Zamundaaa 2022-11-02 16:51:30 UTC
Git commit 84635c71ec3b0b66e0276fedf0625e232fa07809 by Xaver Hugl.
Committed on 02/11/2022 at 16:10.
Pushed by zamundaaa into branch 'master'.

plugins/screencast: centralize format querying into the RenderBackend

M  +7    -0    src/core/renderbackend.cpp
M  +2    -0    src/core/renderbackend.h
M  +8    -0    src/platformsupport/scenes/opengl/abstract_egl_backend.cpp
M  +1    -0    src/platformsupport/scenes/opengl/abstract_egl_backend.h
M  +15   -6    src/platformsupport/scenes/opengl/egl_dmabuf.cpp
M  +4    -5    src/platformsupport/scenes/opengl/egl_dmabuf.h
M  +2    -18   src/plugins/screencast/screencaststream.cpp

https://invent.kde.org/plasma/kwin/commit/84635c71ec3b0b66e0276fedf0625e232fa07809
Comment 8 Zamundaaa 2022-11-02 17:51:06 UTC
Git commit 4dada2819334c93a42db160af3d489fa6375abc7 by Xaver Hugl.
Committed on 02/11/2022 at 17:50.
Pushed by zamundaaa into branch 'Plasma/5.26'.

plugins/screencast: centralize format querying into the RenderBackend
(cherry picked from commit 84635c71ec3b0b66e0276fedf0625e232fa07809)

M  +7    -0    src/core/renderbackend.cpp
M  +2    -0    src/core/renderbackend.h
M  +8    -0    src/platformsupport/scenes/opengl/abstract_egl_backend.cpp
M  +1    -0    src/platformsupport/scenes/opengl/abstract_egl_backend.h
M  +16   -7    src/platformsupport/scenes/opengl/egl_dmabuf.cpp
M  +4    -5    src/platformsupport/scenes/opengl/egl_dmabuf.h
M  +2    -18   src/plugins/screencast/screencaststream.cpp

https://invent.kde.org/plasma/kwin/commit/4dada2819334c93a42db160af3d489fa6375abc7