You are not logged in.

#1 2016-03-01 11:55:46

tcr
Member
Registered: 2014-08-02
Posts: 18

Shutdown hangs for 90s

Fresh installation of arch, with SLim and Fluxbox.
No fancy configurations or other programs are installed.

When I try to shutdown, the system hangs for 90s with the following message:

stopping job for session c1 for user xpto

If the shutdown command is runned from tty, the shutdown goes smoothly.
The first time this occurs, I thought that installation went wrong, did a new fresh installation, same behavior.

I've read some threads of people with the same problem, even in other distributions, didn't find any solution.
I've seen some people pointing to SLim as the source of the problem, so I should change to ligthDM?

I would appreciate any help that the community can give me.

PS: My work computer has arch linux  for a year now, also with SLim and Fluxbox, never had this kind of problem.

Last edited by tcr (2016-03-01 11:57:16)

Offline

#2 2016-03-01 13:04:14

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,585
Website

Re: Shutdown hangs for 90s

Possibly related: https://bbs.archlinux.org/viewtopic.php?id=209434

As for switching from Slim, what's stopping you from trying something else?

Offline

#3 2016-03-01 14:24:50

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 353

Re: Shutdown hangs for 90s

I had this issue a couple of times on my laptop running gnome with grub2 after the update to systemd 229-2. It seems to have gone away though after the update to systemd 229-3. I only mention this because I do not think that this bug is [was] desktop environment or bootloader specific.


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#4 2016-03-01 14:38:09

evilwmuser
Member
Registered: 2016-02-25
Posts: 6

Re: Shutdown hangs for 90s

I've also had this problem and have tried several fixes.
I read somewhere that installing watchdog can help. I have only just recently done this and it does seem to solve the problem.
The only other way I know is
sync && poweroff -f
But I don't really like doing that!


Toshiba Tecra (Pentium II, 256mb RAM). Arch & evilwm.

Offline

#5 2016-03-01 16:08:03

tcr
Member
Registered: 2014-08-02
Posts: 18

Re: Shutdown hangs for 90s

x33a wrote:

Possibly related: https://bbs.archlinux.org/viewtopic.php?id=209434

As for switching from Slim, what's stopping you from trying something else?

In that thread, they talk about conky, chromium, etc, but in my case is a fresh installation only with SLim and Fluxbox.

I'v read that about SLim this morning. After work I will give it a try smile

Offline

#6 2016-03-01 16:14:17

tcr
Member
Registered: 2014-08-02
Posts: 18

Re: Shutdown hangs for 90s

TheChickenMan wrote:

I had this issue a couple of times on my laptop running gnome with grub2 after the update to systemd 229-2. It seems to have gone away though after the update to systemd 229-3. I only mention this because I do not think that this bug is [was] desktop environment or bootloader specific.

I think than can also be my problem, because I have arch in another computer making a year now, and zero problems (with systemd 224-1).
I will try to see the version in my other computer and try to update it. How have you choosen that versio? You download it and build in your own computer?

Offline

#7 2016-03-01 16:42:25

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 353

Re: Shutdown hangs for 90s

tcr wrote:

How have you choosen that versio? You download it and build in your own computer?

I'm using the version which is current in the Arch repos.


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#8 2016-03-01 16:55:16

x200proofx
Member
Registered: 2016-03-01
Posts: 1

Re: Shutdown hangs for 90s

This is also happening to me when issuing the poweroff or reboot command from XFCE and i3. Interestingly, if I issue shutdown then poweroff it doesn't hang.

Offline

#9 2016-03-01 19:25:35

tcr
Member
Registered: 2014-08-02
Posts: 18

Re: Shutdown hangs for 90s

TheChickenMan wrote:

I had this issue a couple of times on my laptop running gnome with grub2 after the update to systemd 229-2. It seems to have gone away though after the update to systemd 229-3. I only mention this because I do not think that this bug is [was] desktop environment or bootloader specific.

Ok, I confirmed now, the systemd is on version 229-3.


What you think I should do?

Offline

#10 2016-03-01 22:31:20

tcr
Member
Registered: 2014-08-02
Posts: 18

Re: Shutdown hangs for 90s

I'v tried:

systemctl set-default -f multi-user.target

The shutdown problem disappeared, but also slim at boot.

I'm starting to think that this has something to do with the enable of slim.

Offline

#11 2016-03-03 15:42:34

tcr
Member
Registered: 2014-08-02
Posts: 18

Re: Shutdown hangs for 90s

Made a fresh installation with lxdm instead of slim.
Same problem.
Anyone has an idea of how to solve this?

Offline

#12 2016-03-03 17:40:54

ChemBro
Member
Registered: 2008-10-22
Posts: 703

Re: Shutdown hangs for 90s

I have that problem, too. And I don't use slim. Also happens usually when I use the pc for several hours (in the evening) and doesn't seem to happen, when I'm using the pc for about an hour (in the morning).

Offline

#13 2016-03-03 17:51:07

tcr
Member
Registered: 2014-08-02
Posts: 18

Re: Shutdown hangs for 90s

Have you solved the problem in any way?
I starting to be a bit desperate.
No one seems to know the solution.

Offline

#14 2016-03-03 19:02:15

ratcheer
Member
Registered: 2011-10-09
Posts: 698

Re: Shutdown hangs for 90s

tcr wrote:

I'v tried:

systemctl set-default -f multi-user.target

The shutdown problem disappeared, but also slim at boot.

I'm starting to think that this has something to do with the enable of slim.

No, I have the same problem and I don't run any display manager. I just run startx manually from the system console.

Tim

Last edited by ratcheer (2016-03-07 13:03:59)

