SUMMARY When logging out of a Wayland session, applications do not display prompts to save unsaved work before proceeding with logging out. STEPS TO REPRODUCE 1. Log in to a Wayland session 2. Open Kate, type some stuff, do not save it 3. Log out of the Wayland session OBSERVED RESULT The session ends and unsaved work is discarded with no prompts to save it first EXPECTED RESULT Applications should be able to ask to save work before logging out under Wayland, like they do under X11. SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Plasma Version: 5.26.2 KDE Frameworks Version: 5.99.0 Qt Version: 5.15.6 Graphics platform: Wayland ADDITIONAL INFORMATION I have been told that this is due to Wayland not having an API to tell applications that the session is ending. I'm not sure what is done on X11, or if there are any relevant protocol proposals for Wayland to enable this.
Can reproduce. Marking as Critical as this can cause unexpected data loss, and adding it to https://community.kde.org/Plasma/Wayland_Showstoppers.
Thank you, Nate. Does anyone have an idea for a path forward for this?
I believe this is what is responsible for shutdown handling functionality in Xorg: https://www.x.org/releases/current/doc/libSM/SMlib.html Something similar needs to be standardized for Xorg-less environments.
Implementing missing parts of the Inhibit portal in xdg-desktop-portal-kde may be of good help to this. It currently supports inhibiting, but not monitoring state of the session. https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.impl.portal.Inhibit https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/blob/master/src/inhibit.cpp And maybe getting a client implementation of the Inhibit portal in Qt https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Inhibit
*** Bug 467142 has been marked as a duplicate of this bug. ***