====== A stop job is running for User Manager for UID 1000 at shut down ======
===== Scenario =====
I have this problem on Debian 11 (Bullseye) + Mate.
At shutdown, sometimes this problem prevents my computer to shut down immediately and I have to wait for 90s or more.
===== What I've tried =====
Shutting down manually all the most important services like apache, mariadb, cups, etc. doesn't solve the problem.
sudo nano /etc/systemd/system.conf
#rik: was def. 90
DefaultTimeoutStartSec=20s
#Rik: was def. 90
DefaultTimeoutStopSec=10s
same thing into **/etc/systemd/user.conf**
Nothing! I still have to wait 90+ seconds because such delay lies outside of these options.
Investigating into journalctl I've fixed some problems, one of which was bound to pipewire which I don't actually need, so I unininstalled it completely. It didn't solve the problem either.
After a lot of investigation into the logs and
sudo systemd-cgls -u user-1000.slice
I think the problem is dbus, but not a real clue on the specific culprit.
===== Solution =====
In the end I've found a workaround that also highlights where the problem is: Mate. I don't know exactly what's going on, however, I've never had the problem making the shutdown this way:
* Logout
* Shutdown
Basically exiting the GUI before shutting down solve the problem.
To ease the process:
* click on Logout
* Alt+F4
* Return