hi, you can update the latest library https://github.com/m5stack/M5Stack.git
use the M5.powerOFF(); software way to turn off.