Restarting -> stop job for user running!

Restarting the system, while shutting down I see a message saying something like "stop job for user … " is running… and it takes long long time.
CTL+ALT+Del seemed to stop it but did not actually shutdown or restart. Unfortunately I had to use power button.
I can’t remember I had this before… maybe happened and too like 1:30 min. then continued.
What might be causing this? Is there a way to avoid it?

Don’t do that. Especially on btrfs. Can easily corrupt the entire filesystem.

It means something is still running when you try to shutdown.

2 Likes
4 Likes

Oh nooooooes!
Not on the-future-of-linux-much-better-than-anything-else-fs !?!??! :scream: :scream_cat: :dizzy_face: :exploding_head:

Who could have possibly see that coming…
honka_animated-128px-11

It was saying like 3 minutes remaining, then 4 minutes remaining… I can’t think of waiting even 3 minutes to reboot!

What? and how to avoid it?

I assure you it will take more than 3 minutes to reinstall and restore all your data from backup.

It is your system, only you can know what is running…

1 Like

A good place to start would be your Journal check last boot and scroll to the end
journalctl -b -1

1 Like

I can not think of something running that needs 4 minutes to shut down!

Well, sometimes I press restart with chromium browser and Dolphin file manager running!
Can this be the reason?
Would a

sudo systemctl reboot

help?

I wonder if this helps

Oct 16 18:09:01 asus sddm[348]: Socket server started.
Oct 16 18:09:01 asus sddm[348]: Loading theme configuration from "/usr/share/sddm/themes/breeze/theme.conf"
Oct 16 18:09:01 asus sddm[348]: Greeter starting...
Oct 16 18:09:01 asus sddm[348]: Signal received: SIGTERM
Oct 16 18:09:01 asus sddm[348]: Socket server stopping...
Oct 16 18:09:01 asus sddm[348]: Socket server stopped.
Oct 16 18:09:01 asus sddm[348]: Display server stopping...
Oct 16 18:09:01 asus sddm-helper[33803]: [PAM] Starting...
Oct 16 18:09:01 asus audit[33803]: USER_AUTH pid=33803 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:authentication grantors=pam_permit acct="sddm" exe="/usr/lib/sddm/sddm-helper" hostname=? addr=? terminal=? res=success'
Oct 16 18:09:01 asus audit[33803]: USER_ACCT pid=33803 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_permit acct="sddm" exe="/usr/lib/sddm/sddm-helper" hostname=? addr=? terminal=? res=success'
Oct 16 18:09:01 asus sddm-helper[33803]: [PAM] Authenticating...
Oct 16 18:09:01 asus sddm-helper[33803]: [PAM] returning.
Oct 16 18:09:02 asus sddm[348]: Display server stopped.
Oct 16 18:09:02 asus sddm[348]: Running display stop script  "/usr/share/sddm/scripts/Xstop"
Oct 16 18:09:02 asus sddm[348]: QProcess: Destroyed while process ("/usr/lib/sddm/sddm-helper") is still running.
Oct 16 18:09:02 asus systemd[1]: sddm.service: Deactivated successfully.
Oct 16 18:09:02 asus systemd[1]: Stopped Simple Desktop Display Manager.
Oct 16 18:09:02 asus audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=sddm comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Oct 16 18:09:02 asus systemd[1]: sddm.service: Consumed 38.014s CPU time.
Oct 16 18:09:02 asus systemd[1]: Stopping User Login Management...
Oct 16 18:10:28 asus systemd[1]: user-runtime-dir@1000.service: Stopping timed out. Terminating.
Oct 16 18:10:32 asus systemd[1]: systemd-logind.service: State 'stop-sigterm' timed out. Killing.
Oct 16 18:10:32 asus systemd[1]: systemd-logind.service: Killing process 317 (systemd-logind) with signal SIGKILL.
Oct 16 18:10:32 asus systemd[1]: systemd-logind.service: Killing process 33807 (close) with signal SIGKILL.
Oct 16 18:10:44 asus systemd[1]: Received SIGINT.
Oct 16 18:10:44 asus systemd[1]: Activating special unit System Reboot...
Oct 16 18:10:44 asus systemd[1]: Generate shutdown-ramfs was skipped because of a failed condition check (ConditionFileIsExecutable=!/run/initramfs/shutdown).
Oct 16 18:10:45 asus systemd[1]: Received SIGINT.
Oct 16 18:10:45 asus systemd[1]: Activating special unit System Reboot...
Oct 16 18:10:45 asus systemd[1]: Generate shutdown-ramfs was skipped because of a failed condition check (ConditionFileIsExecutable=!/run/initramfs/shutdown).
Oct 16 18:10:45 asus systemd[1]: Received SIGINT.
Oct 16 18:10:45 asus systemd[1]: Activating special unit System Reboot...
Oct 16 18:10:45 asus systemd[1]: Generate shutdown-ramfs was skipped because of a failed condition check (ConditionFileIsExecutable=!/run/initramfs/shutdown).

Never seen that before so maybe someone else will have an idea. In the mean time I found this:
https://bbs.archlinux.org/viewtopic.php?id=212327
Which sounds like your filesystem is not getting unmounted properly potentially your swaps. Do you use a swap partition?

1 Like

WOW!
I did it! Switched off and back on in a second! (biut did not have WiFi after restarting)
A normal restart everything is back to normal.

I do not remember I set any swap during installation. Do I need it?
My system has 20 GB RAM, i3 processor 10th. Gen, SSD.

The only thing I remember I changed was swappiness, down to only 10.

Thanks @KDen
It seems similar somehow to my case. But in my case it was mentioning something like “user” and “login”.

Glad the issue is solved. It would be great if you could bookmark that Magic SysRq key post.

1 Like

Sure I would.
But just to update you or for my own record
Pressing ALT+SysReq+RE the screen went black so I did not do the ISUB buttons. This is when it booted in a second.

But Ignoring the black screen and pressing the rest of the keys the system booted normally through Grub as normal!

No you don’t need a swap partition unless you plan on hibernating. With 20GB RAM it’s unlikely you’ll have overflow but depends on your use case.

https://wiki.archlinux.org/title/Swap
https://www.makeuseof.com/tag/swap-partition/

1 Like

Of course I understand forcefully shutting down any system might lead to corruption, but I though those issues with btrfs were ironed out? Would you say that if I live in a blackout-frequent area, ext4 would be the better choice?

1 Like

I still have the question(s)
Is it possible to prevent this?
Would a sudo systemctl reboot be better perhaps and avoid it?

Prevent which thing?

No.

1 Like

I don’t hibernate… it is either running or switched off.

My use case is just very simple, browsing, reading PDFs, rarely even listening to music! Very light use!

Yes.

2 Likes