Hello,
I noticed that gnome session apparently seems to ignore all inhibitors at logout or shutdown.
I’m using Gnome 41.2 on Arch Linux. When I set up an inhibitor like this:
$ gnome-session-inhibit --app-id gnome-terminal.desktop --inhibit logout:suspend --reason 'Ongoing backup' cat
Then I see it in the list of inhibitors, both from gnome and from systemd, and as expected systemd refuses to shutdown:
$ gnome-session-inhibit --list
gnome-terminal.desktop: Ongoing backup (logout, suspend)
$ systemd-inhibit --list --no-pager
WHO UID USER PID COMM WHAT WHY MODE
NetworkManager 0 root 545 NetworkManager sleep NetworkMana… delay
UPower 0 root 690 upowerd sleep Pause devic… delay
GNOME Shell 1000 basti 7104 gnome-shell sleep GNOME muss … delay
basti 1000 basti 7265 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-… GNOME handl… block
basti 1000 basti 7089 gnome-session-b shutdown:sleep user sessio… block
basti 1000 basti 7265 gsd-media-keys sleep GNOME handl… delay
basti 1000 basti 7266 gsd-power sleep GNOME needs… delay
7 inhibitors listed.
$ systemctl halt
Operation inhibited by "basti" (PID 7089 "gnome-session-b", user basti), reason is "user session inhibited".
Please retry operation after closing inhibitors and logging out other users.
Alternatively, ignore inhibitors and users with 'systemctl halt -i'.
However when I run gnome-session-quit
or press the Logout button in the Gnome Shell menu I get the standard dialog, without any list of inhibitors, and I can press Logout and have my session ended or even my system powered off without even being warned about the existing inhibitor.
Is this intended behaviour? If so how can I make Gnome Shell respect inhibitors?