BalenaOS shutdown on RPi CM4 does not really shutdown?

My setup is an RPi CM4 with BalenaOS on a carrier board.

I am shutting down the device with:

curl -X POST --header "Content-Type:application/json" "$BALENA_SUPERVISOR_ADDRESS/v1/shutdown?apikey=$BALENA_SUPERVISOR_API_KEY"

as defined in the documentation, or with the shutdown command on balenacloud which seems to have the same effect. I can see in balenacloud that using this command shuts down each docker one after the other.

The CM4 is still supplied with power, but should be shut down. However, the CM4 still outputs voltages, meaning it is not actually off.

This is confirmed by a current consumption measure with OTII, the devices consumes 90mA of current after shutdown.

The same setup with Raspberry Pi OS instead of BalenaOS consumes 5mA of current, and does not output any voltages despite being supplied with power, when shutdown with sudo shutdown.

Does the shutdown command not actually shut the device down? Is there a way to actually shut it down in software?

Thanks for your help,
Nara

Hi,

thanks for your report. Just to confirm, when you say “The same setup with Raspberry Pi OS”, does that mean the same CM4, same carrier board, just different data on the SD card / eMMC? Whether shutdown actually shuts the device down or just enters “sleep mode” is controlled by the bootloader firmware as described in the RPi docs: Raspberry Pi Documentation - Raspberry Pi Hardware
Is there any chance your two testing setups had this flipped?

Thanks for your answer,

I confirm it was the same exact carrier board on both tests but it’s been a while so I’m unsure if the CM4 was the same in both tests or not.

Thanks for the lead on the sleep/halt mode. How should I go about checking the value of WAKE_ON_GPIO and POWER_OFF_ON_HALT for BalenaOS?

Hi, the bootloader configuration is embedded into the bootloader eeprom image. There are no tools on balenaOS to modify this configuration so this has to be done from RaspberryPi OS as described in Raspberry Pi Documentation - Raspberry Pi Hardware.

What I would suggest is that you first run RaspberryPi OS, make sure the shutdown works as expected which means the bootloader configuration is correct, and then try balenaOS on the same hardware. The results should be the same.