0

I need an option to reboot an RPI completly (simulate unplugging it from the power and re-plug via command) I've tried sudo reboot But its not going to run power 0 as I know...

sudo halt 

seems more promising , but I don't know how to turn it on after using that ,so the answer to that would be great!

Thank you guys.

user3710700
  • 109
  • 1
  • 3

1 Answers1

1

The Pi has 3 "components" the CPU, GPIO and Video Core which are relatively independent.

See https://raspberrypi.stackexchange.com/a/100125/8697

Any of the commands halt, shutdown, reboot (which are equivalent) will reset the CPU to its bootup state.

The Video Core continues to run, and the GPIO pins retail their state.

It is only possible to reset the Video Core and GPIO by cycling power OR pulling the RUN pin low, which will cause a clean restart.

On the odd occasion when I need to do this I run shutdown or pull the gpio-shutdown pin LOW then after this is completed RESET.

On most models (Pi4 excepted) you can use Pin 5 to perform a shutdown and powerup. See Raspberry Pi 3 model B "dtoverlay=gpio-shutdown"

Milliways
  • 62,573
  • 32
  • 113
  • 225