Poweroff/reboot doesn't work in GNOME, when an inhibitor is held

Problem

In Fedora 42 Workstation, if an application is “inhibiting” (preventing) shutdown - e.g. a text editor has an unsaved document - then attempting to power off or reboot anyway (which GNOME offers to let you do) will have no effect, the system will keep running and the poweroff/reboot button will appear non-functional.

Also, in some situations, the shutdown/reboot dialog will not even inform you about which apps/processes hold the inhibitor, so everything will appear completely normal, but still the requested action will not happen.

Cause

Both issues are caused by a change in how systemd 257 handles shutdown inhibitors. GNOME needs to adapt to this change, but there was not enough time to fully implement this before Fedora 42’s release.

Related Issues

Bugzilla report: #2355033
GNOME issue (overriding known inhibitors fails): gnome-session #142
GNOME issue (unknown inhibitors cause shutdown to fail silently): gnome-session #145

Workarounds

If you see which applications block the shutdown/reboot, simply close them manually. There might also be some alternative action to resolve the inhibitor, i.e. saving all your changes in a text editor.

If there’s an inhibitor not shown in the poweroff/reboot dialog, you might learn what it is (which then might help you figure out how to resolve it) by running this terminal command:

systemd-inhibit --list

(Look at the WHAT column for lines which include “shutdown”).

Another option is to log out the current user. Very often this also terminates and app/process which held the inhibitor, and you can then power off/reboot from the login screen.

If you weren’t able to resolve the inhibitor, you can poweroff/reboot directly through systemd while ignoring the active inhibitors with a terminal command:

systemctl poweroff -i

or

systemctl reboot -i

Be careful in this case - the process inhibiting shutdown may be important, like a package install operation.

4 Likes

You can discuss this topic here.