Bug 477579 - Plasma does not close Chromium broswers running under Xwayland on logout
Summary: Plasma does not close Chromium broswers running under Xwayland on logout
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Session Management (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-11-26 19:23 UTC by Jakub
Modified: 2024-03-19 22:26 UTC (History)
7 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub 2023-11-26 19:23:18 UTC
SUMMARY
Related to: https://bugs.kde.org/show_bug.cgi?id=461176
When logging out of plasma it will try to close native Wayland windows only, but not Xwayland ones.


STEPS TO REPRODUCE
Probably easiest to reproduce with Chromium based browser which will prompt for confirmation when multiple tabs are open.
1. Have an app which a - can run on both native wayland and xwayland, b - will prompt you for confirmation when closing it
2. Log out/shutdown/restart - xwayland app does not prompt you (and won't be listed in apps that prevented logging out if any)
3. Switch app to native wayland
4. Log out/shutdown/restart - app now prompts before closing

OBSERVED RESULT
Xwayland apps are not prompting for unsaved work

EXPECTED RESULT
Xwayland apps are prompting for unsaved work

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.81.80
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Kernel Version: 6.2.0-37-generic (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD Ryzen 7 4700U with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: VivoBook_ASUSLaptop X521IA_M533IA
System Version: 1.0
Comment 1 Nate Graham 2023-11-27 03:54:34 UTC
ksmserver is supposed to close XWayland windows. Is this a recent regression, or has that never worked for you?
Comment 2 Jakub 2023-11-27 15:31:01 UTC
(In reply to Nate Graham from comment #1)
> ksmserver is supposed to close XWayland windows. Is this a recent
> regression, or has that never worked for you?

It's a fresh install of KDE Neon Unstable.
I did some more testing comparing Plasma 6 and Plasma 5.
Behavior of Plasma 5 is consistent - always closes all XWayland apps and Wayland apps are killed
Bahavior of Plasma 6 is not - I've noticed this issue with Chromium based browser (Brave) running on Xwalyand
- if the browser (xwayland) is the only running window it's not closed at all (regression from Plasma 5)
- if there is at least one more native window (so for example browser (xwayland) window + kde settings (wayland) window), then all windows will close on logout, but the browser will not prompt before closing (and it should while having mutiple tabs)
- but the issue is not present for every Xwayland app. For example OnlyOffice Desktop Editions (which is still on xwayland) will always close correctly AND ask for a confirmation if there is unsaved work

If the browser is running on native Wayland it will properly close and ask for confirmation before closing
Comment 3 Nate Graham 2023-11-29 18:08:00 UTC
Thanks! So is Chromium the only XWayland app that gets killed instead of prompting when other windows are open? Can you try with other XWayland-using apps too?
Comment 4 Jakub 2024-03-14 20:29:15 UTC
Yes, it's only chroium browsers running Xwayland
Comment 5 Nate Graham 2024-03-18 20:54:16 UTC
And are you still able to reproduce it with Neon Unstable that's up-to-date with the latest code? A number of plasam session changes were made recently that could have affected this.
Comment 6 Jakub 2024-03-19 22:26:27 UTC
I am still able to reproduce this on newest Neon Unstable with all updates installed (19.03.2024), although this time it's on VM since I'm no longer using KDE Neon on my machine (but still Plasma 6 ;)