seanspotatobusiness
Posts: 192
Joined: Tue May 22, 2012 11:19 pm

Pi doesn't boot when pins 5 and 6 are momentarily shorted

Sat Sep 01, 2018 11:59 am

I read that the Pi 3 B can be turned on by shorting physical pins 5 and 6 but mine doesn't respond to this. It powers on if I disconnect and reconnect power but that's a bit less convenient and I wanted to use a momentary switch to trigger the power-on.

Edit: I don't want to use the button to shutdown the Pi and I don't want to use the "run" header because pressing that accidentally while powered on could corrupt the file system and lose unsaved data.
Last edited by seanspotatobusiness on Sat Sep 01, 2018 2:42 pm, edited 1 time in total.
Raspberry Pi 3 B and B+
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"

gordon77
Posts: 4487
Joined: Sun Aug 05, 2012 3:12 pm

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Sat Sep 01, 2018 12:13 pm

It may need to be enabled by simply adding the following line to /boot/config.txt:

dtoverlay=gpio-shutdown

seanspotatobusiness
Posts: 192
Joined: Tue May 22, 2012 11:19 pm

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Sat Sep 01, 2018 12:17 pm

gordon77 wrote:
Sat Sep 01, 2018 12:13 pm
It may need to be enabled by simply adding the following line to /boot/config.txt:

dtoverlay=gpio-shutdown
Is that for shutting down the Pi or turning it on? I'm only trying to get a button to turn on the Pi. I don't want the button to also trigger shutdown.
Raspberry Pi 3 B and B+
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"

gordon77
Posts: 4487
Joined: Sun Aug 05, 2012 3:12 pm

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Sat Sep 01, 2018 12:21 pm

I believe it will do both, don't know if they can be separated.

DirkS
Posts: 10127
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Sat Sep 01, 2018 2:23 pm

gordon77 wrote:
Sat Sep 01, 2018 12:13 pm
It may need to be enabled by simply adding the following line to /boot/config.txt:

dtoverlay=gpio-shutdown
How can it do startup if the Pi is not running?

From the overlays readme (/boot/overlays/README):
This overlay only handles shutdown. After shutdown, the system
can be powered up again by driving GPIO3 low. The default
configuration uses GPIO3 with a pullup, so if you connect a
button between GPIO3 and GND (pin 5 and 6 on the 40-pin header),
you get a shutdown and power-up button.

gordon77
Posts: 4487
Joined: Sun Aug 05, 2012 3:12 pm

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Sat Sep 01, 2018 2:52 pm

I stand corrected. I think I mixed up the old and new operations.

Shorting pins 5 & 6 on my Pi3B+ causes it to boot up, if powered and previously shutdown. no change in settings required

To shutdown you can set

Code: Select all

dtoverlay=gpio-shutdown,gpio_pin=21
21 is the chosen GPIO , strangely 3 doesn't seem to work

klricks
Posts: 6777
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Sat Sep 01, 2018 3:02 pm

gordon77 wrote:
Sat Sep 01, 2018 12:13 pm
It may need to be enabled by simply adding the following line to /boot/config.txt:

dtoverlay=gpio-shutdown
The overlay is only required to add shutdown function to pins 5 (GPIO3) & 6.
Startup from pins 5 and 6 is always enabled.

OP are you sure you are using the correct pins?
Type pinout at the command line.

Be sure not to connect the wrong pins else your RPi3B+ could be instantly destroyed.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

gordon77
Posts: 4487
Joined: Sun Aug 05, 2012 3:12 pm

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Sat Sep 01, 2018 3:10 pm

klricks wrote:
Sat Sep 01, 2018 3:02 pm
gordon77 wrote:
Sat Sep 01, 2018 12:13 pm
It may need to be enabled by simply adding the following line to /boot/config.txt:

dtoverlay=gpio-shutdown
The overlay is only required to add shutdown function to pins 5 (GPIO3) & 6.
Startup from pins 5 and 6 is always enabled.

OP are you sure you are using the correct pins?
Type pinout at the command line.

Be sure not to connect the wrong pins else your RPi3B+ could be instantly destroyed.
I couldn't get dtoverlay=gpio-shutdown,gpio_pin=3 (PIN 5&6)to shutdown BUT dtoverlay=gpio-shutdown,gpio_pin=21 (PIN39&40)does.

