Delayed shutdown: stop job for user manager for uid 1000

A third of my shutdown/reboots are delayed for eighty seconds by the message:

A stop job is running for user manager for uid 1000

I understand that this isn’t a new problem, and have read tips at:

https://forums.opensuse.org/t/a-stop-job-is-running-for-user-manager-for-uid-1000/152752 and elsewhere, for other distros.

So far, I have:

– Changed #DefaultTimeoutStopSec= to DefaultTimeoutStopSec=5s in /usr/lib/systemd/system.conf

– Changed #DefaultTimeOutStopSec=90s to DefaultTimeoutStopSec=5s in /usr/lib/systemd/user.conf

– Changed #DefaultTimeoutAbortSec= to DefaultTimeOutAbort=5s in /usr/lib/systemd/user.conf

All to no avail. Logging out and then waiting for five seconds at the logout screen before clicking ‘restart’ doesn’t help, either.

Is there any harm in using the Magic SysRq keys to induce reboot, or am I really better off twiddling thumbs for eighty seconds while the OS hunts for the exit sign?

Do not change something in this files, they will be overwritten by updates. Use a file in /etc/systemd /[user.conf.d|system.conf.d) to overwrite the default:

cat /etc/systemd/system.conf.d/60-systemd.conf 

DefaultTimeoutStopSec=30s
DefaultTimeoutAbortSec=30s
DefaultDeviceTimeoutSec=30s

Reducing the message timeout is a workaround.

Sometimes, a person starts an application (after logging in), then minimizes the app and does work elsewhere, and forgets they have minimized that one app. Then at shutdown, some apps will “hold on” to a system resource, so you will see that “countdown message” at shutdown.

Have you tried these troubleshooting steps:

  • Instead of selecting “Shutdown” in your DE (btw - you didn’t mention which DE you’re using), select "Logout’ first … then when the main Login screen is displayed, then select “Shutdown”
    Any difference? That will usually avoid the “countdown” issue.
  • Or … login with a different user account, then select “Shutdown” … any difference in behaviour from your regular user account? If yes, there is some process (maybe because of “autostart” mode), that starts and runs.

Usually (when experiencing this countdown issue), performing the first bullet-point steps, will result in NO countdown during shutdown … because all processes are shutdown during logout, and not stuck running during shutdown procedure.

Thank you for the replies, Sauerland and myswtest. Sauerland, I have created 60-systemd.conf, as you suggested … unfortunately, without effect. (But at least now the edits won’t be overwritten!) myswtest, I did try logging out and then shutting down from the KDE login screen, as noted in my first post, but that hasn’t helped either.

My main question now: Is there any harm in using the Magic SysRq keys to induce reboot?

I would just give it a try, REISUB.

But what information does it give you? I do not see how it can help to solve the problem of the long shutdown.

https://freedesktop.org/wiki/Software/systemd/Debugging/#diagnosingshutdownproblems

Can you share the resulting shutdown-log.txt? You can share that via https://paste.opensuse.org/

Thanks, Marel.

For me, knowing that I can fall back to the Magic SysRq keys as much as fixes the problem. I hold Alt-SysRq, tap ‘e’ and then ‘i,’ and the system continues with shutdown. Only takes a couple of seconds.