Offline

#15 2016-03-05 21:46:40

renegat
Member
From: Europe
Registered: 2012-12-28
Posts: 74

Re: Shutdown hangs for 90s

Looks like a systemd regression bug - we've already had this some time ago.
Same issue here all time when shutting down directly from kodi, sometimes even on normal shutdown via lxde/lxqt panel.
I do not use any display/login manager.

Some dirty workaround:
Edit /etc/systemd/system.conf and uncomment + set to 10s:

DefaultTimeoutStartSec=10s
DefaultTimeoutStopSec=10s

Now you don't have to wait the 90sec but only 10sec for shutdown when this annoying issue occurs again.

EDIT:
Don't set the 'DefaultTimeoutStartSec=10s' - it does not help with this 'a stop job is running'-systemd bug but will lead to problems with journald during boot like descirbed here

The value for 'DefaultTimeoutStopSec=10s' should be at least left to 30s - especially  on older systems with many (usb)-drives connected to ensure clean unmounting on shutdown/reboot.

Last edited by renegat (2016-03-23 22:38:13)

Offline

#16 2016-03-06 10:56:38

i_love_r34
Member
From: Mexico
Registered: 2016-02-14
Posts: 87

Re: Shutdown hangs for 90s

You tried with shutdown -P now ?

Offline

#17 2016-03-07 12:10:36

evilwmuser
Member
Registered: 2016-02-25
Posts: 6

Re: Shutdown hangs for 90s

Has anyone else tried the watchdog approach? It seems to work for me.

pacman -S watchdog
systemctl enable watchdog
sync

One next boot watchdog service will run and you should have a cleaner shutdown.

Last edited by evilwmuser (2016-03-07 12:11:25)


Toshiba Tecra (Pentium II, 256mb RAM). Arch & evilwm.

Offline

#18 2016-03-08 19:53:22

akgrant0710
Member
Registered: 2015-12-30
Posts: 25

Re: Shutdown hangs for 90s

evilwmuser wrote:

Has anyone else tried the watchdog approach? It seems to work for me.

pacman -S watchdog
systemctl enable watchdog
sync

One next boot watchdog service will run and you should have a cleaner shutdown.

I haven't looked at how watchdog works, but my guess is that if the shutdown doesn't complete within the configured time the watchdog just halts the system, i.e. doesn't allow it to shut down cleanly.  I'd much prefer that the shutdown is clean, creating a script that kills the offending processes before shutting down the system allows the clean shutdown.

Offline

#19 2016-03-09 11:39:46

evilwmuser
Member
Registered: 2016-02-25
Posts: 6

Re: Shutdown hangs for 90s

I agree, akgrant0710. I haven't done anything to explore how to write such a script yet. Let us know if you come up with one!


Toshiba Tecra (Pentium II, 256mb RAM). Arch & evilwm.

Offline

#20 2016-03-09 19:42:40

akgrant0710
Member
Registered: 2015-12-30
Posts: 25

Re: Shutdown hangs for 90s

evilwmuser wrote:

I agree, akgrant0710. I haven't done anything to explore how to write such a script yet. Let us know if you come up with one!

You need to determine which process(es) are causing the hang.  @Vain
provided instructions on using systemd-cgls to determine the guilty
process in the "A stop job is running..." discussion [1].  In my case,
chromium is the guilty process.

@dgalt provided a sample script in the same discussion.  My version is:

#!/bin/bash

killall chromium
systemctl poweroff

It is of course possible that you'll need to terminate the process more
forcefully, e.g. -KILL, but for me, this is enough.

HTH`,
Alistair

[1] https://bbs.archlinux.org/viewtopic.php?pid=1610955

Offline

#21 2016-03-11 15:14:44

evilwmuser
Member
Registered: 2016-02-25
Posts: 6

Re: Shutdown hangs for 90s

Thanks Alistair. I will have a look at this over the weekend.
mt


Toshiba Tecra (Pentium II, 256mb RAM). Arch & evilwm.

Offline

#22 2016-03-12 14:05:41

ratcheer
Member
Registered: 2011-10-09
Posts: 698

Re: Shutdown hangs for 90s

On my particular system, the process that seems to be the problem is at-spi-bus-launcher. I watched it multiple times with systemd-cgls and, after about 90 seconds, it finally went away.

Is it something I can just kill after logging out of my user session? Is there some setting that will make it terminate automatically after the user logs out?

Tim

Offline

#23 2016-03-12 14:24:02

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Shutdown hangs for 90s

Oh, interesting. This is happening on one of our computers-  I hadn't thought to check here because I assumed it was something I'd messed up along the way somewhere. It is an intermittent problem, happens more when I use openbox than gnome. I use systemctl poweroff to shut the computer down.
I'll debug properly at some point, but taking a long time to turn off just doesn't have the same urgency as taking a long time to boot wink.

Offline

#24 2016-03-12 14:54:18

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,296

Re: Shutdown hangs for 90s

ratcheer wrote:

Is there some setting that will make it terminate automatically after the user logs out?

Do you have:

KillUserProcesses=yes

in /etc/systemd/logind.conf ?

Edit: gave the right path to logind.conf

Last edited by berbae (2016-03-12 21:39:09)

Offline

#25 2016-03-12 19:38:25

ratcheer
Member
Registered: 2011-10-09
Posts: 698

Re: Shutdown hangs for 90s

Thanks. The logind.conf file is in /etc/systemd. The man page says setting KillUserProcesses to yes will break tools "like" screen. I use tmux all of the time. But, since I rarely use it to connect to a session, remotely, I suppose it should be ok. I will try it.

Tim

Offline

Board footer

Powered by FluxBB