DirkS
Posts: 10127
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Sat Sep 01, 2018 3:25 pm

gordon77 wrote:
Sat Sep 01, 2018 3:10 pm
I couldn't get dtoverlay=gpio-shutdown,gpio_pin=3 (PIN 5&6)to shutdown BUT dtoverlay=gpio-shutdown,gpio_pin=21 (PIN39&40)does.
There is a potential conflict with I2C
and on Jessie you need to add a udev rule

gordon77
Posts: 4487
Joined: Sun Aug 05, 2012 3:12 pm

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Sun Sep 02, 2018 8:55 am

DirkS wrote:
Sat Sep 01, 2018 3:25 pm
gordon77 wrote:
Sat Sep 01, 2018 3:10 pm
I couldn't get dtoverlay=gpio-shutdown,gpio_pin=3 (PIN 5&6)to shutdown BUT dtoverlay=gpio-shutdown,gpio_pin=21 (PIN39&40)does.
There is a potential conflict with I2C
and on Jessie you need to add a udev rule
Thanks. It was the I2C conflict stopping GPIO 3 from shutting it down. Disabling I2C (Preferences, Pi Configuration,Interfaces etc...) and it now performs as it used to on the old OS. Connecting 5&6 shuts it down, and again boots it up.

seanspotatobusiness
Posts: 192
Joined: Tue May 22, 2012 11:19 pm

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Sun Sep 02, 2018 10:10 am

I'm sure I have the right pins. It's pins 5 and 6 on this image:

Image
Raspberry Pi 3 B and B+
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"

User avatar
AdamStanislav
Posts: 147
Joined: Sun Mar 10, 2019 2:44 am
Location: Wisconsin
Contact: YouTube

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Sun Mar 31, 2019 11:26 pm

seanspotatobusiness wrote:
Sun Sep 02, 2018 10:10 am
I'm sure I have the right pins. It's pins 5 and 6 on this image:

Image
So, am I right in assuming shorting pins 5 and 9 momentarily would accomplish the same? Because my RPi is in an acryllic case that uses pins 4 and 6 to power up the cooling fan.

User avatar
Imperf3kt
Posts: 3220
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Sun Mar 31, 2019 11:29 pm

You can short Pin 5 to any ground point, which includes all metal ports on the Pi. As long as you have the dtoverlay in config.txt
55:55:44:44:4C
52:4C:52:42:41

User avatar
AdamStanislav
Posts: 147
Joined: Sun Mar 10, 2019 2:44 am
Location: Wisconsin
Contact: YouTube

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Mon Apr 01, 2019 2:37 am

Thanks.

DirkS
Posts: 10127
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Mon Apr 01, 2019 5:45 pm

Imperf3kt wrote:
Sun Mar 31, 2019 11:29 pm
As long as you have the dtoverlay in config.txt
You don't need an overlay for the 'GPIO start' function. You're probably confusing it with the gpio shutdown function

mrreality13
Posts: 56
Joined: Tue Feb 26, 2019 6:45 am
Location: texas usa

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Tue Apr 02, 2019 7:18 pm

AdamStanislav wrote:
Sun Mar 31, 2019 11:26 pm
seanspotatobusiness wrote:
Sun Sep 02, 2018 10:10 am
I'm sure I have the right pins. It's pins 5 and 6 on this image:

Image
So, am I right in assuming shorting pins 5 and 9 momentarily would accomplish the same? Because my RPi is in an acryllic case that uses pins 4 and 6 to power up the cooling fan.
i use 1 &9 for fan and just did 5/6 for switch,works like a charm ,no more using pwr switch on pwr strip or unplugging/plugging
remember ,never approach a computer thinking this will only take a minute
~~pi zero w and a 3b+

tmaital
Posts: 1
Joined: Wed Jun 19, 2019 12:45 pm

Re: Pi doesn't boot when pins 5 and 6 are momentarily shorted

Wed Jun 19, 2019 8:17 pm

Quick question to calrify another possible way to use this.
If I connect pin 5 & 6 and leave them connected - Pi Powers on?
If I shut down the pi while they are still connected and after shutdown disconnect pin 5 & 6 - Does this also turn the pi on or would I need to short them again?

Return to “Troubleshooting”