Bug 489130

Summary: Screenlocker breaks on wake
Product: [Plasma] plasmashell Reporter: jonathansimon
Component: Screen lockingAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: crash CC: natalie_clarius, nate, notmart, vlad.zahorodnii, xaver.hugl
Priority: NOR Keywords: multiscreen, wayland-only
Version First Reported In: 6.2.4   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: system journal surrounding the crash
All the coredumps available
Wider section of journal around the problem

Description jonathansimon 2024-06-24 18:24:57 UTC
Created attachment 170921 [details]
system journal surrounding the crash

SUMMARY
Sometimes, when waking from display sleep/screen lock, kscreenlocker displays a warning that it has crashed and screen unlocking is not functional. It provides a method to switch to another TTY to issue loginctl unlock-session 2 and then return to this TTY. While all well and good that there is a manual workaround, having to do this is decidedly suboptimal. Sometimes wayland has otherwise puked as well and I have to logout and log back in.

I believe this has to do with one of the monitors I'm using (Samsung 32" UJ59 lu32j590uqnxza) because its wake cycle is kind of weird and takes a very long time. The other monitor is a run-of-the-mill Acer. This does not happen when I replace the Samsung monitor with a second identical Acer.

STEPS TO REPRODUCE
1. Have the Samsung monitor attached.
2. Let the computer lock the screen or lock it manually.
3. Wake it up.

OBSERVED RESULT
Often, screenlocker has crashed and the manual workaround is required.

EXPECTED RESULT
kscreenlocker does not crash and I can unlock my session without switching TTYs

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Kernel Version: 6.9.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 24 × 13th Gen Intel® Core™ i7-13700
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7E01
System Version: 4.0

ADDITIONAL INFORMATION
See attached logs for coredump info
Comment 1 Marco Martin 2024-06-25 11:09:17 UTC
is it possible to get a backtrace with coredumpctl?
Comment 2 jonathansimon 2024-06-25 12:32:38 UTC
@marco

dump is quite large so here is a link with the core dump and a matching stack trace. Worth clarifying it's actually plasmashell that is crashing rather than kscreenlocker_greet.

https://drive.proton.me/urls/0NWWQ01G50#yetYJFLEQkj9

As a note, I have switched back to the smaller monitor as this issue was disrupting my work but I can switch back fairly easily to test things.
Comment 3 Nate Graham 2024-06-25 14:10:52 UTC
Plasma crashing won't make the screenlocker crash too. Can you use `coredumpctl --reverse` to look for crashes in kscreenlocker_greet?
Comment 4 jonathansimon 2024-06-25 14:14:52 UTC
@nate

I looked through the whole list prior to submitting that coredump but I have done what you asked. There are no dumps from kscreenlocker_greet. Only plasmashell and a number of other things (vscode, Dropbox, the project I'm working on, etc).
Comment 5 jonathansimon 2024-06-25 14:16:57 UTC
Created attachment 170963 [details]
All the coredumps available
Comment 6 Nate Graham 2024-06-26 20:06:26 UTC
Ok, then kscreenlocker_greet isn't crashing, which means something else is going on.

When you say "kscreenlocker displays a warning that it has crashed and screen unlocking is not functional" did it *actually* say it crashed specifically? Or did it use the word "broken," or some more general language?

I also don't see anything relevant in the attached journal log, unfortunately. There's a Plasma crash (without debug symbols, so nothing I can do with that) but that wouldn't affect the screen locker.
Comment 7 jonathansimon 2024-06-27 10:07:17 UTC
You're right. It doesn't say "crashed," it says "broken"

The screen locker is broken and unlocking is not possible anymore....etc
Comment 8 Nate Graham 2024-06-27 18:45:43 UTC
Ok. Is it reproducible at all? If so, it would be good if we could get a journal log that actually showed anything related to the screen locker happening. Without that or an actual crash, unfortunately there's no information we have to go on.
Comment 9 jonathansimon 2024-06-27 19:36:39 UTC
It's fairly reproducible if I swap monitors back to the Samsung device, which I will do first thing tomorrow morning (New York time). However, I went back a bit in the journal and found the following sequence:

plasmashell crashes
kwin_wayland_wrapper pukes `XWAYLAND: mode -1x-1 is not available` for a while
kscreenlocker_greet segfaults
kscreenlocker_greet (new PID) cannot load because "no Qt platform plugin could be initialized"

See the new log file for the full details.
Comment 10 jonathansimon 2024-06-27 19:37:06 UTC
Created attachment 171098 [details]
Wider section of journal around the problem
Comment 11 jonathansimon 2024-06-29 18:09:20 UTC
Seems like its the same as this from looking at the logs in both reports

https://bugs.kde.org/show_bug.cgi?id=483997
Comment 12 Bug Janitor Service 2024-07-14 03:46:42 UTC Comment hidden (spam)
Comment 13 Nate Graham 2024-07-22 21:50:56 UTC
Thanks for the info. Any ideas, KWin folks?
Comment 14 Nate Graham 2025-05-28 19:13:22 UTC
Jonathan, are you able to reproduce this issue in Plasma 6.3.5 — or even better, in the Plasma 6.4 beta?
Comment 15 jonathansimon 2025-05-28 19:15:42 UTC
Nate, I haven't had this happen in quite some time. However, I also stopped using the monitor mentioned in the original ticket as it had other issues.
Comment 16 Nate Graham 2025-05-28 19:20:12 UTC
Great, thanks for following up. Let's close this until there are any more reports of it, from you or anyone else.

Thanks again!