You are not logged in.

#1 2015-09-08 20:52:51

GodsOtherHand
Member
Registered: 2013-08-25
Posts: 11

Shutdown command does not wait for the time specified

Hello.
I have been using the following command for a while in order to shutdown my PC after an amount of time:

sudo shutdown -h 120.

However, for a few days now, this command just shuts down the PC without waiting the 120mins as it did before.

From the man page, I see that is should work

shutdown [OPTIONS...] [TIME] [WALL...]

However, it does not work as expected, as it does not wait for the 120 minutes as it should..

Also, I tried "sudo shutdown -h +120" but it still shuts down right after I enter the password.

Before this i just did an update, but I found no info about a change being made to this...

Last edited by GodsOtherHand (2015-09-08 20:53:07)

Offline

#2 2015-09-08 21:45:04

bmate22
Member
Registered: 2015-09-08
Posts: 1

Re: Shutdown command does not wait for the time specified

Have u found any solution? I have the same probleme. I took a photo (I had to be really fast wiht printscreen) and i red the terminal output.

Failed to set wall massage, ignoring? Massage did not recieve a reply (timeout by message bus)
Failed to call SheduleShutdown in logind, proceeding with immediate shutdown: Message did not recieve a reply (timeout by message bus)

I tried to edit the etc/systemd/logind.conf but it didn't help.

Last edited by bmate22 (2015-09-08 21:46:46)

Offline

#3 2015-09-08 21:49:14

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Offline

#4 2015-09-08 21:50:21

qwerty12
Member
From: London
Registered: 2011-06-20
Posts: 34

Re: Shutdown command does not wait for the time specified

https://github.com/systemd/systemd/issues/1120

EDIT: There's no delete button so I'll just say that karol was faster.

Last edited by qwerty12 (2015-09-08 21:51:03)

Offline

#5 2015-09-09 08:29:01

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: Shutdown command does not wait for the time specified

Could somebody explain to me how to apply mentioned above patch in link? I was never good at this and mentioned problem occurs with my Arch also. On the older time declaration in shutdown command works, on upgraded Arch it does not - just reboots system right on the spoot.

Edit: i'm not an lazy. I tried to search for git manuals, faq. I readed it, and i just don't understand it at all. If somebody could explain it with simpler language - big thanks.

Last edited by firekage (2015-09-09 09:09:14)

Offline

#6 2015-09-09 09:15:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,805

Re: Shutdown command does not wait for the time specified

Just wait for systemd 226 to come out of testing which should include this fix

Offline

#7 2015-09-09 09:39:02

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: Shutdown command does not wait for the time specified

Yes, but i would like to learn something, that's why i asked. On link above one person said that applying fix solved problem - so, i would like to know how to do it.

Offline

#8 2015-09-09 10:17:09

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: Shutdown command does not wait for the time specified

Offline

#9 2015-09-09 10:30:46

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: Shutdown command does not wait for the time specified

I read it a lot earlier, much earlier than this problem occured - it is also too complicated to me. Thanks anyway.

Offline

#10 2015-09-12 19:45:51

martinoff
Member
Registered: 2011-03-28
Posts: 21

Re: Shutdown command does not wait for the time specified

firekage wrote:

I read it a lot earlier, much earlier than this problem occured - it is also too complicated to me. Thanks anyway.

you can try to install it from testing repo

pacman -U http://archlinux.polymorf.fr/testing/os/x86_64/systemd-sysvcompat-226-1-x86_64.pkg.tar.xz http://archlinux.polymorf.fr/testing/os/x86_64/systemd-226-1-x86_64.pkg.tar.xz

Last edited by martinoff (2015-09-12 19:46:35)

Offline

#11 2015-09-12 21:09:31

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Shutdown command does not wait for the time specified

Partial upgrades are not supported.

Offline

#12 2015-09-15 01:24:12

joelhy
Member
Registered: 2015-09-15
Posts: 1

Re: Shutdown command does not wait for the time specified

If you just cannot wait the systemd 226 update, you can downgrade to systemd 224, by using command: # downgrade systemd, and choose systemd 224.
By the way, downgrade command is from aur/downgrade. Please make sure it is installed first.

Last edited by joelhy (2015-09-15 01:24:36)

Offline

#13 2015-09-15 13:49:25

pezmarino
Member
Registered: 2015-07-24
Posts: 27

Re: Shutdown command does not wait for the time specified

The solution it's gaven in  https://github.com/systemd/systemd/issues/1120

diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 7cc68d4..beae75e 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -1796,9 +1796,11 @@ static int update_schedule_file(Manager *m) {
         if (r < 0)
                 return log_error_errno(r, "Failed to create shutdown subdirectory: %m");

-        t = cescape(m->wall_message);
-        if (!t)
-                return log_oom();
+        if (!isempty(m->wall_message)) {
+                t = cescape(m->wall_message);
+                if (!t)
+                        return log_oom();
+        }

         r = fopen_temporary("/run/systemd/shutdown/scheduled", &f, &temp_path);
         if (r < 0)

But I don't know how to do it.Could anyone help me? Thanks.

Offline

#14 2015-09-15 16:37:04

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: Shutdown command does not wait for the time specified

@pexmarino: Either wait for 226, downgrade to 224 or use ABS, download the package, apply the patch and rebuild and reinstall the package. (See https://wiki.archlinux.org/index.php/Arch_Build_System)

Personally, I would wait for 226, but if it is that sever a problem for you, just downgrading to 224 would be easiest.


Matt

"It is very difficult to educate the educated."

Offline

#15 2015-09-17 10:33:56

pezmarino
Member
Registered: 2015-07-24
Posts: 27

Re: Shutdown command does not wait for the time specified

Thanks

Offline

Board footer

Powered by FluxBB