Shutdown times longer after update

Is there a way to diagnose that kind of problem? Last time i did zypper dup it happened. How do i track something that happens during the shutdown process? Shutdown process takes like 20 secs rather than the usual like… 5.

While it’s shutting down, hit the Esc key to see console messages. You might see a message about some service taking longer to shut down.

Systemd sends a SIGTERM first to signal any active processes to terminate in an orderly way (cleaning up whatever they need to clean up, releasing system resources, closing files etc.), and after a timeout, if those processes are still active, it sends a SIGKILL. But that timeout is very long by default, and that can delay the overall shutdown a lot.

Finding out what services or in general processes take so long is the first step.

I found that the default timeouts (90 seconds) are insanely long, so I have this to reduce them to reasonable values:

% cat /etc/systemd/system.conf.d/50-huha-timeouts.conf
[Manager]
DefaultTimeoutStartSec=20s
DefaultTimeoutStopSec=10s
DefaultTimeoutAbortSec=10s
DefaultDeviceTimeoutSec=12s

YMMV, of course.

You can see the system defaults at /usr/lib/systemd in system.conf and user.conf. Add those that you want to override to a file in /etc/systemd/system.conf.d.

But reducing the timeouts is only the second line of defense; in most cases it’s best to find what processs takes so long, and why. Often it’s just forgotten user session at a virtual console or via ssh, or a busy mount that can’t be unmounted because some process still holds an open file handle to it.

3 Likes

I keep getting stopjob uuid 1000. It’s the thing that takes 30 secs or so. Any ideas? I tried googling but i keep getting ubuntu solutions.

Are you sure it is uuid and not uidor UID?

When UIDthen that is something running for or by user with UID 1000. Probably you as your normal user.

But isn’t there also a PID (Process IDentification) number mentioned in that message?

Ubuntu solutions should work as well for this deep system level; it’s systemd for both openSUSE and Ubuntu.

Check if you have an ssh session to or from that machine running. Try logging out from your desktop session and shut down from your login manager; if that makes a difference (which is likely), check if you are starting a process that your desktop doesn’t shut down when the desktop shuts down. Check the desktop’s autostart folder if there is anything new; maybe something that you explicitly added there.

And pretty certainly the message is about uid 1000 (the first user account created, typically yours), not uuid; UUIDs have a different format like f3471d8b-5fff-4d56-ab83-a1e5cc1e23da, i.e. long hex numbers, not nice round decimal numbers like 1000.

1 Like

Nohting in the desktop folder at least.