Slow shutdown

I just installed 15.2, updated to the latest and greatest and enabled video/audio codecs from Packman.

If I shutdown, a normal shutdown is started, then a tty screen is shown this get replaced by a “gray” screen. If I then hit ESC a message is shown "A stop job is running for User manager for uid 1000¨. After 1,5 minute the shutdown continues and after a few seconds the system is really down. You can see it here: https://youtu.be/Oahe_x110sc

[video]https://youtu.be/Oahe_x110sc[/video]

Why do I get the tty screen and why is the stop job running for 1,5 minutes.

Any help to get a speedy shutdown is appreciated!

Why do I get the tty screen and why is the stop job running for 1,5 minutes.

  1. myabe normal behavior
  2. If some systemd unit does not answer/stop, there is a limit of 90 seconds ( I think), after this time, systemd is killing the unit the hard way.

Gnome as Desktop?
Post:

/usr/sbin/update-alternatives --display default-xsession.desktop
/usr/sbin/update-alternatives --display default-displaymanager

If Gnome, add

Slice=-.slice

to the **[Service] Section in:
** /usr/lib/systemd/user/gnome-session-restart-dbus.service

See:
https://gitlab.gnome.org/GNOME/gnome-session/-/issues/74#note_978036

I sometimes see that on Tumbleweed, but never on Leap 15.2. In my case, it is when running KDE. I never see that if I use Gnome.

Some desktop process did not shutdown properly, and the systemd shutdown unit is giving it a chance to complete before killing it. It can be hard to track down what is stuck.

In any case, you should tell us what desktop environment you are using, as it is relevant to the problem.

Are you using LVM or normal partitions during the install? I don’t use LVM and 2 computers in my network showed similar long shutdowns until I uninstalled 2 packages (libbd_lvm2 and vm2). I further locked them that they are not again installed when updating the computers. SInce the time the shutdown is fast.

You need to tell the system to kill all the processes associated with a “normal” – read, human – user when that user logs out/off …

  • Edit “/etc/systemd/logind.conf” –
  • Set-up “KillOnlyUsers=” – normally this line is commented – remove the comment character “#” – add the users to be killed on log out/off – a space separated list …
  • Reboot after editing – systemd needs to pick up the changed setting …

All,

Sorry that I didn’ t mention that I use Plasma.

Now the good news, in short: It’s Zoom

The longer answer: I started from scratch and installed packages one by one and rebooted. There it turns out that if Zoom is installed the described behavior is present. If Zoom is not installed shutdown goes really quick.
For those who want to experiment: if zoom is installed and you remove it then the next boot is still slow, but if you reboot and then shutdown … it’s fast.

Back to "A stop job is running for User manager for uid 1000¨. The output of sudo systemctl status user@1000 if zoom is installed is:

● user@1000.service - User Manager for UID 1000
   Loaded: loaded (/usr/lib/systemd/system/user@.service; static; vendor preset: disabled)
   Active: active (running) since Wed 2021-02-10 20:41:17 CET; 59s ago
     Docs: man:user@.service(5)
 Main PID: 1906 (systemd)
   Status: "Startup finished in 107ms."
    Tasks: 80
   CGroup: /user.slice/user-1000.slice/user@1000.service
           ├─at-spi-dbus-bus.service
           │ ├─2321 /usr/lib/at-spi2/at-spi-bus-launcher
           │ ├─2326 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
           │ └─2363 /usr/lib/at-spi2/at-spi2-registryd --use-gnome-session
           ├─dbus.service
           │ ├─1924 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
           │ ├─2000 /usr/bin/kglobalaccel5
           │ ├─2006 /usr/lib/dconf-service
           │ ├─2088 /usr/lib64/libexec/kactivitymanagerd
           │ ├─2109 /usr/lib64/libexec/kf5/kscreen_backend_launcher
           │ ├─2111 /usr/lib/bluetooth/obexd
           │ ├─2385 /usr/lib/GConf/2/gconfd-2
           │ └─2414 /usr/lib64/libexec/xdg-desktop-portal-kde
           ├─gvfs-daemon.service
           │ ├─2139 /usr/lib/gvfs/gvfsd
           │ └─2150 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f
           ├─init.scope
           │ ├─1906 /usr/lib/systemd/systemd --user
           │ └─1907 (sd-pam)
           ├─pipewire.service
           │ ├─2470 /usr/bin/pipewire
           │ └─2474 exec pipewire-media-session
           ├─pulseaudio.service
           │ ├─2082 /usr/bin/pulseaudio --daemonize=no
           │ └─2383 /usr/lib/pulse/gconf-helper
           ├─xdg-desktop-portal-gtk.service
           │ └─2357 /usr/lib/xdg-desktop-portal-gtk
           ├─xdg-desktop-portal.service
           │ └─2331 /usr/lib/xdg-desktop-portal
           ├─xdg-document-portal.service
           │ └─2340 /usr/lib/xdg-document-portal
           └─xdg-permission-store.service
             └─2343 /usr/lib/xdg-permission-store

If zoom is not installed it’s:

● user@1000.service - User Manager for UID 1000
   Loaded: loaded (/usr/lib/systemd/system/user@.service; static; vendor preset: disabled)
   Active: active (running) since Wed 2021-02-10 20:49:15 CET; 17min ago
     Docs: man:user@.service(5)
 Main PID: 1919 (systemd)
   Status: "Startup finished in 92ms."
    Tasks: 37
   CGroup: /user.slice/user-1000.slice/user@1000.service
           ├─at-spi-dbus-bus.service
           │ └─2296 /usr/lib/at-spi2/at-spi-bus-launcher
           ├─dbus.service
           │ ├─1937 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
           │ ├─2017 /usr/bin/kglobalaccel5
           │ ├─2027 /usr/lib/dconf-service
           │ ├─2106 /usr/lib64/libexec/kactivitymanagerd
           │ ├─2118 /usr/lib64/libexec/kf5/kscreen_backend_launcher
           │ ├─2120 /usr/lib/bluetooth/obexd
           │ └─2309 /usr/lib/GConf/2/gconfd-2
           ├─gvfs-daemon.service
           │ ├─2171 /usr/lib/gvfs/gvfsd
           │ └─2176 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f
           ├─init.scope
           │ ├─1919 /usr/lib/systemd/systemd --user
           │ └─1920 (sd-pam)
           └─pulseaudio.service
             ├─2084 /usr/bin/pulseaudio --daemonize=no
             └─2307 /usr/lib/pulse/gconf-helper

It seems that it has someting to do with xdg/pipewire/dbus-daemon/at-spi2-registryd, however I am not technical enough to figure out what’s actually going on but thought to mention it in case that it makes sence to some of you :wink:

I repeat – make sure that, all the processes associated with a user are killed when that user leaves the system – in other words, when that user either logs off or, logs out …

  • You have to edit “/etc/systemd/logind.conf” – setup “KillOnlyUsers=” …

Sorry for the late response … your were right! Thank you.