45 second timeout at shutdown

Greetings from F44 KDE

Whenever I want to reboot or shutdown Fedora I go through a 45 second timeout process. This isn’t affecting booting the machine.

Like it says in the photo: Job user@1000.service/stop running … .scope/stop running (x/45s)

There’s a little progress animation with asterisks running in the leading brackets left.

I’m pretty sure it’s not there right after an install, but one or other of the steps I take setting up Fedora makes the system wait for something that does not happen within the 45 seconds. It’s not the first time I’ve experienced this.

How can I find out more?

Try running systemctl --user status (as your normal user) before shutting down to see what all is running in your user session.

Another way might be to tell a Bash shell on a VT to ignore the normal hang-up/terminate signals and leave a sudo journalctl -f command running on that VT and watch events as it is shutting down. Or you could just run that systemctl --user status command to see what processes are not stopped yet.


P.S. I would expect the same stop sequence to happen on logout. So you could probably test by logging out of your user session. That would be easier. Since you can have multiple sign ins, you could watch the first user session shutdown from a second one running on another VT.

Thanks. Logging out is fast.

Hmm, what I’m suspecting is happening in that case is that the login screen is showing before your user is really signed out. If you sign in on a VT with root, and run systemctl status user-1000.slice after you sign out from your normal user session, I bet you will see that some program is still running in that process tree long after your login screen has appeared.

Thanks, I appreciate it. I’d like to try that but I don’t know what it is you suggest.

“Sign in on a VT with root” ?

When I log out I don’t seem to have any options to open a terminal window.

The virtual terminals are accessed by a hot key. Ctrl+Alt+F3 should work to access VT3. If you have not done so, you will have to set a password on the “root” account before you will be able to sign in with it on a VT. Use sudo passwd root to set a password for the root account.

I found the ctrl-alt-F2 shortcut before I read your message. I have no root account but I used sudo to issue the systemctl command. Unfortunately I have no way of capturing the output except by photographing the screen and with the reflection of this oled display it’s pretty bad.

You have a root account. You just need to set a password on it.

If you sign in with your normal account and then use “sudo”, the results are less useful because you are seeing the processes running in your virtual terminal “in the mix”. If you want to be able to spot what process is taking a long time to stop when you sign out from your account, you need to sign in with root directly and you will want to have the command queued up and ready to run quickly when you sign out from the GUI. So sign in with root on a VT. Type the command to show the user’s process tree, but don’t hit enter yet. Switch back to the GUI with Ctrl+Alt+F1, sign out, then quickly hit Ctrl+Alt+F3 again and press enter to see what process(es) is/are still stopping.


P.S. There is probably an easier way to get this info from the logs, but I don’t know the better way.

Ok, I saved the output from systemctl status user-1000.slice as root after doing a fast switch.

● user-1000.slice - User Slice of UID 1000
Loaded: loaded
Drop-In: /usr/lib/systemd/system/user-.slice.d
└─10-defaults.conf
/etc/systemd/system.control/user-1000.slice.d
└─50-CPUWeight.conf, 50-IOWeight.conf, 50-MemoryLow.conf, 50-MemoryMin.conf
Active: active since Sun 2026-05-17 13:22:21 CEST; 40s ago
Invocation: 437356921f4b4857b47b849f9dcf9f0d
Docs: man:user@.service(5)
Act. Units: 2
Tasks: 93 (limit: 82123)
Memory: 981.8M (peak: 6.5G)
CPU: 2min 53.175s
CGroup: /user.slice/user-1000.slice
└─user@1000.service
├─app.slice
│ ├─app-flatpak-org.torproject.torbrowser\x2dlauncher-2553584855.scope
│ │ ├─11762 /usr/bin/bwrap --args 138 – prlimit --as=17012097024 /usr/libexec/glycin-loaders/2+/glycin-svg --dbus-fd 97
│ │ ├─11780 /usr/bin/bwrap --args 138 – prlimit --as=17012097024 /usr/libexec/glycin-loaders/2+/glycin-svg --dbus-fd 97
│ │ └─11783 /usr/libexec/glycin-loaders/2+/glycin-svg --dbus-fd 97
│ ├─app-flatpak-org.torproject.torbrowser\x2dlauncher-686625143.scope
│ │ ├─11438 /usr/bin/bwrap --args 138 – prlimit --as=17012097024 /usr/libexec/glycin-loaders/2+/glycin-image-rs --dbus-fd 72
│ │ ├─11679 /usr/bin/bwrap --args 138 – prlimit --as=17012097024 /usr/libexec/glycin-loaders/2+/glycin-image-rs --dbus-fd 72
│ │ └─11680 /usr/libexec/glycin-loaders/2+/glycin-image-rs --dbus-fd 72
│ ├─app-org.chromium.Chromium-8826.scope
│ │ ├─ 8826 “/opt/Mullvad VPN/mullvad-gui”
│ │ └─12662 /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-GB --service-sandbox-type=none --render-node-override=/dev/dri/renderD128 --enable-crash-reporter=e2917ddd-2b0c-4860-bce0-d26b57ebc113,no_channel “–user-data-dir=/home/unraid/.config/Mullvad VPN” --enable-sandbox --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1102133684740963738,8491096458776943995,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --trace-process-track-uuid=3190708990997080739
│ ├─dbus-:1.36-org.a11y.atspi.Registry@0.service
│ │ └─8507 /usr/libexec/at-spi2-registryd --use-gnome-session
│ ├─dconf.service
│ │ └─8549 /usr/libexec/dconf-service
│ ├─obex.service
│ │ └─8587 /usr/libexec/bluetooth/obexd
│ ├─run-p9256-i8782.service
│ │ └─9264 /usr/libexec/imsettings-daemon --replace
│ └─ssh-agent.service
│ └─8621 /usr/bin/ssh-agent -D
├─background.slice
│ └─kde-baloo.service
│ └─8245 /usr/libexec/kf6/baloo_file
├─init.scope
│ ├─7927 /usr/lib/systemd/systemd --user
│ └─7930 “(sd-pam)”
├─session.slice
│ ├─dbus-broker.service
│ │ ├─7951 /usr/bin/dbus-broker-launch --scope user
│ │ └─7952 dbus-broker --log 11 --controller 10 --machine-id c914bac0152b42a39533ca060e884b10 --max-bytes 100000000000000 --max-fds 25000000000000 --max-matches 5000000000
│ ├─pipewire-pulse.service
│ │ └─8239 /usr/bin/pipewire-pulse
│ ├─pipewire.service
│ │ └─8236 /usr/bin/pipewire
│ └─wireplumber.service
│ └─8237 /usr/bin/wireplumber
└─uresourced.service
└─8233 /usr/libexec/uresourced --user

