X708 software shutdown is not safe, X708 cuts the power before shutdown is completed | Geekworm

X708 software shutdown is not safe, X708 cuts the power before shutdown is completed


  • Hi! I’m using X708 v2.0 uninterruptible power supply expansion board with Raspberry Pi 4 (Raspbian Buster 11.9, Linux 6.1.21-v8+ aarch64), with the latest X708-script from github installed, all system components are up to date.

    When I use X708 on-board button to shutdown, Raspberry Pi shutdowns firmly and gently, and then X708 cuts the power.

    If I use software shutdown (“x708off” command, which is the alias to “xSoft.sh 0 13”), then X708 cuts the power before Raspberry Pi shutdown (almost immediate).

    Expected shutdown behaviour using “x708off” command is the same as pressing hardware button on top of the X708 HAT - X708 should wait while Raspberry Pi performs safe shutdown and then cut the power.

    Does anybody have the same observations? It is a bug or a feature?

    Kind regards



  • x708 Working principle (from https://wiki.geekworm.com/X708)

    The GPIO13 is used to control the power button, It goes high for 3 seconds that means the power switch is pressed and held for 3 seconds. then the X708 will issue a pulse to inform the system to implement safeshutdown via GPIO5, and will monitor the GPIO12, once shutdown process is implemented, GPIO 12 will go to low and will be recognized by the X708, then the X708 will wait for 7-8seconds then fully cut off power.

    Firstly you have to get the script for power management well installed and run at boot. You can use the onboard power switch to verify , press and hold for 3 seconds, the blue LED will flash slowly and the shutdown is going then all LEDs will be off. once this works, then you can use the GPIO13 control.

    The hardware and its firmware are verified. if you have a DMM, you can use it mesuare the GPIO voltage which will be helpful to understand above.

    Please check the xPWR.sh file, then add sudo sync before “sudo poweroff” and "sudo reboot" line; The sync command will force all data in the system buffer that has not yet been written to disk to be written to disk.

    Hope this helps you.

     


Please login to reply this topic!
BACK TO TOP