I'm still learning about the device tree in general and am definitely fumbling about a bit.

The problem
Pi Zero W draws basically zero current when shutdown with sudo shutdown now. After adding the line dtoverlay=gpio-poweroff,gpiopin=4 to /boot/config.txt, the current drawn actually increases after shutdown, from around 80mA to around 140mA.

I wish to have a led turn on as soon as the PI is booting, and then turn it off in my program when all processes are ready. The above line was the most promising solution I could find for making the led turn off on shutdown, and on immediately after power on.
My PIs are going to be battery powered, in a situation where physically disconnecting power may not be particularly practical. Using a relay may be possible, and necessary, but for now I'd like to know if a solution exists to avoid power consumption after shutdown.

  • You are following a futile trail. This is intended to control external hardware and has nothing to do with power usage. It is not a reliable indicator.
    – Milliways
    Jul 7 at 9:40
  • NOTE all Pi models consume current when shutdown unless you provide some power control.
    – Milliways
    Jul 7 at 9:42
  • Something is changing with the dtoverlay command - the shutdown current without is 0.00A. Of course there is still some power (GPIO seems to still be enabled), but the current draw is, relatively speaking, massively increased and the chip feels very hot to the touch, by adding the dtoverlay line.
    – Rasmus_SB
    Jul 7 at 9:49

The Pi has 3 "components" the CPU, GPIO and Video Core which are relatively independent. Even when the Pi is shutdown the Video Core continues to run, and the GPIO pins retain their state; only the CPU is not running.

According to the Foundation the Pi Zero draws 55mA on shutdown; the ZeroW would be expected to draw more, as would any connected devices.

Nothing you can do on the Pi is going to reduce this

gpio-poweroff is to signal your power supply that you want it to cut power to the Pi once the kernel is ready. The normal process is that the kernel tells the firmware to go into the halt state but if you have gpio-poweroff enabled, it doesn't do this and just waits for the power to be cut. If the power isn't cut within 3 seconds then it forces a kernel panic and it'll stay like that until you reset it.

  • I feel you disregard the bit where I mention current draw. Maybe I should have clarified, but I'm reading those values from a usb amp meter; Without dtoverlay=gpio-poweroff,gpiopin=4, the current is below 10mA on shutdown. With it, it rises to around 140mA (fluctuating). Furthermore, the ACT led stays on and the main chip remains hot to the touch. Clearly the above line makes a difference in the shutdown process.
    – Rasmus_SB
    Jul 8 at 7:03
  • @Rasmus_SB I am not ignoring this and it may be true, but as you have provided no detail of what is connected no one can say. You are ignoring the simple fact that gpio-poweroff "Drives a GPIO high or low on poweroff". What effect this will have depends on what is connected, but it will have no other effect on power consumption and is intended to signal to power management circuitry.
    – Milliways
    Jul 8 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.