1

My desktop is using OpenSuse 15.1 with latest updates, systemd 234-lp151.26.16.1, gvfs 1.34.2.1-lp151.6.3.1.

Since a while (I cannot remember exactly when it started) a system shutdown takes at least 2 minutes to complete. When I hit ESC at the splash screen, I see systemd is waiting for a User Manager job to finish and, after some digging, I figured out that it is this process:

/usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes

I did some research and discovered that this is automatically started by programs like Firefox and Thunderbird (and others). I also verified that:

  • If I boot and don't use such programs, the shutdown is fast;
  • If I logout and use the console to kill those user processes, the shutdown is fast;
  • Other user accounts are affected too, only if they use the mentioned programs.

I configured systemd with: KillUserProcesses=yes, but it does not help as it seems those processes still take 2 minutes to be terminate after the logout.

Furthermore, on the same machine I can also boot Ubuntu-mate (18.04 LTS) from a separate SSD and it shows the same symptoms.

How do I figure out what's causing the 2 minutes delay ?

Edit: perhaps it's worth mentioning that once I logout, I cannot log back in again because I get a dialog "Could not sync with Dbus". I need to do a ctrl-Backspace to reset X first.

2
  • some share over Network like (samba, nfs) or somethiing other in this direction?
    – nobody
    Commented May 31, 2020 at 16:53
  • Unfortunately, no. The problem is quite easy to reproduce. I just need to start Firefox or Thunderbird and then close them. If I don't, the extra mount is not there and shutdown is fast.
    – savedario
    Commented May 31, 2020 at 18:24

2 Answers 2

2

FUSE has a dedicated command fusermount for undoing FUSE mounts. At least on Debian 10, it has SUID root set by default.

So you might add fusermount -u /run/user/$(id -u)/gvfs to the script that gets executed at GUI logout (e.g. $HOME/.kde/shutdown/gvfs-workaround.sh on older KDE, or $HOME/.config/plasma-workspace/shutdown/gvfs-workaround.sh on KDE Plasma Desktop).

4
  • Thanks a lot! This not only solves the shutdown delay, but I can now immediately log back in without errors. Since it seems more a matter of "cleaning up", I wonder why this is not included in the logout process by default, or at least have a configuration option to choose.
    – savedario
    Commented Jun 1, 2020 at 9:54
  • I think gvfs is (or originally was) a GNOME desktop component, so it's not as well integrated with KDE as it could be ("kioslaves" are KDE's answer to a similar need). Firefox and Thunderbird are both built as GNOME applications, so they may trigger some GNOME-specific services to start up. The fact that gvfsd-fuse is not getting properly shut down with KDE would certainly be worth sending in a bug report, though.
    – telcoM
    Commented Jun 1, 2020 at 9:58
  • I agree, it will be challenging to figure out where to lodge that bug report though. KDE ? systemd ? openSuse ? FUSE ? I will make an attempt...
    – savedario
    Commented Jun 1, 2020 at 10:34
  • "bug" reported and linked to similar ones: bugs.kde.org/show_bug.cgi?id=422322
    – savedario
    Commented Jun 1, 2020 at 12:10
1

The delay could be caused by several factors most of them being user processes or systemd processes.

If you are using KDE which is the default desktop environment for Open SUSE, try the script below, which terminates the user manager process on exit. It worked for me.

Add the script to $HOME/.kde/shutdown

#! /bin/sh - pulseaudio --kill systemctl --user exit exit

Please leave some feedback if this workode for you or not, Thank you.

4
  • 1
    How do you know that OP is using KDE?
    – annahri
    Commented May 31, 2020 at 14:07
  • As a matter of fact, I do use KDE. Still.. that script is merely a workaround as it simply moves the problem, making the logout wait 2 minutes. Running them in the background is no solution either as I am pretty sure it will get messy if I login back in again.
    – savedario
    Commented May 31, 2020 at 15:57
  • What would work is to do a 'umount /run/user/1000/gvfs' inside such a script, but it needs to be run as root, so...
    – savedario
    Commented May 31, 2020 at 16:04
  • On Debian 10, using KDE Plasma Desktop, a similar workaround applies, but the script should be placed in $HOME/.config/plasma-workspace/shutdown/ instead.
    – telcoM
    Commented Jun 1, 2020 at 7:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .