Shutting Down/Turning Off


21 posts
by spamurai » Fri Jun 22, 2012 3:40 pm
Hello,

Ok so i'm a COMPLETE newbie, but i wanted to check something before i go ahead and do it incase i break it :lol:

I've just logged out of the graphical interface and shut it down. The terminal has now stopped and it reads "System halted"...
I'm assuming its ok to pull out the power cable now(in order to turn it off)?

Sorry again for, what is probably a silly question. 8-)
There are 10 types of people in the world. Those that understand binary and those that don't!
01101000 01100001 01101000 01100001
User avatar
Posts: 33
Joined: Wed Jun 20, 2012 9:58 am
Location: Suffolk, UK
by SN » Fri Jun 22, 2012 3:45 pm
yup - system halted is the right state for pulling the power with no after-effects
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?
User avatar
Posts: 1008
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
by spamurai » Fri Jun 22, 2012 3:46 pm
SN wrote:yup - system halted is the right state for pulling the power with no after-effects

Thank you sir :D
There are 10 types of people in the world. Those that understand binary and those that don't!
01101000 01100001 01101000 01100001
User avatar
Posts: 33
Joined: Wed Jun 20, 2012 9:58 am
Location: Suffolk, UK
by alexeames » Fri Jun 22, 2012 4:14 pm
Yes. The Pi doesn't power down by itself. Once it says halted you can pull the plug safely :D
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2096
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by Rodney Wertz » Sat Jun 23, 2012 6:22 pm
If you are using the command line type:

sudo shutdown -h now

unplug after it says the system is halted.

-Rodney
Posts: 24
Joined: Sun Jun 03, 2012 12:22 am
Location: Wolfforth, Texas
by spamurai » Sat Jun 23, 2012 6:48 pm
Rodney Wertz wrote:If you are using the command line type:

sudo shutdown -h now

unplug after it says the system is halted.

-Rodney


