Xdg-document-portal.service delaying shutdown due to stop job

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):

  1. For changes that persist across boots, open /etc/default/grub in a text editor. Or, to just make a temporary change for a single session, hit the e key when the GRUB menu appears during boot

  2. At the line GRUB_CMDLINE_LINUX_DEFAULT= remove quiet and splash

  3. At the line GRUB_CMDLINE_LINUX= set the following: plymouth.enable=0 disablehooks=plymouth

  4. Save the changes

  5. If you chose the option of editing the /etc/default/grub file, 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.

  1. 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:

1 Like