May 17 13:22:57 Potsdam systemd[7927]: Stopped plasma-powerdevil.service - Powerdevil.
May 17 13:22:57 Potsdam systemd[7927]: plasma-polkit-agent.service: Main process exited, code=exited, status=1/FAILURE
May 17 13:22:57 Potsdam systemd[7927]: plasma-polkit-agent.service: Failed with result ‘exit-code’.
May 17 13:22:57 Potsdam systemd[7927]: Stopped plasma-polkit-agent.service - KDE PolicyKit Authentication Agent.
May 17 13:22:57 Potsdam systemd[7927]: Stopped plasma-kwin_wayland.service - KDE Wayland Compositor.
May 17 13:22:57 Potsdam systemd[7927]: plasma-kwin_wayland.service: Consumed 8.994s CPU time over 35.212s wall clock time, 174.2M memory peak.
May 17 13:22:57 Potsdam systemd[7927]: app-flatpak-com.usebottles.bottles-2527741192.scope: Consumed 34.334s CPU time over 33.043s wall clock time, 519.4M memory peak.
May 17 13:22:58 Potsdam plasmalogin-helper[7921]: pam_unix(plasmalogin:session): session closed for user unraid
May 17 13:22:58 Potsdam plasmalogin-helper[7921]: pam_kwallet5(plasmalogin:session): pam_kwallet5: pam_sm_close_session
May 17 13:22:58 Potsdam plasmalogin-helper[7921]: pam_kwallet5(plasmalogin:setcred): pam_kwallet5: pam_sm_setcred

May 17 13:22:57 Potsdam systemd[7927]: plasma-kwin_wayland.service: Consumed 8.994s CPU time over 35.212s wall clock time, 174.2M memory peak.
May 17 13:22:57 Potsdam systemd[7927]: app-flatpak-com.usebottles.bottles-2527741192.scope: Consumed 34.334s CPU time over 33.043s wall clock time, 519.4M memory peak.

It seams that the Bottleneck is bottles :slight_smile:

OK, let’s see if quitting the one app using Bottles before reboot will change anything.

