Suspend is inhibited

Hi,

I installed fedora 43 and I have issues with suspend.

Sometimes, when I try to suspend, it doesn’t so anything. I have to perform

systemctl -i suspend, which is anoying.

I know there is gnome-session-inhibit --list, but the inhibition doesn’t work properly.

Sometimes it is nautilus, even there is no file transfer, sometimes web browser, but there was no download.

But yesterday, I got something special:

$ gnome-session-inhibit --list

org.gnome.TextEditor: There are unsaved documents (logout)

This was blocking suspend, but according to the message, it should be blocking only logout, not suspend. After closing text editor, I was able to suspend.

And why there is no gui window to suspend anyway, even when the suspend is inhibited?

Does systemd-inhibit show different reasons to block suspend?

I’m no quite sure. Direct reproduction doesn’t do it. When I directly open the TextEditor to have unsaved document, suspend it working, even gnome-session-inhibit is the same.

I will try it, when it happends again, it will probably not take a long.

$ gnome-session-inhibit --list
org.gnome.TextEditor: There are unsaved documents (logout)
$ systemd-inhibit

WHO            UID  USER PID   COMM            WHAT                                                     WHY                                       MODE
ModemManager   0    root 2416  ModemManager    sleep                                                    ModemManager needs to reset devices       delay
NetworkManager 0    root 2761  NetworkManager  sleep                                                    NetworkManager needs to turn off networks delay
UPower         0    root 2276  upowerd         sleep                                                    Pause device polling                      delay
GNOME Shell    1000 ksj  5157  gnome-shell     sleep                                                    GNOME needs to lock the screen            delay
GNOME Shell    1000 ksj  5157  gnome-shell     sleep                                                    GNOME needs to save screen time data      delay
code           1000 ksj  17353 xdg-dbus-proxy  sleep                                                    Application cleanup before suspend        delay
ksj            1000 ksj  5326  gsd-media-keys  handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses                 block
ksj            1000 ksj  5127  gnome-session-s shutdown:sleep                                           user session inhibited                    block
ksj            1000 ksj  5326  gsd-media-keys  sleep                                                    GNOME handling keypresses                 delay
ksj            1000 ksj  5339  gsd-power       sleep                                                    GNOME needs to lock the screen            delay

10 inhibitors listed.

It blocks suspend with this