SUMMARY Since Plasma 5.25, kwin_wayland no longer displays anything on the monitors in DRM mode. It seems to start up but the monitors are getting no signal, and hangs forever until killed. The same issue occurs with only one monitor connected. The log shows these lines: kwin_wayland_drm: Failed to find a working setup for new outputs! kwin_wayland_drm: Applying KScreen config failed! STEPS TO REPRODUCE 1. Start kwin_wayland from display manager or TTY (e.g. 'kwin_wayland konsole') OBSERVED RESULT Screens get no video output EXPECTED RESULT Screens display graphical interface SOFTWARE/OS VERSIONS Operating System: Gentoo Linux 2.8 KDE Plasma Version: 5.25.0 KDE Frameworks Version: 5.95.0 Qt Version: 5.15.4 Kernel Version: 5.18.5-gentoo-dist (64-bit) Graphics Platform: X11 Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor Memory: 23.4 GiB of RAM Graphics Processor: AMD Radeon RX Vega Manufacturer: Micro-Star International Co., Ltd. Product Name: MS-7C56 System Version: 2.0 ADDITIONAL INFORMATION Log of 'kwin_wayland konsole': No backend specified through command line argument, trying auto resolution MESA-LOADER: failed to open simpledrm: /usr/lib64/dri/simpledrm_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri, suffix _dri) failed to load driver: simpledrm MESA-LOADER: failed to open zink: /usr/lib64/dri/zink_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri, suffix _dri) failed to load driver: zink kf.globalaccel.kglobalacceld: Failed to register service org.kde.kglobalaccel OpenGL vendor string: AMD OpenGL renderer string: AMD Radeon RX Vega (vega10, LLVM 14.0.5, DRM 3.46, 5.18.5-gentoo-dist) OpenGL version string: 4.6 (Core Profile) Mesa 22.1.2 OpenGL shading language version string: 4.60 Driver: Unknown GPU class: Unknown OpenGL version: 4.6 GLSL version: 4.60 Mesa version: 22.1.2 Linux kernel version: 5.18.5 Requires strict binding: no GLSL shaders: yes Texture NPOT support: yes Virtual Machine: no kwin_wayland_drm: Failed to find a working setup for new outputs! kwin_wayland_drm: Applying KScreen config failed! Couldn't start kglobalaccel from org.kde.kglobalaccel.service: QDBusError("org.freedesktop.DBus.Error.Disconnected", "Not connected to D-Bus server") kwin_xkbcommon: XKB: inet:323:58: unrecognized keysym "XF86EmojiPicker" kwin_xkbcommon: XKB: inet:324:58: unrecognized keysym "XF86Dictate" qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: minimal, offscreen, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb
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!