Bug 464092

Summary: Shutdown sequence causes system apps to try to stay alive
Product: [Plasma] plasmashell Reporter: james.yeoman
Component: Startup processAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: minor CC: kde, nate
Priority: NOR    
Version First Reported In: 5.24.7   
Target Milestone: 1.0   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description james.yeoman 2023-01-10 10:40:19 UTC
SUMMARY
[gist of journalctl output](https://gist.github.com/james-yeoman/c768634397f621ca13b433b3d560c8b0)

This issue has been going on for months. My laptop shouldn't be taking as long as it takes to shutdown. I've got a Thinkpad X1 Yoga (so decent specs), but it usually takes around 1.5 to 2 minutes to shutdown. When I click shutdown, the display server clearly terminates, but the tty ends up having several @ symbols being printed, and the shutdown process takes a while.

I finally decided to investigate the logs and found quite a few things that surprised me. The notable ones are the fact that SDDM doesn't cleanly exit, drkonqi desperately tries to restart, SDDM restarts, encrypted drive fails to be deactivated, and the final shutdown steps proceed anyway.

It's still worth checking out my gist, because there was additional stuff that I missed out, but those are my personal highlights.

I believe the SDDM crash is at least a significant part in the cascade of shutdown struggles, but it could be a number of different factors.

I tagged this as a Startup Process issue, because I couldn't find a Shutdown Process issue type, and I think that shutdown is in a similar realm to startup. If this is incorrect, then please re-tag it.

OBSERVED RESULT
Shutdown takes a significant amount of time to complete, and it appears the reason is core system services crashing before everything has cleanly exited

EXPECTED RESULT
Shutdown shouldn't take as long as it does, apps shouldn't crash and try to relaunch during shutdown, and encrypted drives should be waited on before proceeding with deactivating and unmounting


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-01-10 16:58:37 UTC
The DrKonqi issue has been fixed for Plasma 5.27, but the primary issue is SDDM, which is has already been fixed upstream. We're just waiting for a new SDDM release. Looking at the logs, some remaining issues are Systemd issues which are fixed by a newer systemd that what you probably have, being a user of an LTS distro.