0

I am trying to make sure my fan turns off when I power off my raspberry pi (without having to unplug it). My fan is connected to the 3.3V pin. I didn't connect it to the 5V pin because I deemed the 3.3V was good enough and the noise was less.

I used the following commands in attempt to make sure my fan was off when I powered down my pi:

MAKE_ON_GPIO=1
POWER_OFF_ON_HALT=1

Then I shutdown my pi: sudo shutdown -h now

Fan is still running though and I have to unplug it from the power adapter to fully turn it off.

Also, does anyone know how I can power my pi back up after shutting it down without need a power button. I am assuming definitely not, but worth a shot to ask!

BTW, I am running ubuntu.

beeeZeee
  • 3
  • 2
  • what action or signal are you seeking to power the pi on again? External circuitry can simulate a "power button" for whatever action you are considering. – Abel May 16 '21 at 15:23
  • The 3V3 supply is disabled upon `halt`, `shutdown`, or `poweroff` commands if you have `WAKE_ON_GPIO=0` ***AND*** `POWER_OFF_ON_HALT=1`. To re-boot, you can **momentarily** short `GLOBAL_EN` to ground. More details in [this old-ish answer](https://raspberrypi.stackexchange.com/questions/114422/what-is-the-minimum-power-required-for-an-rpi-4-in-halt-or-shutdown/114423#114423), and [this Q&A](https://raspberrypi.stackexchange.com/questions/114440/starting-pi-4-with-global-en/114446#114446). I don't use a button, but I do have a wire jammed in `GLOBAL_EN` via that I "scratch" on a USB housing :) – Seamus May 17 '21 at 07:38

2 Answers2

4

Going by this: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md

MAKE_ON_GPIO=1

Should be:

WAKE_ON_GPIO=0
^ W not M    ^ 0 not 1

and you must also set:

POWER_OFF_ON_HALT=1  

Both of these parameters must be set to disable the 3V3 supply on halt, shutdown or poweroff.

Also, you did not say how you "used the following commands" but if you just entered them as environment variables or something that won't work; you need to edit the bootloader config in the EEPROM. There are instructions on the page linked above.

Seamus
  • 18,728
  • 2
  • 27
  • 57
goldilocks
  • 56,430
  • 17
  • 109
  • 217
  • 1
    Just tried myself on a Pi4B. You do need to have `WAKE_ON_GPIO=0` and `POWER_OFF_ON_HALT=1` for the 3V3 pins to be switched off. – joan May 16 '21 at 19:16
2

While I think powering a fan from 3.3V is a bad idea (it is easy enough to power from 5V and use a transistor to control it) the settings you are using are mutually incompatible.

You can not have power off and WAKE_ON_GPIO=1

POWER_OFF_ON_HALT=1 turns off the PMIC and removes all power except 5V

Milliways
  • 54,718
  • 26
  • 92
  • 182
  • You must set both `WAKE_ON_GPIO=0` and `POWER_OFF_ON_HALT=1` to disable the 3V3 output after `halt`, `shutdown` or `poweroff`. – Seamus May 17 '21 at 07:19
  • 1
    Why is it a bad idea? I actually run a 5V fan from 3.3V to make it quieter. – Dmitry Grigoryev May 17 '21 at 09:11
  • Some fans don't run as well or can break when run for long periods at voltages higher or lower than their rating. In practice, I haven't seen an issue with most of the fans I've run this way, but they do likely cool less efficiently, and you probably void the warranty. – geerlingguy Feb 12 '22 at 22:29