Bug 476677

Summary: KDE components don't shutdown cleanly on logout/reboot/shutdown
Product: [Plasma] plasmashell Reporter: Jin Liu <ad.liu.jin>
Component: Session ManagementAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kdelibs-bugs-null, nate
Priority: NOR    
Version First Reported In: 5.27.9   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.0
Sentry Crash Report:
Attachments: log

Description Jin Liu 2023-11-07 13:31:52 UTC
Created attachment 162929 [details]
log

SUMMARY
From the system journal (see attachment), I can see that various KDE components (kded, plasmashell, etc.) die with the "The Wayland connection broke. Did the Wayland compositor die?" message. So it looks like kwin begins shutting down too early, preventing these components from cleanly shutdown.

This causes kded unable to save bluetooth state on shutdown.

STEPS TO REPRODUCE
1. reboot
2. journalctl -b -1
3. search for "Logout"

OBSERVED RESULT
Plenty of "The Wayland connection broke. Did the Wayland compositor die?" errors a few screens below.

EXPECTED RESULT
No such errors.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Kernel Version: 6.5.9-arch2-1 (64-bit)
Graphics Platform: offscreen
Processors: 12 × AMD Ryzen 5 5600H with Radeon Graphics
Memory: 13.5 GiB of RAM
Graphics Processor: AMD Radeon Graphics

ADDITIONAL INFORMATION
Wayland
sddm.conf:
[General]
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell

[Wayland]
CompositorCommand=kwin_wayland --no-lockscreen[Autologin]
Relogin=false
Session=plasmawayland
User=jin

[General]
HaltCommand=/usr/bin/systemctl poweroff
Numlock=none
RebootCommand=/usr/bin/systemctl reboot

[Theme]
Current=
CursorTheme=breeze_cursors
Font=Noto Sans,10,-1,0,50,0,0,0,0,0

[Users]
MaximumUid=65000
MinimumUid=1000

[X11]
ServerArguments=-dpi 240
Comment 1 Nate Graham 2023-11-09 20:31:38 UTC
This has already been fixed for Plasma 6, thankfully.