You are not logged in.

#1 2012-10-04 18:17:17

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,110

"halt" command vs. Gnome's Power Off sequence

Old geezer asking a noob question here:

Now that I'm using systemd, I really like how quickly I can shut down my system from a terminal emulation window. 

Working in a desktop environment like Gnome, though, is it safe to shut down the system this way, or do I need to go through the loooong wait that always follows hitting Power Off in Gnome?

I usually have a terminal window open somewhere on my screen, but even when I don't it's faster under systemd to open a console and type "halt" than it is to let Gnome shut down my system via Power Off.

Thanks.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#2 2012-10-04 18:59:45

mariusmeyer
Member
From: Norway
Registered: 2009-04-25
Posts: 244

Re: "halt" command vs. Gnome's Power Off sequence

I don't know why it takes so long for you, but in my situation the gnome power off is just as fast as issuing halt from a terminal... Do you use gdm or another login manager?

Also, do you have systemd-sysvcompat installed?

Offline

#3 2012-10-04 19:08:01

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,110

Re: "halt" command vs. Gnome's Power Off sequence

Thanks for your reply, mariusmeyer.

mariusmeyer wrote:

Do you use gdm or another login manager?

gdm

mariusmeyer wrote:

Also, do you have systemd-sysvcompat installed?

Yes, I have systemd-sysvcompat installed. Otherwise, as far as I can tell, my system is now pure systemd (no more rc.conf; initscripts package removed; systemd boot sequence runs without error; systemctl looks good).


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#4 2012-10-04 19:42:09

mariusmeyer
Member
From: Norway
Registered: 2009-04-25
Posts: 244

Re: "halt" command vs. Gnome's Power Off sequence

Yeah, no idea then I'm afraid hmm mine "instantly" quits gnome and goes straight to a vt showing the systemd shutdown messages for a brief second, and I'm on an old HDD... But I barely run anything at all, just gdm into gnome, no services.

Offline

#5 2012-10-04 19:44:53

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,110

Re: "halt" command vs. Gnome's Power Off sequence

mariusmeyer wrote:

Yeah, no idea then I'm afraid hmm mine "instantly" quits gnome and goes straight to a vt showing the systemd shutdown messages for a brief second, and I'm on an old HDD... But I barely run anything at all, just gdm into gnome, no services.

Do you know if it's unsafe to shut down the system via a terminal rather than going through the desktop environment's shutdown sequence?

I guess this hasn't occurred to me much before since I didn't have this super-speedy systemd shutdown until just now.

Last edited by dhave (2012-10-04 20:56:52)


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#6 2012-10-04 22:53:34

mariusmeyer
Member
From: Norway
Registered: 2009-04-25
Posts: 244

Re: "halt" command vs. Gnome's Power Off sequence

I think both methods issue the usual sigterm - wait - sigkill chain, so I think it's perfectly fine to shut down from a terminal window or similar. I've done it loads of times and never had any problems...

Offline

#7 2012-10-05 03:27:13

caslie
Member
Registered: 2012-09-06
Posts: 9

Re: "halt" command vs. Gnome's Power Off sequence

type "systemctl poweroff" in the terminal not halt because i don't think the computer will turn off using halt under systemd. for more info, check the systemd's wiki under FAQ.

Offline

#8 2012-10-05 03:34:22

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: "halt" command vs. Gnome's Power Off sequence

@caslie, that is correct, "systemctl halt" will actuall halt the computer, then power is up to you pushing the physical button.  I am pretty sure that they both call the same command and therefore the same sequence of events as mariusmeyer indicates.  Why not enable persistent logging in journalctl and try both ways?

Offline

#9 2012-10-05 03:34:40

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,110

Re: "halt" command vs. Gnome's Power Off sequence

caslie wrote:

type "systemctl poweroff" in the terminal not halt because i don't think the computer will turn off using halt under systemd. for more info, check the systemd's wiki under FAQ.

"halt" still works, because it's symlinked when systemd-sysvcompat is installed, according to the wiki page on systemd (and by my own experience).


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#10 2012-10-05 03:45:47

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: "halt" command vs. Gnome's Power Off sequence

Yes, "halt" is the same, but systemctl has a halt command as well that actually halts the machine.

Offline

#11 2012-10-05 07:17:05

caslie
Member
Registered: 2012-09-06
Posts: 9

Re: "halt" command vs. Gnome's Power Off sequence

WonderWoofy wrote:

@caslie, that is correct, "systemctl halt" will actuall halt the computer, then power is up to you pushing the physical button.  I am pretty sure that they both call the same command and therefore the same sequence of events as mariusmeyer indicates.  Why not enable persistent logging in journalctl and try both ways?

Okay i see, but prior to systemd i need not push the button to actually turn it off. So I suggested that he use poweroff instead of halt to avoid inconvinience.

Offline

#12 2012-10-05 09:13:58

Awebb
Member
Registered: 2010-05-06
Posts: 4,307

Re: "halt" command vs. Gnome's Power Off sequence

I don't see why it should not be safe. I wrote a polkit rule allowing users in the power group to invoke "poweroff" without a password. That's how I shut down the computer all the time: I call my runner and type poweroff.

Offline

#13 2012-10-05 12:30:56

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 664

Re: "halt" command vs. Gnome's Power Off sequence

Just wanted to add that the halt command will under normal circumstances(runlevel 1-5) call shutdown and poweroff the system, so is the same as running 'shutdown -h now' or poweroff, but with systemd-sysvcompat, then the halt symlink actually halts now and not powers off...

Poweroff is also a symlink that actually powers off...

Offline

Board footer

Powered by FluxBB