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:


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.

  • 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
    Commented May 16, 2021 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, and this Q&A. 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
    Commented May 17, 2021 at 7:38

2 Answers 2


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


Should be:

^ W not M    ^ 0 not 1

and you must also set:


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.

  • 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
    Commented May 16, 2021 at 19:16

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

  • 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
    Commented May 17, 2021 at 7:19
  • 1
    Why is it a bad idea? I actually run a 5V fan from 3.3V to make it quieter. Commented May 17, 2021 at 9: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. Commented Feb 12, 2022 at 22:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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