Clear all

[Solved] Zero2Go Omini: Prevent hard power-off for long press?

2 Posts
2 Users
Posts: 1
New Member
Topic starter

Hi everybody,

I bought a Zero2Go Omini for use with a Raspi Zero W to create a small interactive music device for my son. The device is equipped with a battery pack and a backup battery to prevent hard shutdowns when the battery pack is empty.

Since this device is cordless, I want to save power and power up the pi only when it is used. So pressing the power button is the way to activate the device and booting up the pi. It should be now stay powered until it is not used for a while. Then it (gracefully) shuts down.

My question is: Is there a way to prevent the hard power-off when pressing the button long? I want to prevent a damaged SD card because my son keeps shutting down the device the hard way by pressing the button long. Otherwise is there a way to *only* wake up the pi by GPIO (i.e. with a separate button)? So pressing the button long/multiple times doesn't matter?

Thanks in advance for your help.

Greetings, Mirko 

Posted : 17/11/2023 6:05 pm
Posts: 145
Member Admin

This behavior is implemented in firmware, and unfortunately there is no configurable option to turn it off.

A possible way is to modify the firmware, and comment out these lines:

This is how to compile firmware for Witty Pi, but you can use the same way to compile Zero2Go Omini firmware:

This is how to upload firmware to Witty Pi, but you can use the same way to upload Zero2Go Omini firmware:

Posted : 18/11/2023 10:08 am