Public bug reported:

 affects ubuntu/nautilus

Nautilus leaves a stale xdg-desktop-portal Inhibit request open after a file
operation has finished. The stale request keeps a gnome-session logout/suspend
inhibitor ("Moving Files" / "正在移动文件") alive indefinitely. On Ubuntu 26.04
this also makes gnome-session 50.1 take a strong logind "block" inhibitor, so
logind rejects reboot/poweroff with BlockedByInhibitorLock.

Environment:
- Ubuntu 26.04.1 LTS (resolute), GNOME Shell 50.1, systemd 259
- nautilus 1:50.2.2-0ubuntu0.2
- gnome-session-bin 50.1-0ubuntu0.1 (built 2026-06-23)
- xdg-desktop-portal 1.21.1+ds-1ubuntu3.1
- xdg-desktop-portal-gtk 1.15.3-2ubuntu1

Observed behavior:
1. After normal Nautilus use, with no file operation currently running, the
reboot dialog says Files is moving files ("正在移动文件").
2. gnome-session-inhibit --list reports:
org.gnome.Nautilus: 正在移动文件 (logout, suspend)
3. No cp/mv/rsync process is running. Nautilus has no active operation:
/proc/<pid>/io is unchanged over several seconds and all threads are idle.
4. The portal still exports an inhibit request owned by Nautilus:
/org/freedesktop/portal/desktop/request/1_359/t
Calling org.freedesktop.portal.Request.Close on it from another process fails
with "Portal operation not allowed: Unmatched caller". Only Nautilus can close
it, and it never did.
5. systemd-inhibit --list contains:
gnome-session-s ... shutdown ... "user session inhibited" ... block
A reboot attempt is then rejected:
gnome-session-service[721900]: Shutdown failed:
GDBus.Error:org.freedesktop.login1.BlockedByInhibitorLock:
Operation denied due to active block inhibitor
6. Workaround verified on the affected machine:
systemctl --user restart xdg-desktop-portal-gtk.service
Afterwards gnome-session-inhibit --list prints "No inhibitors", the
gnome-session block inhibitor disappears from systemd-inhibit --list, and
logind's CanReboot returns "yes". A subsequent 100 MB move completed without
leaking a new inhibitor. Restarting Nautilus (or logging out) also clears it.

Related reports:
- GNOME Nautilus issue #3873 has the same symptom ("Moving Files" inhibitors
with no ongoing operations):
https://gitlab.gnome.org/GNOME/nautilus/-/work_items/3873
It is closed, but the bug is still reproducible with nautilus 50.2.2.
- The reboot rejection itself is tracked in LP #2173713:
https://bugs.launchpad.net/bugs/2173713
The upstream gnome-session fix df8cf27 changes the logout inhibitor from
"block" to "block-weak" and is included in gnome-session 51.0. However,
resolute-updates still publishes only gnome-session 50.1-0ubuntu0.1
(published 2026-07-22), so Ubuntu 26.04 users do not have the fix even though
the bug is marked Fix Released.

Requested fix:
- Backport the Nautilus/GTK/portal uninhibit fix so a completed or cancelled
operation always closes its inhibit request.
- Publish the gnome-session fix for resolute so a stale inhibitor cannot make
reboot/poweroff impossible.

The attached text file contains the raw command output used above.

** Affects: nautilus (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to nautilus in Ubuntu.
https://bugs.launchpad.net/bugs/2173819

Title:
  Nautilus leaves stale "Moving Files" inhibitor, blocking reboot on
  Ubuntu 26.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/2173819/+subscriptions


-- 
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to