Poweroff command

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
pinballfan
Level 2
Level 2
Posts: 74
Joined: Thu Apr 29, 2021 6:43 pm

Poweroff command

Post by pinballfan »

So, after having countless shutdown hangs, I read on various other forums about shutting down with the terminal command. One of which was the poweroff command. So far, it has shut down my computer without fail.

What I'm wondering is how safe it is compared to the normal shutdown process? Surely it is better than having to switch it off physically with the power button when it hangs with the normal shutdown.....?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Poweroff command

Post by Cosmo. »

How can we be supposed to judge about a not named program?

This is safe (but circumstantial): Prees and hold alt and prtscr, now hit one after the other s, u and o with a little break after u. Instead of o you can use b, in this case the machine reboots.
pinballfan
Level 2
Level 2
Posts: 74
Joined: Thu Apr 29, 2021 6:43 pm

Re: Poweroff command

Post by pinballfan »

Cosmo. wrote: Sun Jun 26, 2022 6:43 am How can we be supposed to judge about a not named program?

This is safe (but circumstantial): Prees and hold alt and prtscr, now hit one after the other s, u and o with a little break after u. Instead of o you can use b, in this case the machine reboots.


Under a normal shut down (clicking with the mouse on the shutdown) tends to make the shutdown freeze at the end, meaning that no keyboard input works, so I cannot use those commands.

What I'm saying is that by writing poweroff in the terminal instead of clicking on the shutdown button, it switches the computer off properly without any issue. It seems to go through the same situation, but turns the computer off safely. While doing it through the menu makes it mess up almost everytime. I was just wondering what the difference in shutdown is between them.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Poweroff command

Post by Cosmo. »

If no keyboard input works, how shall a terminal input work?

But actually my advice works also in many cases, where the computer does not react anymore at any keyboard or mouse inputs. You should store the advice in your mind (or on a piece of paper), because in case you need it you will not be able to look it up in your computer.
pinballfan
Level 2
Level 2
Posts: 74
Joined: Thu Apr 29, 2021 6:43 pm

Re: Poweroff command

Post by pinballfan »

Cosmo. wrote: Sun Jun 26, 2022 6:57 am If no keyboard input works, how shall a terminal input work?
Because I'm saying while I'm using the computer in the Linux OS, I bring the terminal up, type in poweroff and hit enter, it shuts the pc down, without any problem.

If I click the shutdown button it goes to the shut down process but usually freezes up when it gets to the mint logo, and no keyboard REISUO etc works because it has frozen up and wont accept any commands. Completely frozen.

Again, I am just curious as to why poweroff works, but normal shutdown doesn't. is that so hard for you to understand?
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Poweroff command

Post by Cosmo. »

pinballfan wrote: Sun Jun 26, 2022 7:00 am is that so hard for you to understand?
Seems so, because I have never seen in my life a situation, where SUB/O with alt+prtscr does not work, but a terminal can get opened and used. I never judge about something, what I do not know and what I cannot imagine.

The other question is, why does the computer freezes at shutdown, but that would be a different question for a different thread.
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: Poweroff command

Post by Hoser Rob »

Cosmo. wrote: Sun Jun 26, 2022 6:43 am How can we be supposed to judge about a not named program?

This is safe (but circumstantial): Prees and hold alt and prtscr, now hit one after the other s, u and o with a little break after u. Instead of o you can use b, in this case the machine reboots.
It was named, in the title. Try man poweroff in the terminal.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Poweroff command

Post by Cosmo. »

Oh, my fault. :oops: I understood this word as a general paraphrase of what is wanted and I focused (too much) to the description, that the REISUB method does not work, but a terminal could be used. Sorry from my side.

The question in my last post stays valid: Why the freeze at shutdown? This is the source of the trouble with the command.
Reddog1
Level 7
Level 7
Posts: 1937
Joined: Wed Jun 01, 2011 2:12 pm

Re: Poweroff command

