Bug 488059 - Overview effect freezes for about 45 seconds when attempting to shutdown/suspend/restart from within the overview effect
Summary: Overview effect freezes for about 45 seconds when attempting to shutdown/susp...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-overview (show other bugs)
Version: 6.0.5
Platform: Arch Linux Linux
: HI normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-05 09:04 UTC by Philip Soerensen
Modified: 2024-06-07 19:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Soerensen 2024-06-05 09:04:36 UTC
SUMMARY
When I attempt to shutdown, reboot or suspend using the overview effect to search feature I experience a freeze approximately 45 seconds long during which the system is non-responsive. Then, after the freeze, the KDE desktop session screen opens like normal and I can proceed to shutdown/suspend/restart.

Running restart/shutdown/suspend from the KRunner works as expected, so the issue appears to be isolated to the overview effect.

STEPS TO REPRODUCE
1.  Open overview effect
2.  In the search field, type "restart"
3. Select "Desktop sessions - Restart"  from the results and hit enter

OBSERVED RESULT
Instead of immediately opening the desktop sessions screen and starting the restart countdown, the system first undergoes a total freeze for about 45 seconds. 

EXPECTED RESULT
After running "Desktop sessions - Restart", I expect to immediately open the desktop session window and start the restart countdown. 

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.9.2-arch1-Adashima-T2-1-t2 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-1038NG7 CPU @ 2.00GHz
Memory: 15,4 GiB of RAM
Graphics Processor: Mesa Intel® Iris® Plus Graphics
Manufacturer: Apple Inc.
Product Name: MacBookPro16,2
System Version: 1.0
Comment 1 David Redondo 2024-06-05 09:30:32 UTC
calls were made blocking for some bug https://invent.kde.org/plasma/plasma-workspace/-/commit/81d61861608012e4d7a19e6f85b8d136c298f31f
Comment 2 Bug Janitor Service 2024-06-05 11:33:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4417
Comment 3 David Edmundson 2024-06-06 07:20:31 UTC
Git commit 5eaaa200bed2e7d2212c90248901ca48a0979434 by David Edmundson.
Committed on 06/06/2024 at 07:00.
Pushed by davidedmundson into branch 'master'.

libkworkspace: Avoid blocking calls in SessionManagement operations

It is important the app stays alive until the call has been fully
dispatched, otherwise the call will not be completed.

As a temporary fix the calls were made blocking. This causes issues now
that kwin can be invoking this from the krunner plugin.

Instead it is replaced with an event loop locker, so apps can use that
to keep things alive implicitly.
To ensure we don't reopen the original bug 432460 logout-greeter is
ported away from calling quit, so the event loop locker is honoured.

M  +26   -7    libkworkspace/sessionmanagement.cpp
M  +7    -8    logout-greeter/greeter.cpp
M  +2    -1    logout-greeter/greeter.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/5eaaa200bed2e7d2212c90248901ca48a0979434