7

I am working on power supply to a Raspberry Pi where changing the state of one of the GPIO lines shuts off power immediately. Is it safe to do this in run level zero, or is there more shutting down to be done from there before power off? If not is there a better place to do it?

The reason I ask is because the Raspberry Pi is an embedded system that cannot turn off it's own power. Power down is usually done by the operator switching it off at the wall, but in my case it will be part of a remote battery powered system where it is not required to run all the time.

Xian
  • 197
  • 6
  • +1. There are many Unix-like systems (embedded, servers, etc) which remain on even after run level zero, and the reasons why are not always well understood. – Stefan Lasiewski Jan 23 '13 at 21:46
  • 1
    Are you also wondering "If the system is at run level 0, why is it still powered on? Why does it not power off by itself?", then I suggest you edit the question to see if the community can provide more clarity. I think some folks voted down your question because your question itself if too basic. But I bet you can expand on your question a bit and help us all to learn something. – Stefan Lasiewski Jan 23 '13 at 21:51

1 Answers1

11

If the system has reached runlevel 0, it can be safely powered off. Not so many years ago, before ATX, you had to turn off a PC system by hand because it couldn't power down itself.

Sven
  • 97,248
  • 13
  • 177
  • 225
  • 1
    Most systems will display some kind of message upon reaching runlevel 0 ("Turn off the system", "Operating System Halted", "It is now safe to turn off your computer", etc.) or drop you into the hardware boot monitor (this is how SPARC Solaris systems behave). – voretaq7 Jan 23 '13 at 21:51