Post by Reddog1 »

Most likely, it is a mismatch between your kernel (and what your kernel expects from the system firmware) and your bios. A bios upgrade, or a newer kernel, may fix the problem. The firmware implementation of acpi could be the culprit, and there isn't a lot that can be done about that on Mint's end.
deepakdeshp
Level 20
Level 20
Posts: 12337
Joined: Sun Aug 09, 2015 10:00 am

Re: Poweroff command

Post by deepakdeshp »

Code: Select all

sudo init 0
also should power off
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
HaveaMint
Level 6
Level 6
Posts: 1085
Joined: Fri Feb 02, 2018 9:56 pm

Re: Poweroff command

Post by HaveaMint »

If you have terminal access does "shutdown now" not work?
"Tune for maximum Smoke and then read the Instructions".
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Poweroff command

Post by Cosmo. »

User avatar
RollyShed
Level 8
Level 8
Posts: 2436
Joined: Sat Jan 12, 2019 8:58 pm
Location: South Island, New Zealand
Contact:

Re: Poweroff command

Post by RollyShed »

My question is, why is there a problem?
In 51 installations I've done I've never had a shut-down issue so why has the OP got a problem?

Click on the bottom left corner, click on red square above it "Quit", click on the red Shut Down of the 4 options in the box that appears. Can't be easier so what is not showing or not working for the OP?
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Poweroff command

Post by Cosmo. »

I think, that the OP answered this in viewtopic.php?p=2192582#p2192582
User avatar
RollyShed
Level 8
Level 8
Posts: 2436
Joined: Sat Jan 12, 2019 8:58 pm
Location: South Island, New Zealand
Contact:

Re: Poweroff command

Post by RollyShed »

Cosmo. wrote: Tue Jun 28, 2022 4:13 am I think, that the OP answered this in viewtopic.php?p=2192582#p2192582
If you mean "Under a normal shut down (clicking with the mouse on the shutdown) tends to make the shutdown freeze at the end", that is my question, WHY?

How many others have this problem? Anyone?
As I also said, 51 users I know don't have that problem.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Poweroff command

Post by Cosmo. »

It is very seldom, that's why I was at first on the wrong track. But it exists.
User avatar
RollyShed
Level 8
Level 8
Posts: 2436
Joined: Sat Jan 12, 2019 8:58 pm
Location: South Island, New Zealand
Contact:

Re: Poweroff command

Post by RollyShed »

Cosmo. wrote: Tue Jun 28, 2022 4:46 amIt is very seldom, that's why I was at first on the wrong track. But it exists.
So the next question is which Mint? Cinnamon, MATE, 20.3, 18.1, or some left over something?
What computer?
Is Secure Boot OFF?
Is it using or not, Legacy?

What is special about the systems that give trouble?
pinballfan
Level 2
Level 2
Posts: 74
Joined: Thu Apr 29, 2021 6:43 pm

Re: Poweroff command

Post by pinballfan »

RollyShed wrote: Tue Jun 28, 2022 4:19 am
Cosmo. wrote: Tue Jun 28, 2022 4:13 am I think, that the OP answered this in viewtopic.php?p=2192582#p2192582
If you mean "Under a normal shut down (clicking with the mouse on the shutdown) tends to make the shutdown freeze at the end", that is my question, WHY?

How many others have this problem? Anyone?
As I also said, 51 users I know don't have that problem.
There are some people other than me, like this guy: viewtopic.php?p=2137998#p2137998

I've only experienced problems from the 20 series. The 19 series didn't have this problem. My PC is an LGA 775 core 2 series motherboard. Yes it is old, but everything works fine, and it shuts down using the terminal (just like the guy in the post I linked). Same issue. That user has an I5, which would be a newer motherboard and obviously a newer processor. I also have an AMD graphics card, although it is a HD6570, again older than their 390, but same Intel/AMD brands.
Locked

Return to “Installation & Boot”