I would strongly have a look at Mullvad VPN gui failing to exit after its daemon stops (not uncommon that electron apps ignore sigterm and sit out the full 45s kill timeout..

Best to rule out or confirm after a bad shutdown with:
journalctl -b -1 -e | grep -iE ‘killing|SIGKILL|still running|timed out’

and look for a line like: Killing process NNNN (mullvad-gui) with signal SIGKILL` > names the offender :wink:

To try: fully quit Mullvad (not close-to-tray) before rebooting and see if it helps.

I did 4 restarts after quitting Roon first. Roon is a piece of Windows software sadly not available for Linux that I run using Bottles. The timeout behaviour is gone. I didn’t quit Bottles, I quit the piece of software using it. This seems to have solved the system waiting for whatever.

Or is it solved? I had a 39s timeout as well just now but that doesn’t appear consistently, in fact it just happened once.

Thanks for your assistance I really appreciate it.

No need to try Mullvad, it appears to be Bottles.

journalctl -b -1 -e | grep -iE ‘killing|SIGKILL|still running|timed out’
bash: SIGKILL: command not found…
bash: timed: command not found…
Similar command is: ‘time’
bash: still: command not found…

Edit: I had a different 39s timeout happen once just now. I’ll try to look at Mullvad if it appears more often.

Retype the command by hand using straight single quotes or (quote free):
journalctl -b -1 -e | grep -iE killing|SIGKILL|still\ running|timed\ out

or:

journalctl -b -1 -e | grep -i killing

That command only finds the kill messages if boot -1 is one that actually hung. Your last few reboots were clean (after quitting Roon), so -b -1 will look tidy with nothing to find.

To see the evidence from when it was hanging, count back to an older boot. List your boots first: journalctl --list-boots

Then check the earlier ones that ended in the timeout; try -b -5, -b -6, etc. (whichever predate your Roon fix): journalctl -b -5 -e | grep -i killing

Then look for a line naming “com.usebottles.bottles” being killed with SIGKILL after timing out.

Edit: this new one is different (39s, one time as it seems) and can be caused by many things diags the same if it freq. happens: journalctl -b -1 -e | grep -i killing

Well I see this for the last 15 reboots. The missing numbers did not return anything.

The behaviour is gone if I close Roon (Bottles) before restarting.

It also looks like logging out and running reboot in the shell avoids the timer.

journalctl -b -14 -e | grep -i killing
May 17 12:36:12 Potsdam systemd[19768]: app-flatpak-com.usebottles.bottles-1425303033.scope: Stopping timed out. Killing.
May 17 12:36:12 Potsdam systemd[19768]: app-flatpak-com.usebottles.bottles-1425303033.scope: Killing process 20955 (bwrap) with signal SIGKILL.
May 17 12:36:12 Potsdam systemd[19768]: app-flatpak-com.usebottles.bottles-1425303033.scope: Killing process 21834 (winedevice.exe) with signal SIGKILL

journalctl -b -13 -e | grep -i killing
May 17 12:42:49 Potsdam systemd[2003]: app-flatpak-com.usebottles.bottles-125957798.scope: Stopping timed out. Killing.
May 17 12:42:49 Potsdam systemd[2003]: app-flatpak-com.usebottles.bottles-125957798.scope: Killing process 3147 (bwrap) with signal SIGKILL.
May 17 12:42:49 Potsdam systemd[2003]: app-flatpak-com.usebottles.bottles-125957798.scope: Killing process 4813 (winedevice.exe) with signal SIGKILL.

journalctl -b -10 -e | grep -i killing
May 17 14:04:39 Potsdam systemd[13127]: app-mullvad\x2dvpn@autostart.service: Killing process 14037 (mullvad-gui) with signal SIGABRT.
May 17 14:04:44 Potsdam systemd[13127]: app-mullvad\x2dvpn@autostart.service: State ‘stop-watchdog’ timed out. Killing.
May 17 14:04:44 Potsdam systemd[13127]: app-mullvad\x2dvpn@autostart.service: Killing process 14037 (mullvad-gui) with signal SIGKILL.

journalctl -b -5 -e | grep -i killing
May 17 14:29:50 Potsdam systemd[2012]: plasma-plasmashell.service: Killing process 2582 (plasmashell) with signal SIGABRT.

OK it seems my system is waiting 45s for Bottles when Bottles is running and it tries to shut down. I guess that’s it. I can shut down Bottles before rebooting or I can wait it out?

Edit: It looks like there has been issues before within the last year or two - [Bug]: Extremly long shutdown times after using bottles · Issue #3786 · bottlesdevs/Bottles · GitHub

That’s useful info.

Actually, there are 3 ‘offenders’.
Boots -14 and -13: Roon/Bottles com.usebottles.bottles scope timed out, SIGKILL on bwrap and winedevice.exe, seems the most frequent (close Roon as solution).
Boot -10: Mullvad mullvad-gui, via its own watchdog timeout. Occasional/independent and apparently its own failure mode, likely your one-off 39s hang.
Boot -5: plasmashell, KDE’s shell didn’t exit cleanly that time, rare/intermittent.

You may consider limiting the wait-time (can’t babysit Mullvad or plasmashell behaviorally :wink: ) under [Manager] in /etc/systemd/user.con: DefaultTimeoutStopSec=10s

then sudo systemctl daemon-reexec

Ok thanks, I’ll look at limiting the timeout.

Edit: That file user.con does not exist. Do I create it?

I saw in the software app on gnome, that there are 3 versions of bottles you can install. RPM version and a system and user version from flatpak.

I could imagine that you use the system wide bottles which not lets you kill this apps, running on it.

If you use your computer alone, try the user version of the flatpak. It will run then in your user space and terminating apps will not fall into a time out, because of user rights. I can not prove it, however would be worth a test.