Oh cool, thats handy to know. Thanks (:

I'm still looking into a switch I can adapt/use to turn the power off without unplugging it everytime. Proving difficult.
There are 10 types of people in the world. Those that understand binary and those that don't!
01101000 01100001 01101000 01100001
User avatar
Posts: 33
Joined: Wed Jun 20, 2012 9:58 am
Location: Suffolk, UK
by alexeames » Sat Jun 23, 2012 7:07 pm
spamurai wrote:
Rodney Wertz wrote:If you are using the command line type:

sudo shutdown -h now

unplug after it says the system is halted.

-Rodney


Oh cool, thats handy to know. Thanks (:

I'm still looking into a switch I can adapt/use to turn the power off without unplugging it everytime. Proving difficult.


And if you just want to reboot, you can change the -h for an -r
Actually I wrote a short blog post on shutting down properly earlier today (in case you're interested).
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2096
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by pbezza » Tue Jun 26, 2012 9:41 am
I started mineu up to test it but dont have a usb keyboard to plug in. What happens if i disconnect the power now without shutting down?
Posts: 2
Joined: Tue Jun 26, 2012 9:39 am
by RaTTuS » Tue Jun 26, 2012 9:45 am
pbezza wrote:I started mineu up to test it but dont have a usb keyboard to plug in. What happens if i disconnect the power now without shutting down?

probably not a lot ...
it depends
it should recover
http://www.catb.org/esr/faqs/smart-questions.html <- ask smart Questions
"That's not right, the badgers have moved the goalposts."
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX - Prosliver FTW
User avatar
Posts: 5627
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
by spamurai » Thu Jun 28, 2012 11:45 pm
alexeames wrote:And if you just want to reboot, you can change the -h for an -r
Actually I wrote a short blog post on shutting down properly earlier today (in case you're interested).


Thats an interesting read. Thanks for posting the link :D
There are 10 types of people in the world. Those that understand binary and those that don't!
01101000 01100001 01101000 01100001
User avatar
Posts: 33
Joined: Wed Jun 20, 2012 9:58 am
Location: Suffolk, UK
by Babbage6913 » Tue Jul 03, 2012 6:17 pm
Hi all,

If you add -P to your shutdown command, it powers off, so try:

sudo shutdown -h -P now

I'm using the composit out atm, and with this command tv goes to a blue no signal screen. Not sure what happens with hdmi, so can someone test it and let us know?

Pat
Posts: 4
Joined: Tue Jul 03, 2012 6:09 pm
by Nr90 » Tue Jul 03, 2012 7:27 pm
Babbage6913 wrote:Hi all,

If you add -P to your shutdown command, it powers off, so try:

sudo shutdown -h -P now

I'm using the composit out atm, and with this command tv goes to a blue no signal screen. Not sure what happens with hdmi, so can someone test it and let us know?

Pat


It stays on system halted, does not power down.
Don't think you can power down from software in this case, it might just stop sending the composite signal.
Posts: 213
Joined: Sat Nov 26, 2011 12:39 pm
by alexeames » Tue Jul 03, 2012 9:44 pm
Nr90 wrote:It stays on system halted, does not power down.
Don't think you can power down from software in this case, it might just stop sending the composite signal.


Correct. In fact the current draw increases slightly on shutdown. :D
Once halted you have to pull the plug to power down (or switch if you have one set up).
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2096
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by dom » Tue Jul 03, 2012 10:19 pm
alexeames wrote:Correct. In fact the current draw increases slightly on shutdown. :D
Once halted you have to pull the plug to power down (or switch if you have one set up).


Actually I pushed an improvement at the weekend where "sudo poweroff" now will try to reduce power.
You should see the Network LEDs go off, 10 flashes on OK LED and a low power state.
I'd be interested. If someone can measure current on 5V line now.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4100
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by alexeames » Tue Jul 03, 2012 10:37 pm
dom wrote:
alexeames wrote:Correct. In fact the current draw increases slightly on shutdown. :D
Once halted you have to pull the plug to power down (or switch if you have one set up).


Actually I pushed an improvement at the weekend where "sudo poweroff" now will try to reduce power.
You should see the Network LEDs go off, 10 flashes on OK LED and a low power state.
I'd be interested. If someone can measure current on 5V line now.


Is that for both Squeeze and Wheezy?
Would a sudo apt-get update pull that one in in wheezy or does it need an rpi-update?
Once I get that sorted I can do a measurement :D
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2096
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by dom » Tue Jul 03, 2012 10:42 pm
alexeames wrote:Is that for both Squeeze and Wheezy?
Would a sudo apt-get update pull that one in in wheezy or does it need an rpi-update?
Once I get that sorted I can do a measurement :D


You need an rpi-update. I don't believe Wheezy firmware package has been updated.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4100
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by D.E.L.B. » Wed Jul 04, 2012 6:00 pm
Raspberry Pi does not shut down like the Windows OS does, you have to bear in mind that the Pi runs on a type of Linux OS depending on which one you use (Debian Squeeze, Arch Linux, QtonPi). Windows halts and powers down the physical computer at the same time.

The Pi does not, it needs to be halted AND then shut down by just pulling the power out of the mains of the Pi.

All you have to do is type sudo su while logged into the Pi account or one you have created, and type: halt.

It's as easy as that.
User avatar
Posts: 92
Joined: Sat Jun 09, 2012 7:16 pm
Location: Wales, UK
by Mortimer » Wed Jul 04, 2012 6:14 pm
It's much easier to describe than that isn't it?

A PC or a Mac has a software controlled power switch, so the machine can turn itself off.
The Raspberry Pi does NOT have a software controlled switch, so you have to remove the power yourself.
User avatar
Posts: 721
Joined: Sun Jun 10, 2012 3:57 pm
by Nr90 » Wed Jul 04, 2012 6:50 pm
Mortimer wrote:It's much easier to describe than that isn't it?

A PC or a Mac has a software controlled power switch, so the machine can turn itself off.
The Raspberry Pi does NOT have a software controlled switch, so you have to remove the power yourself.


Indeed, Linux on x86 will also power down.
Posts: 213
Joined: Sat Nov 26, 2011 12:39 pm
by alexeames » Wed Jul 04, 2012 6:58 pm
dom wrote:
alexeames wrote:Correct. In fact the current draw increases slightly on shutdown. :D
Once halted you have to pull the plug to power down (or switch if you have one set up).


Actually I pushed an improvement at the weekend where "sudo poweroff" now will try to reduce power.
You should see the Network LEDs go off, 10 flashes on OK LED and a low power state.
I'd be interested. If someone can measure current on 5V line now.



OK Dom it goes from 5.00V 0.42A at cli idle
sudo halt
screen goes blank after "will now halt". LEDs go off apart from power
5.00-5.02V 0.12A

So that's a big power saving now from 0.42A to 0.12A - nice one. :D
About 2 watts at idle down to about half a watt.
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2096
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by ashbash » Thu Jul 12, 2012 11:55 am
Has anyone actually designed and created a shutdown switch yet? :o

I see a lot of talk on the forums about it but no action. I am planning to put one into the GPIO and poll for the state then initiate a shutdown after neatly closing any running software etc.

Any thoughts/comments.

Ash

See the switch portion of the circuit designed here - http://www.raspberrypi.org/archives/1417
Posts: 50
Joined: Fri Jun 01, 2012 9:20 am