One of the problems with systemd is that, while it is very good at analysing boot times (using systemd-analyze), it doesn’t analyse shutdown times. It also doesn’t log the actual text of stop-jobs, which are the only way of seeing what is causing a shutdown hold-up.
Maybe you could change your boot parameters to display the boot/shutdown processes instead of the Plymouth splash screen as your system boots up and shuts down? It is quite easy to do (I’ve had my system set up this way for nearly 2 years):
-
For changes that persist across boots, open
/etc/default/grubin a text editor. Or, to just make a temporary change for a single session, hit theekey when the GRUB menu appears during boot -
At the line
GRUB_CMDLINE_LINUX_DEFAULT=removequietandsplash -
At the line
GRUB_CMDLINE_LINUX=set the following:plymouth.enable=0 disablehooks=plymouth -
Save the changes
-
If you chose the option of editing the
/etc/default/grubfile, you should then apply the changes by running:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Note: I believe that sudo update-grub will also do the same job as the above command.
- Reboot, and you should then see the boot processes on-screen as your system starts up. You will also see the processes as it shuts down, including any stop-jobs and what they are waiting for. So, each time you shut down you can watch the screen and see if any delays occur & what causes them.
Note: you can also disable and remove Plymouth from your system completely if you want (as I have done). Instructions are here: