"A stop job is running for User Manager for UID XX"

I have installed home-manager in my flake setup using the github URL (not the nix package).

When turning off the system, it seems to hang and systemd waits 1:30min to shutdown.

Any idea why and how it could be solved?

Systemd stops processes with SIGTERM by default because that gives them time to react properly. It then waits 90 seconds for any processes to voluntarily exit.

Buggy processes, or processes that deliberately ignore SIGTERM, then get a SIGKILL which will comprehensively murder them (at risk of corruption) and systemd can finally shut down.

Use journalctl --user -e --boot -1 as your user (since this is a user service) and see what service isn’t listening to SIGTERM. Then figure out why it isn’t listening to SIGTERM and fix that.

1 Like