Bug 496282 - Logout inhibition for GTK apps under Wayland is ignored
Summary: Logout inhibition for GTK apps under Wayland is ignored
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Power management & brightness (show other bugs)
Version: 6.2.4
Platform: Debian testing Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-14 20:31 UTC by maximumsomething
Modified: 2024-12-18 21:41 UTC (History)
3 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 maximumsomething 2024-11-14 20:31:12 UTC
SUMMARY
Both gnome-text-editor (GTK4) and gedit (GTK3) will inhibit sleep when run under KDE. Both use straightforward GTK apis to inhibit logout when there are unsaved documents. But in KDE, the "battery and brightness" widget will show them as inhibiting sleep, and the machine will indeed not go to sleep automatically. Sleep is not inhibited under GNOME Wayland or Plasma X11, just Plasma Wayland. (Logout is also not successfully inhibited, as documented in https://bugs.kde.org/show_bug.cgi?id=461176).

Given that this issue is specific to KDE under Wayland, I am filing it with KDE instead of GTK I think the actual bug is more likely to be here.

STEPS TO REPRODUCE
In a KDE wayland session, open gedit, gnome-text-editor, or any other GTK app that inhibits logout. Observe that sleep is inhibited in the "Battery and Brightness" taskbar widget and the computer does not go to sleep automatically.


SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13
Kernel Version: 6.11.4-amd64 (64-bit)
Graphics Platform: offscreen
Processors: 16 × AMD Ryzen 9 5900HX with Radeon Graphics
Memory: 30.8 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 1 Jakob Petsovits 2024-11-15 18:31:04 UTC
Incorrect sleep inhibition through XDG desktop portals was fixed in Plasma 6.1.4 in this change: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/305. I'm changing the bug report title to reflect this.

At this time (6.2.3), Plasma's implementation of XDG desktop portals doesn't have support for "logout" type inhibitors. KDE apps can clearly do this, I wonder what it would take to implement this functionality in the portal.