Bug 486904

Summary: Logout / Reboot / Shutdown only happen with ca. 5-6s latency after clicking button in application launcher/logout screen
Product: [Plasma] plasmashell Reporter: Liz Lee <waynejwoww>
Component: Session ManagementAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: major CC: natalie_clarius, nate
Priority: NOR    
Version: 6.1.0   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Relevant Times
for comparison: full journalctl after invoking "sudo shutdown +0" via terminal

Description Liz Lee 2024-05-11 19:12:36 UTC
Created attachment 169390 [details]
Relevant Times

STEPS TO REPRODUCE
1. Click Logout / Reboot / Shutdown button in application launcher or logout screen.

OBSERVED RESULT
Desired action only happens after a waiting time of ca. 5 to 6 seconds.

EXPECTED RESULT
Desired action should be started immediately.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 40, Kernel 6.8.9-300.fc40.x86_64 
(available in About System)
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION
"shutdown +0" command via terminal executes immediately without any problems. I therefore suppose it has to do with Plasma.

I have attached a logfile. Please notice the 5 second period between the first and the second line, i.e. between myself klicking the button and the OS executing any actions.
Comment 1 Liz Lee 2024-05-11 20:29:49 UTC
After i did some research, i found some users reporting that the issues might be caused by kdewallet.
Since i already had disabled kdewallet a long time ago, i thought maybe i should give it a try nonetheless and activate and subsequently deactivate it.
guess what? the logout / reboot / shutdown buttons suddenly STOPPED WORKING AT ALL.
Comment 2 Liz Lee 2024-05-12 09:06:15 UTC
Yesterday rebooting or shutting down and subsequently booting again did not make the buttons work again.

Today i booted my pc and the buttons do work again, yet with the 5-second-delay.

I did not find a reproducable routine that leads to the buttons being completely ignored yet.

If posting these observations is regarded as spam, please notify me. I just try to document my observations in order to help tracking this one down.
Comment 3 Liz Lee 2024-05-23 09:11:20 UTC
In the meantime i installed Fedora 40 KDE Spin on a third system (this time it's an old intel core i3 3120m system), same problem.

Linux/KDE Plasma: Fedora 40, Kernel 6.8.9-300.fc40.x86_64 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0

on all of these 3 systems it takes exactly 5-6 seconds (measurement range due to my thumb hitting the stopwatch trigger):
ryzen 2700x, 32gb ddr4-3200, nvme pcie 3.0 ssd, radeon r9 380
ryzen 6600hs, 16 gb lpddr 6400, nvme pcie 4.0 ssd, apu graphics
intel core i3 3120m, 8gb ddr3-1600, sata ssd, hd4000 graphics

it also occurred on a virtual machine on which i installed only the the OS (Fedora 40 KDE spin).

i therefore suggest it has to be a timer that is running, because if there was actually some computing going on, the time the old i3 system takes, would obviously be more.
Comment 4 Liz Lee 2024-05-26 06:45:35 UTC
update to Plasma 6.0.5, the problem still exists

KDE Plasma Version: 6.0.5
KDE Frameworks: 6.2.0
Qt Version: 6.7.0
Kernel: 6.8.10-300
Comment 5 Liz Lee 2024-05-30 14:01:35 UTC
Created attachment 169985 [details]
for comparison: full journalctl after invoking "sudo shutdown +0" via terminal
Comment 6 Liz Lee 2024-05-31 08:16:36 UTC
I think I narrowed it down:

When I end the process "ksmserver" (i.e. the KDE session management server) first and then click one of the affected buttons, the requested action (e.g. shutdown) is executet immediately.

Unfortunately that's not a service one would like to stop from starting in the first place.
Comment 7 Liz Lee 2024-06-20 12:11:43 UTC
Problem still exists after update to KDE Plasma 6.1.

Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.9.4-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 8 Nate Graham 2024-07-30 21:28:32 UTC
And it happens with a brand new user account, with no customizations? Is it still happening in Plasma 6.13 or later?
Comment 9 Bug Janitor Service 2024-08-14 03:46:53 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Liz Lee 2024-08-14 11:40:38 UTC
yes, i just did the following:

1. i did a clean install on a virtual machine (kvm/virtmanager) with the "Fedora-KDE-Live-x86_64-40-1.14.iso".
2. i updated the system via "sudo dnf update"
(note that i did not do any further customizations on this vm)
3. i did some measurements:
- shutting down via the plasma launcher menu button takes about 3 seconds (time taken with a smartphone stopwatch) before anything happens = BAD
- ending the process "ksmserver" ans subsequently shutting down via the plasma launcher menu button => literally instant shutdown, as it should be = GOOD
- shutting down via terminal ("sudo systemctl poweroff") => literally instant shutdown too = GOOD

software versions after updating the system with "sudo dnf update" as stated above:
Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.3-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 11 Nate Graham 2024-08-14 22:22:14 UTC
ksmserver performs cleanup and informs apps that a session-ending action has been requested, so I'm not surprised that killing it is faster, because it means that none of that happens. It also means that any app with unsaved changes dies immediately, destroying your work. Hence why it exists. :) 

So here's what's going on: when there's a delay like the one you're describing, it means one or more apps are taking a long time to respond. Steam is a common culprit. Ultimately there's nothing we can do about that, though we can do better about communicating the cause for the delay to the user. I'm marking this as a duplicate of the Bugzilla ticket tracking that request.

*** This bug has been marked as a duplicate of bug 188476 ***