Is there a way to determine what is causing a shutdown to take a very long time? It’s probably some service(s) that’s misbehaving but I’m not sure how to find how which one(s) since much of the functionality of the machine is disabled by the time it gets to that point and there’s nothing on the command line to indicate what it’s waiting for… i.e. no “Job stopping…” message.
Best follow Diagnosing Shutdown Problems.
You might find clue(s) thus:
sudo journalctl -b -1 -e
Does the wait occur even when leaving all user sessions before issuing shutdown?
Press esc on exit to see what is hanging
Awesome, thank you.