0

I have a Pi 3 and Pisound (hat) and to turn it off I just unplug the cable. Now oddly, if I plug it back in right away I just get a red light, no blinking yellow BUT If I wait a few minutes to plug it back in then I get the blinking and it boots up. I do not take the SD card out or do anything other than wait. I have no other cables hooked up at all and no battery.

What is the cause of this?

  • 2
    Bad idea just unplugging the cable you may corrupt your sd card. You should always shutdown. – CoderMike Aug 20 at 6:39
  • What operating system do you use? Do you use a read-only system installation? Please address me with @Ingo, otherwise I won't see your reply. – Ingo Aug 20 at 11:15
  • This is a guitar effects pedal so during a live gig I can't always just shut it down the right way when I have to get off the stage. – Elijah Lynn Aug 20 at 18:43
  • 2
    For the downvotes here, please comment here on how this can be a better question. I think this is a valid question and you aren't teaching me anything by downvoting without a comment. – Elijah Lynn Aug 20 at 18:45
  • 1
    A downvote means "This question does not show any research effort; it is unclear or not useful" - in particular this is no different to the hundreds who ask about unplugging cables. – Milliways Aug 21 at 10:10
1

Raspbian is not a fail save power down operating system. This is because it uses extensive caching mechanism to increase performance as in general unix systems do it. So if you write data to the disk it is not really written to it (except the device is configured "pass through"). Instead it is hold in a buffer with a "dirty bit" set and written minutes later when the operating system is idle. If you just interrupt the power supply then it may be that you lost the data in the buffer. On next boot up the operating system detects with "dirty bit" set that there was an interrupted shutdown before and takes many effort to check failures and try to repair corrupted data on the storage. This take some time and may explain why you can start again only after some minutes.

But it is not guaranteed that the operating system can fix corrupted data. Depending on what you are doing it may work some time but you always risk to destroy your operating system. So never just unplug the power cord. Before doing it you should initiate a clean shutdown, for example with:

~$ sudo systemctl poweroff

Then the operating system has time to write all buffered data to the disk and unmount them and do other important things for saving the status.

  • Superhelpful, thank you! Looks like I need an external power down button to invoke that script if I want to use this as a live effects processor then. – Elijah Lynn Aug 20 at 23:49
  • @ElijahLynn There are also many questions with answer how to make a power down button. Just search for it. – Ingo Aug 21 at 6:35
  • Thanks, the Pisound has a button I can program a script into, I'll use that supported method. – Elijah Lynn Aug 21 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.