Kwin dumps core when resuming from suspend (seems worse on 6.15.10)

With kernel version 6.15.10 on F42 KDE, I’ve had several crashes where, after resuming from suspend, kwin dumps core and all my windows have died.

This doesn’t happen on every resume, but often enough to be a problem. (I think I’ve had it 4 times in the last couple of days.)

When I switch back to booting from kernel 6.15.9, I don’t get the issue. So I’ll just boot from that kernel for now, but of course it would be good to work out what is broken and how to fix it.

Has anyone else seen similar crashes on 6.15.10? This might narrow down what is causing it. I’m using an NVidia 3060 Ti with the open-kernel drivers, and dual monitors, so I wonder if one or both of those things is relevant.

Fuller log available here. Here I’ll just post the top of the stack trace:

Aug 24 09:50:12 systemd-coredump[6648]: Process 2542 (kwin_wayland) of user 1000 dumped core.

                                        Module /usr/bin/kwin_wayland from rpm kwin-6.4.4-2.fc42.x86_64
                                        Module libspa-videoconvert.so from rpm pipewire-1.4.7-1.fc42.x86_64
                                        Module kimg_rgb.so from rpm kf6-kimageformats-6.17.0-1.fc42.x86_64
                                        Module kimg_sct.so from rpm kf6-kimageformats-6.17.0-1.fc42.x86_64
                                        Module libqwbmp.so from rpm qt6-qtimageformats-6.9.1-1.fc42.x86_64
                                        Module libjasper.so.7 from rpm jasper-4.2.3-3.fc42.x86_64
                                        Module libraw.so.23 from rpm LibRaw-0.21.4-1.fc42.x86_64
                                        Module kimg_raw.so from rpm kf6-kimageformats-6.17.0-1.fc42.x86_64
                                        Module libjxl_cms.so.0.11 from rpm jpegxl-0.11.1-4.fc42.x86_64
                                        Module libjxl_threads.so.0.11 from rpm jpegxl-0.11.1-4.fc42.x86_64
                                        Module libjxl.so.0.11 from rpm jpegxl-0.11.1-4.fc42.x86_64

Cross-reference to KDE forum post: With Fedora 42 kernel 6.15.10, kwin dumps core when resuming from suspend - Help - KDE Discuss

Update: I’ve now observed this once with kernel 6.15.9 (in several days of usage, so much lower frequency than 6.15.10).

Stack trace at kwin crash on kernel 6.15.9 - Pastebin Service

Some highlights:

Aug 26 15:58:29 kwin_wayland[2524]: kwin_scene_opengl: Could not delete texture because no context is current
Aug 26 15:58:29 kwin_wayland[2524]: kwin_scene_opengl: Could not delete framebuffer because no context is current
Aug 26 15:58:29 kwin_wayland[2524]: kwin_scene_opengl: Could not delete texture because no context is current
Aug 26 15:58:29 kwin_wayland[2524]: kwin_scene_opengl: Could not delete vertex buffer because no context is current
Aug 26 15:58:29 kwin_wayland[2524]: kwin_scene_opengl: Could not delete texture because no context is current
Aug 26 15:58:31 kwin_wayland[2524]: No QSGTexture provided from updateSampledImage(). This is wrong.
Aug 26 15:58:31 kwin_wayland[2524]: No QSGTexture provided from updateSampledImage(). This is wrong.
Aug 26 15:58:31 kwin_wayland[2524]: kwin_xwl: Could not find a matching X RandR CRTC/output to set as primary for KWin::DrmOutput(0x559da67477f0, name="DP-2", geometry=QRect(0,0 1920x1080), scale=1)
Aug 26 15:58:31 kwin_wayland[2524]: kwin_xwl: Could not find a matching X RandR CRTC/output to set as primary for KWin::DrmOutput(0x559da67477f0, name="DP-2", geometry=QRect(0,0 1920x1080), scale=1)
Aug 26 15:58:31 kwin_wayland[2524]: kwin_xwl: Could not find a matching X RandR CRTC/output to set as primary for KWin::DrmOutput(0x559da67477f0, name="DP-2", geometry=QRect(0,0 1920x1080), scale=1)
Aug 26 15:58:31 kwin_wayland[2524]: kwin_xwl: Could not find a matching X RandR CRTC/output to set as primary for KWin::DrmOutput(0x559da67477f0, name="DP-2", geometry=QRect(0,0 1920x1080), scale=1)
Aug 26 15:58:31 kwin_wayland_wrapper[2524]: KCrash: Application 'kwin_wayland' crashing... crashRecursionCounter = 2
Aug 26 15:58:32 systemd-coredump[62847]: Process 2524 (kwin_wayland) of user 1000 dumped core.
                                         
                                         Module /usr/bin/kwin_wayland from rpm kwin-6.4.4-2.fc42.x86_64
                                         Module KirigamiPlasmaStyle.so from rpm libplasma-6.4.4-1.fc42.x86_64
                                         Module kimg_rgb.so from rpm kf6-kimageformats-6.17.0-1.fc42.x86_64
                                         Module kimg_sct.so from rpm kf6-kimageformats-6.17.0-1.fc42.x86_64
                                         Module libqwbmp.so from rpm qt6-qtimageformats-6.9.1-1.fc42.x86_64

This issue seems to have disappeared when I stopped using JPG wallpaper on my desktop and lockscreen and just used a solid colour instead.

I’m still not clear why this started happening for me when it did, and why no one else seems to have the same. Some subtle interaction between kernel, NVIDIA drivers and having multiple screens? (There are definitely other cases of NVIDIA drivers having trouble resuming properly with multiple screens but I haven’t seen another report with the same symptoms of mine.)

As 6.16.3 is available now, I’ll upgrade the kernel and see if I can safely restore the wallpaper with that version.

Still an issue on 6.16.3.

Through some combination of upgrades, this is no longer an issue. I have brought back my JPG wallpaper and don’t get the crashes anymore.

With kernel 6.16.7, Nvidia driver 580.82.09 and Plasma 6.4.4 and 6.4.5 everything works fine, though I’m not exactly sure what changed to make it so.