Bug 477573 - Plasma always prevents logout (in any form) saying that there are apps preventing it even when no apps are running
Summary: Plasma always prevents logout (in any form) saying that there are apps preven...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Session Management (show other bugs)
Version: master
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-11-26 16:56 UTC by Jakub
Modified: 2023-11-28 08:26 UTC (History)
5 users (show)

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


Attachments
Logout confirmation with empty app list (35.96 KB, image/png)
2023-11-26 16:56 UTC, Jakub
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub 2023-11-26 16:56:51 UTC
Created attachment 163507 [details]
Logout confirmation with empty app list

SUMMARY:
Plasma always says that there are apps preventing logout even if there are none (no application windows is running and presented list of applications which prevent logout is empty)
Related to: https://bugs.kde.org/show_bug.cgi?id=461176

Essentialy logout/shutdown/restart button does nothing and requires confirmation.


STEPS TO REPRODUCE
1. Do not have any apps opened
2. Click on logout/shutdown/restart and confirm
3. Nothing happens for ~10 seconds
4. Popup appears saying that there are apps which prevent plasma from closing

OBSERVED RESULT
Plasma does not log out

EXPECTED RESULT
Plasma does log out if no application is preventing it

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Neon Unstable 20231126-1118
KDE Plasma Version: 5.81.80 (git master from neon unstable)
KDE Frameworks Version: 5.245.0 (git master from neon unstable)
Qt Version: 6.6.0

ADDITIONAL INFORMATION
Running on real hardware, not VM.
Comment 1 Jakub 2023-11-26 18:23:36 UTC
Note that this only happens where no app windows are present. If there is at least one window and kwin/plasma manages to close it, it will log out.
Comment 2 fanzhuyifan 2023-11-26 18:31:38 UTC
Can confirm on neon unstable, wayland.
Comment 3 Jakub 2023-11-26 19:14:10 UTC
Additional thing: Kwin/Plasma only tries to close native wayland windows, but not Xwayland windows, so Xwayland app does not count as "open" in this case. I will create a separate bug report for this though.
Comment 4 Nate Graham 2023-11-27 18:08:40 UTC
Cannot reproduce.
Comment 5 David Redondo 2023-11-28 08:07:22 UTC
I can see the issue on a code level
Comment 6 Bug Janitor Service 2023-11-28 08:09:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4723
Comment 7 David Redondo 2023-11-28 08:26:18 UTC
Git commit ff76c8581d24556ff094fd4964108dc3fc43665d by David Redondo.
Committed on 28/11/2023 at 09:08.
Pushed by davidre into branch 'master'.

Do not wait for timer if there are no open windows

If there were no open windows KWin would wait until the timer ran
out and return false signifying that some windows didnt close.
FIXED-IN:6.0

M  +7    -0    src/sm.cpp

https://invent.kde.org/plasma/kwin/-/commit/ff76c8581d24556ff094fd4964108dc3fc43665d