Bug 462198

Summary: kwin_wayland crashes after unplugging external USB-C monitor and closing the laptop lid
Product: [Plasma] kwin Reporter: Robert <robertdejager>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: nate
Priority: NOR    
Version First Reported In: 5.26.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.27
Sentry Crash Report:

Description Robert 2022-11-24 12:48:08 UTC
My Wayland session crashes when I close the laptop lid, but only after I have unplugged my external monitor, connected through a USB-C dock.
This happens every time I try.
Sometimes it also crashes when I plug the monitor back in.
***
Will update when I can
***


STEPS TO REPRODUCE
1. Plug in USB-C dock with external monitor in HDMI port (or boot up with the external monitor connected)
2. Unplug the USB-C dock
3. Close the lid (or have it closed while unplugging the dock)
4. Open the lid, if you're fast enough you'll still see the terminal before kwin_wayland restarts itself
4a. Note, the session itself is still live, so no need to log in again using SDDM.
4b. If I have the lid closed while unplugging the screen, the session is locked like it is supposed to.
       In the other scenario, it isn't.

OBSERVED RESULT
kwin_wayland has crashed, taking all applications running on top with it.


EXPECTED RESULT
Locked session, and all my application are still running


SOFTWARE/OS VERSIONS
Arch Linux (Linux 6.0.9)
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
This could be a duplicate of https://bugs.kde.org/show_bug.cgi?id=390306, I'm not sure
Comment 1 Robert 2022-11-24 16:04:26 UTC
I'm afraid I'm going to need some help with the backtrace.
The instructions on the community page cover crashing applications.

Can someone tell me what to run?
Comment 2 Nate Graham 2022-11-30 04:31:52 UTC
Try `coredumpctl debug kwin_wayland`.
Comment 3 Robert 2022-12-05 09:45:36 UTC
Sorry for the late reaction.

After your comment, I upgraded to plasma 5.26.4 before I could try to reproduce.
Since then, it worked ok on my 1080p monitor at home.
I tried a few times on the 4k monitor at work, also switched back and forth without issue.

The last attempt produced the crash.
Unfortunately, "coredumpctl debug kwin_wayland" resulted in a "No match found."
Comment 4 Bug Janitor Service 2022-12-20 05:14:14 UTC
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!
Comment 5 Robert 2022-12-20 09:28:13 UTC
The issue still presents itself sometimes after reconnecting the external monitor.
Does anyone have any idea how to extract some useful information after it happens?
Comment 6 Nate Graham 2022-12-23 22:12:36 UTC
Hmm, that's hard to say if there's no crash log.

Fortunately, a big multiscreen refactor landed in the upcoming Plasma 5.27. There's a good chance that work fixed this issue. Let's mark this bug as fixed, and if you still experience it after upgrading to Plasma 5.27, feel free to re-open it.

Thanks a lot!
Comment 7 Robert 2022-12-25 10:25:08 UTC
Ok, I'll wait until 5.27 lands, and try to update this ticket then.
Happy holidays.