First, I was hoping to use the "BootOK" signal to interface with a relay. This would turn off power to the other controllers when the Pi is off since they're unable to function without it. Unfortunately, the PWM (?) output on this signal while the Pi is starting/shutting down was unexpected and makes this much more complicated. I personally don't feel it's particularly necessary either, at least on this signal. In my case, it would be preferred that the BootOK signal was purely high/low to indicate the 'ready' state of the Pi.What other controllers do you refer to?
This kind of leads into the second item as well. The dimmed BootOK LED is nice in that it shows the Pi is on but not yet 'ready', but I feel like this would be better suited to the status LED since it's more likely to be visible. The various flashing states of the status LED on shutdown/reboot are quite effective.
Are these things that could be modified in the firmware?The bootOK is an input to ATXRaspi, and the BOOTOK green LED is hardwired to it, so it cannot be changed in firmware.
Finally, I have no idea if this is frowned upon, however I followed a post here (https://askubuntu.com/questions/1010120/intercept-shutdown-call-and-run-script-to-allow-or-prevent-shutdown) to replace the original shutdown script with the soft power off script. It works fantastically so selecting shutdown from the webui runs the soft power off.ATXRaspi triggers a OS shutdown and then cuts power off completely, which the Pi cannot do on its own. You can see the guide for a soft shutdown (https://lowpowerlab.com/guide/atxraspi/full-pi-poweroff-from-software/) that triggers Atxraspi to then do the hard shutdown instead.
Anyway, thanks for your efforts Felix. Such a simple function but really makes the user experience a lot better.You're welcome!
What other controllers do you refer to?
While the Pi boots up the bootOK may be open drain or some other state that makes the LED very faint but not enough to be a HIGH as required by the Pi, it's a known artifact but has no effect on the functionality of ATXRaspi or the Pi.
The bootOK is an input to ATXRaspi, and the BOOTOK green LED is hardwired to it, so it cannot be changed in firmware.
ATXRaspi triggers a OS shutdown and then cuts power off completely, which the Pi cannot do on its own. You can see the guide for a soft shutdown (https://lowpowerlab.com/guide/atxraspi/full-pi-poweroff-from-software/) that triggers Atxraspi to then do the hard shutdown instead.
Altering the state of the status LED during the bootup process (dim/flashing) would be possible via firmware though?The firmware would need to keep BootOK as an output. But we need BootOK as an input to decide when to flip the internal state and know the Pi has booted. Perhaps the pulldown would be more appropriate if it really bothers you.
Understood. What I was referring to was replacing Raspbian's built-in shutdown script with a new script containing a portion of your code that triggers the ATXRaspi (depending on arguments). This way, any call to shutdown the Pi results in the ATXRaspi doing its business and the Pi completely powering off. This is great because it allows me to perform a complete power off from Fluidd (the interface I'm using for Klipper) without having to modify the source to call a different shutdown script/alias.That can be made possible but I have not tried. If you're successful and it's something that is reliable and easy to change I can add the details in the guide.
The firmware would need to keep BootOK as an output. But we need BootOK as an input to decide when to flip the internal state and know the Pi has booted.
That can be made possible but I have not tried. If you're successful and it's something that is reliable and easy to change I can add the details in the guide.
#!/bin/bash
BUTTON=10
arg="${1}"
case $arg in
-r)
shutdownoriginal -r now
;;
*)
#setup GPIO 10 as output and set to HIGH
echo "$BUTTON" > /sys/class/gpio/export;
echo "out" > /sys/class/gpio/gpio$BUTTON/direction
echo "1" > /sys/class/gpio/gpio$BUTTON/value
/bin/sleep 1
#restore GPIO 10
echo "0" > /sys/class/gpio/gpio$BUTTON/value
;;
esac