Sparks135
Posts: 104
Joined: Tue Feb 28, 2017 7:44 pm

Installed Shutdown Board but doesn't run shutdown

Tue Apr 04, 2017 3:17 am

Below is the directions to install the shutdown/startup board. The problem is that the board turns off the Pi but doesn't run shutdown. Please look at the instructions and see if anything looks wrong with code. I was looking at the chmod +x, could the permissions be wrong so the script isn't run? I don't know where to go from here.

How to set it up
1. Remove your TF card and connect it to your PC or laptop with TF card adapter.
2. Modify /boot/config.txt file as following:
device_tree=bcm2710-rpi-3-b.dtb
dtoverlay=power-off,gpiopin=26
dtoverlay=pi3-act-led,gpio=21

3. Download shell script:
apt-get install -y wiringPi
cd ~
git clone https://github.com/yoyojacky/powerbutton.git
cd ~/powerbutton
sudo mv ~/powerbutton/gpioshutdown /etc/init.d/
sudo chmod +x /etc/init.d/gpioshutdown
sudo vim.tiny /etc/rc.local

Add those three lines before exit 0

sudo /etc/init.d/gpioshutdown
gpio mode 25 out
gpio write 25 1

linuxgnuru
Posts: 8
Joined: Sun Jun 08, 2014 11:43 pm

Re: Installed Shutdown Board but doesn't run shutdown

Sat Jul 22, 2017 5:33 pm

I realize this is now a few months old but there is now a gpio-shutdown overlay (gotta run sudo rpi-update) that will shutdown the pi via systemd (just check /boot/overlays/README for more info) so if you connect the gpio pin (default is 3 / SDA) and a ground the pi will shutdown.

Sparks135
Posts: 104
Joined: Tue Feb 28, 2017 7:44 pm

Re: Installed Shutdown Board but doesn't run shutdown

Sat Jul 22, 2017 5:56 pm

Thanks, there was a problem with my unit. I sent the unit back and it works fine now.

Return to “HATs and other add-ons”