This is a known and totally irritating issue on an otherwise great board (I have two running as a NAS box (one primary, one backup). They run for years without fail except this issue.
Putting a 10K ohm resistor across pins 4 and 6 helps but is not 100% a fix.
https://forum.pine64.org/showthread.php?...#pid118141
if this is mission critical then add an esp per this post.
https://forum.pine64.org/showthread.php?...#pid111817
I used a wemos d1 mini with relay shield https://www.wemos.cc/en/latest/d1/d1_mini.html
they are cheap at aliexpress and compact so it fits easy inside the NAS box.
you can take 5v power and ground from that pad next to the audio jack. Hook up an input gpio to pin 1 on the RP64 pi-2 header (3.3v). That only is high when the machine has booted so when there is a failure it will be low. That is what your esp will look for. There will be some soldering across the power button pcb contacts and those two wires to go to the relay.
I use tasmota on my esp. When boot fails one must hold power button for 3 secs (which for sure powers it down) then a momentary push of the power button and it will ALWAYS boot. So I have a tasmota rule that if pin 1 (on rp64) is low then close relay across power button for 3 seconds then open and close relay momentarily, then wait to see if it came up. If not then try again. It also sends out an mqtt message if it boot failed and it has to do this procedure or worse it never gets the board to boot up. It's also possible (via mqtt message) to "force" a power off/on.
if you use an esp32-s2 D1 mini instead you can program this all in Berry which will likely be easier than tasmota rules.
Putting a 10K ohm resistor across pins 4 and 6 helps but is not 100% a fix.
https://forum.pine64.org/showthread.php?...#pid118141
if this is mission critical then add an esp per this post.
https://forum.pine64.org/showthread.php?...#pid111817
I used a wemos d1 mini with relay shield https://www.wemos.cc/en/latest/d1/d1_mini.html
they are cheap at aliexpress and compact so it fits easy inside the NAS box.
you can take 5v power and ground from that pad next to the audio jack. Hook up an input gpio to pin 1 on the RP64 pi-2 header (3.3v). That only is high when the machine has booted so when there is a failure it will be low. That is what your esp will look for. There will be some soldering across the power button pcb contacts and those two wires to go to the relay.
I use tasmota on my esp. When boot fails one must hold power button for 3 secs (which for sure powers it down) then a momentary push of the power button and it will ALWAYS boot. So I have a tasmota rule that if pin 1 (on rp64) is low then close relay across power button for 3 seconds then open and close relay momentarily, then wait to see if it came up. If not then try again. It also sends out an mqtt message if it boot failed and it has to do this procedure or worse it never gets the board to boot up. It's also possible (via mqtt message) to "force" a power off/on.
if you use an esp32-s2 D1 mini instead you can program this all in Berry which will likely be easier than tasmota rules.