Bug 480812 - kwin wayland intermitently crashes when locking the screen
Summary: kwin wayland intermitently crashes when locking the screen
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.93.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6, wayland-only
Depends on:
Blocks:
 
Reported: 2024-02-03 22:52 UTC by gtpepi
Modified: 2024-02-06 20:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gtpepi 2024-02-03 22:52:28 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Use plasma
2. Hit Meta+L
3. Screen goes blank only showing the mouse, unable to log into GUI again

OBSERVED RESULT
Sometimes when manually locking the screen, instead of showing the lock screen, the entire GUI crashes. These are the relevant logs from when the crash happened and I could precise the time to grep them:

Feb 03 19:31:47 arch plasmashell[4618]: file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Desktop.qml:306: TypeError: Cannot read property 'width' of null
Feb 03 19:31:47 arch plasmashell[4618]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml:136: TypeError: Cannot read property 'screenGeometry' of null
Feb 03 19:31:47 arch plasmashell[4618]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml:250: TypeError: Cannot read property 'plasmoid' of undefined
Feb 03 19:31:48 arch systemd[4431]: plasma-plasmashell.service: Consumed 8.583s CPU time.
Feb 03 19:31:48 arch systemd[4431]: Started dbus-:1.4-org.kde.KSplash@1.service.
Feb 03 19:32:33 arch systemd[4431]: Starting KRunner...
Feb 03 19:32:33 arch systemd[4431]: Started KRunner.
Feb 03 19:32:33 arch krunner[7373]: QObject::startTimer: Timers cannot be started from another thread
Feb 03 19:32:34 arch krunner[7373]: qt.qpa.wayland.textinput: virtual void QtWaylandClient::QWaylandTextInputv3::zwp_text_input_v3_leave(wl_surface*) Got leave event for surface 0x0 focused surface 0x58d42c0885e0
Feb 03 19:32:36 arch kwin_wayland[4496]: kwin_core: Cannot grant a token to KWin::ClientConnection(0x5cdc1b552f20)
Feb 03 19:32:41 arch kwin_wayland[4496]: QProcess::start: Process is already running
Feb 03 19:32:47 arch systemd[1]: Created slice Slice /system/getty.
Feb 03 19:32:47 arch systemd[1]: Started Getty on tty2.


EXPECTED RESULT
Lockscreen should work as usual

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
6.7.3-zen-1-1-zen
(available in About System)
KDE Plasma Version: 5.93.0
KDE Frameworks Version:  5.249.0
Qt Version:  6.7.0

ADDITIONAL INFORMATION
Some time before the crash there is also some PAM errors: 
Feb 03 19:31:12 arch kscreenlocker_greet[6899]: PAM unable to dlopen(/usr/lib/security/pam_pkcs11.so): /usr/lib/security/pam_pkcs11.so: cannot open shared object file: No such file or directory
Feb 03 19:31:12 arch kscreenlocker_greet[6899]: PAM adding faulty module: /usr/lib/security/pam_pkcs11.so
Feb 03 19:31:12 arch kscreenlocker_greet[6899]: PAM unable to dlopen(/usr/lib/security/pam_fprintd.so): /usr/lib/security/pam_fprintd.so: cannot open shared object file: No such file or directory
Feb 03 19:31:12 arch kscreenlocker_greet[6899]: PAM adding faulty module: /usr/lib/security/pam_fprintd.so
Comment 1 gtpepi 2024-02-03 23:09:26 UTC
PAM errors are also happening when the lockscreen succeedes, so I do'nt think they're related
Comment 2 gtpepi 2024-02-04 19:58:44 UTC
Switched back to 5.27 and this doesn't seem to happen.
Comment 3 Vlad Zahorodnii 2024-02-06 11:50:19 UTC
If you switch to another tty and run "loginctl unlock-session 2" (the session id might be different on your machine), is the black screen gone?
Comment 4 Nate Graham 2024-02-06 20:43:03 UTC
Those PAM errors indicate a setup issue on your machine. The screen locker needs those modules to be present and functional, but it looks like on your machine they are not.