Summary: | kwin_wayland_drm: Failed to find a working setup for new outputs! | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Marco Rebhan <me> |
Component: | platform-drm | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | asturm, hyunkang2019, nate, vincent, xaver.hugl, zawertun |
Priority: | VHI | Keywords: | regression |
Version: | 5.25.0 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/commit/978fbd276366ab59cb7190778cf9521e5f2ff63c | Version Fixed In: | 5.25.5 |
Sentry Crash Report: | |||
Attachments: |
dmesg-drm-debug.log
kwin-drm-debug.log dmesg DRM log, Plasma 5.25.3 kwin log, Plasma 5.25.3 GDB log of kwin crash |
Description
Marco Rebhan
2022-06-18 08:09:23 UTC
A git bisect shows c65c8223 "backends/drm: refactor buffer management" to be the first bad commit. https://invent.kde.org/plasma/kwin/-/commit/c65c82239269c2db03e1e27c1b1262665cbdff66 Can you run the script at https://invent.kde.org/plasma/kwin/-/wikis/Debugging-DRM-issues in a tty and upload the two log files it generates? Created attachment 150042 [details]
dmesg-drm-debug.log
Created attachment 150043 [details]
kwin-drm-debug.log
Ok, this is almost certainly a duplicate of bug 454086. Please test again with 5.25.1 With 5.25.1, I get a black background and the mouse cursor but nothing else. The log contains these lines: kwin_wayland_drm: Could not create drm framebuffer! Invalid argument kwin_wayland_drm: Could not create drm framebuffer! Invalid argument kwin_wayland_drm: Failed to create gamma blob! Invalid argument kwin_wayland_drm: Failed to create a gbm surface! The Wayland connection broke. Did the Wayland compositor die? I should probably create a new bug for that, right? (In reply to Marco Rebhan from comment #6) > With 5.25.1, I get a black background and the mouse cursor but nothing else. > The log contains these lines: > > kwin_wayland_drm: Could not create drm framebuffer! Invalid argument > kwin_wayland_drm: Could not create drm framebuffer! Invalid argument > kwin_wayland_drm: Failed to create gamma blob! Invalid argument > kwin_wayland_drm: Failed to create a gbm surface! > The Wayland connection broke. Did the Wayland compositor die? > > I should probably create a new bug for that, right? same here. :( Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! Ah right, I guess I should change this back to Reported or what it was before? Did you test 5.25.3 already? (In reply to Andreas Sturmlechner from comment #10) > Did you test 5.25.3 already? That one gives me a slightly different error yet again: > kwin_wayland_drm: Failed to create framebuffer for multi-gpu: Invalid argument > kwin_wayland_drm: Failed to create framebuffer for CPU import: Invalid argument > kwin_wayland_drm: Failed to create gamma blob! Invalid argument And as with 5.25.1, only a black screen with cursor. I'll upload the new log files. Created attachment 150763 [details]
dmesg DRM log, Plasma 5.25.3
Created attachment 150764 [details]
kwin log, Plasma 5.25.3
afaict, the warnings are about the kernel failing our request to create buffers for the cursor; KWin just falls back to a software cursor in that case. When you have the black screen with a cursor, can you move it around? Also, can you still start apps with shortcuts? Created attachment 150900 [details]
GDB log of kwin crash
Yes, I can move the cursor around. I can't start anything directly from kwin, since it doesn't run the argument you pass to it from the command line in this state and none of the shortcuts work (tried meta+e, alt+space, and meta+enter which I've bound to open konsole). What I could do is run a program from a SSH shell (kwin segfaults if I switch to another TTY) such as dolphin:
WAYLAND_DISPLAY=wayland-0 QT_QPA_PLATFORM=wayland dolphin
It does show up and I can interact with it using the keyboard, but as soon as my mouse cursor gets within maybe 20 pixels of the window, kwin segfaults. According to GDB (see attached log), it has to do with the cursor.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2779 that MR should fix the crash you're seeing. Is the segfault when you switch to a different tty the same, or does it crash somewhere else? Marco, are you able to test that merge request? That would be very helpful. I hope I can test it by tomorrow. (In reply to Marco Rebhan from comment #19) > I hope I can test it by tomorrow. You probably know anyway, but just in case: https://wiki.gentoo.org/wiki//etc/portage/patches That patch does indeed fix it. Thanks! (In reply to Andreas Sturmlechner from comment #20) > (In reply to Marco Rebhan from comment #19) > > I hope I can test it by tomorrow. > You probably know anyway, but just in case: > https://wiki.gentoo.org/wiki//etc/portage/patches I knew about this, but thanks. The patch didn't apply on top of the latest kwin release though, so I had to use the live ebuild. Git commit 9f41620b77013258fb84136082693febd365d6b7 by Xaver Hugl. Committed on 09/08/2022 at 20:18. Pushed by zamundaaa into branch 'master'. backends/drm: don't crash if beginFrame fails M +1 -1 src/backends/drm/drm_egl_cursor_layer.cpp M +1 -1 src/backends/drm/drm_egl_cursor_layer.h M +1 -1 src/backends/drm/drm_egl_layer.cpp M +1 -1 src/backends/drm/drm_egl_layer.h M +5 -5 src/backends/drm/drm_egl_layer_surface.cpp M +1 -1 src/backends/drm/drm_egl_layer_surface.h M +13 -14 src/backends/drm/drm_output.cpp M +5 -5 src/backends/drm/drm_qpainter_layer.cpp M +3 -3 src/backends/drm/drm_qpainter_layer.h M +3 -3 src/backends/drm/drm_virtual_egl_layer.cpp M +1 -1 src/backends/drm/drm_virtual_egl_layer.h M +1 -1 src/backends/virtual/virtual_egl_backend.cpp M +1 -1 src/backends/virtual/virtual_egl_backend.h M +1 -1 src/backends/virtual/virtual_qpainter_backend.cpp M +2 -2 src/backends/virtual/virtual_qpainter_backend.h M +1 -1 src/backends/wayland/wayland_egl_backend.cpp M +1 -1 src/backends/wayland/wayland_egl_backend.h M +1 -1 src/backends/wayland/wayland_qpainter_backend.cpp M +1 -1 src/backends/wayland/wayland_qpainter_backend.h M +1 -1 src/backends/x11/standalone/x11_standalone_egl_backend.cpp M +1 -1 src/backends/x11/standalone/x11_standalone_egl_backend.h M +1 -1 src/backends/x11/standalone/x11_standalone_glx_backend.cpp M +1 -1 src/backends/x11/standalone/x11_standalone_glx_backend.h M +1 -1 src/backends/x11/windowed/x11_windowed_egl_backend.cpp M +1 -1 src/backends/x11/windowed/x11_windowed_egl_backend.h M +1 -1 src/backends/x11/windowed/x11_windowed_qpainter_backend.cpp M +1 -1 src/backends/x11/windowed/x11_windowed_qpainter_backend.h M +8 -6 src/composite.cpp M +2 -1 src/outputlayer.h https://invent.kde.org/plasma/kwin/commit/9f41620b77013258fb84136082693febd365d6b7 Git commit 978fbd276366ab59cb7190778cf9521e5f2ff63c by Xaver Hugl. Committed on 09/08/2022 at 22:25. Pushed by zamundaaa into branch 'Plasma/5.25'. backends/drm: don't crash if beginFrame fails (cherry picked from commit 9f41620b77013258fb84136082693febd365d6b7) M +2 -2 src/backends/drm/drm_lease_egl_gbm_layer.cpp M +1 -1 src/backends/drm/drm_lease_egl_gbm_layer.h M +13 -14 src/backends/drm/drm_output.cpp M +7 -7 src/backends/drm/drm_qpainter_layer.cpp M +4 -4 src/backends/drm/drm_qpainter_layer.h M +1 -1 src/backends/drm/egl_gbm_cursor_layer.cpp M +1 -1 src/backends/drm/egl_gbm_cursor_layer.h M +1 -1 src/backends/drm/egl_gbm_layer.cpp M +1 -1 src/backends/drm/egl_gbm_layer.h M +5 -5 src/backends/drm/egl_gbm_layer_surface.cpp M +1 -1 src/backends/drm/egl_gbm_layer_surface.h M +3 -3 src/backends/drm/virtual_egl_gbm_layer.cpp M +1 -1 src/backends/drm/virtual_egl_gbm_layer.h M +1 -1 src/backends/virtual/egl_gbm_backend.cpp M +1 -1 src/backends/virtual/egl_gbm_backend.h M +1 -1 src/backends/virtual/scene_qpainter_virtual_backend.cpp M +1 -2 src/backends/virtual/scene_qpainter_virtual_backend.h M +1 -1 src/backends/wayland/egl_wayland_backend.cpp M +1 -1 src/backends/wayland/egl_wayland_backend.h M +1 -1 src/backends/wayland/scene_qpainter_wayland_backend.cpp M +1 -1 src/backends/wayland/scene_qpainter_wayland_backend.h M +1 -1 src/backends/x11/standalone/eglbackend.cpp M +1 -1 src/backends/x11/standalone/eglbackend.h M +1 -1 src/backends/x11/standalone/glxbackend.cpp M +1 -1 src/backends/x11/standalone/glxbackend.h M +1 -1 src/backends/x11/windowed/egl_x11_backend.cpp M +1 -1 src/backends/x11/windowed/egl_x11_backend.h M +1 -1 src/backends/x11/windowed/scene_qpainter_x11_backend.cpp M +1 -1 src/backends/x11/windowed/scene_qpainter_x11_backend.h M +8 -6 src/composite.cpp M +2 -1 src/outputlayer.h https://invent.kde.org/plasma/kwin/commit/978fbd276366ab59cb7190778cf9521e5f2ff63c Does the patch only fix the specific crash you mentioned, or is the session working properly now? (In reply to Zamundaaa from comment #24) > Does the patch only fix the specific crash you mentioned, or is the session > working properly now? Yep, the session is working properly now. It also isn't segfaulting anymore when I change tty. Great! |