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.