Posts: 2
Joined: Sat Aug 11, 2012 4:47 pm

How do I know when it has properly shutdown?

Sat Aug 11, 2012 4:50 pm

When I do a "shutdown now" the screen goes blank and all I see in the top left corner is a flashing cursor.

It's been like this for about 15 minutes now.

Does this mean it has shutdown properly or is it still in the process of shutting down?

User avatar
Posts: 148
Joined: Sat Jun 30, 2012 6:59 pm

Re: How do I know when it has properly shutdown?

Sat Aug 11, 2012 5:06 pm

I use shutdown -h now and eventually it sends no signal to the display and there is only a red light left on the Pi

Most OSs fail to shutdown completely though I noticed and leave it hanging like in your case, then I just unplug it

User avatar
Posts: 675
Joined: Mon Mar 05, 2012 11:54 pm
Location: Herefordshire (U.K.)

Re: How do I know when it has properly shutdown?

Sat Aug 11, 2012 5:28 pm

Personally I just type in 'sudo halt' which seems to do the trick... it tells you what it is doing, my screen goes blank, and I am just left with the red power light on my RasPi.

User avatar
Forum Moderator
Forum Moderator
Posts: 2869
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: How do I know when it has properly shutdown?

Sat Aug 11, 2012 7:48 pm

sudo halt and sudo shutdown -h now are equivalent, but sudo halt is shorter :)

You should get a message like this...

...and then you should have nothing but the power LED on your Pi illuminated. Once that happens, it's safe to pull the plug. A few more shutdown options are outlined in this blog post... ... spberry-pi
Alex Eames RasPi.TV, RasP.iO

User avatar
Posts: 816
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
Contact: ICQ

Re: How do I know when it has properly shutdown?

Sat Aug 11, 2012 8:59 pm

For extremely fast shutdown potential, save your critical working documents then maybe 'sudo sync' to get all your files saved, and pull the plug. The ext4 filesystem should recover from any post sync unwritten packets. Not all types of configuration are saved, but for a fast exit... By this I mean if your windows are remembered and open as last shutdown, then it is likely that on re-powering, the set of windows the time before last time would be opened, and not last times windows.

Cheers Jacko
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028

W. H. Heydt
Posts: 11070
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: How do I know when it has properly shutdown?

Sun Aug 12, 2012 2:45 am

If you're going to do sync follwed by a quick shutdown, do the sync twice, as

sudo sync; sync

When you get the next prompt, do your shutdown. There reason for this (and assuming--always dangerous--that Linux sync works like unix sync) is that sync will allow the system to issue a new prompt *immediately* and not hold the session until it completes. If you do it the way I gave above, the second sync operation can't start until the first one finishes, so when you get a prompt, you are guaranteed that the first sync has completed. There won't be anything for the second sync to do, so it's safe to shut the system down.

There is one other consideration...SD cards are internally buffered and do wear-leveling. There may be card activity (that requires power) *after* the system halts--though not for very long in human terms.

To get at the power connector to my Pi, I have to get up and move around a small table, so I figure that once the system appears to be truly down (e.g. PuTTY has reported no signal), and I get to the power connector, the SD card has finished anything it might be doing as well.

An alternative is to give the Pi about 5 seconds between system actually halted and pulling the plug on it.

Return to “Troubleshooting”