Page 1 of 1

RPi 4: Booting by shorting GND and GPIO3 (pins 5 and 6) not working

Posted: Fri Aug 16, 2019 8:08 pm
by PjoterNosacz
Hello,

Welcome everyone. I was trying to add power off/on system. At first I wanted to use simple shorting by cables, later I'm going to add either RF of ESP2866 to turn on/off wirelessly. I read, that I should add

Code: Select all

dtoverlay=gpio-shutdown
to /boot/config.txt. After doing so, shutting down Pi works fine, but I cannot wake it using same method. Only way to boot it up is to unplug and plug again power supply.
Content of my config.txt is:

Code: Select all

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=1
hdmi_mode=4

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi


dtoverlay=gpio-shutdown

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d

# NOOBS Auto-generated Settings:
hdmi_force_hotplug=1
Am I missing anything to make use of powering on by shorting pins 5 and 6? I also tried to use pins 39 and 40 (GND and GPIO21) by setting

Code: Select all

dtoverlay=gpio-shutdown,gpio_pin=21
but result was the same.

Regards

P. S. I have "Remote GPIO" set to Disabled in RPi configuration. Is that correct?

Re: RPi 4: Booting by shorting GND and GPIO3 (pins 5 and 6) not working

Posted: Fri Aug 16, 2019 8:20 pm
by RonR
PjoterNosacz wrote:
Fri Aug 16, 2019 8:08 pm
I read, that I should add

Code: Select all

dtoverlay=gpio-shutdown
to /boot/config.txt. After doing so, shutting down Pi works fine, but I cannot wake it using same method. Only way to boot it up is to unplug and plug again power supply.

You need to update the bootloader EEPROM:

https://www.raspberrypi.org/forums/view ... 7&t=246027

Re: RPi 4: Booting by shorting GND and GPIO3 (pins 5 and 6) not working

Posted: Fri Aug 16, 2019 9:08 pm
by PjoterNosacz
Thanks for quick reply!
After further search, I found another solution - shorting GLOBAL_EN on J2 to GND works fine (can RUN on J2 be used as well?).
Is there any readme to J2? May it be used also to shutdown board in elegant way?
Can it be connected to RF receiver like this one:
https://imgaz2.staticbg.com/thumb/large ... cb032.jpeg? On data pin of RF receiver, it has about 4V when there is no 433 MHz signal detected and drops down to 0 when signal is detected, so it sounds like a way to turn Pi on (I know, that this receiver is not paired with transmitter, so any 433 MHz signal may be used to run it) remotely?
BTW: why there are no pins soldered to J2, just the holes?

Re: RPi 4: Booting by shorting GND and GPIO3 (pins 5 and 6) not working

Posted: Fri Aug 16, 2019 9:15 pm
by RonR
PjoterNosacz wrote:
Fri Aug 16, 2019 9:08 pm
After further search, I found another solution - shorting GLOBAL_EN on J2 to GND works fine (can RUN on J2 be used as well?).

The only one-button solution (halt if running / start if halted) I'm aware of requires updating the bootloader EEPROM.

Re: RPi 4: Booting by shorting GND and GPIO3 (pins 5 and 6) not working

Posted: Tue Sep 03, 2019 4:55 pm
by Old Roscoe
I finally got the boot loader to flash the eprom or whatever it is. It had 4 rapid flashes pause then 4 rapid flashes repeating over and over. After the new boot loader that had changed to all rapid flashes. The switch jumpered on pins 5 and 6 now turn the Pi 4 on and off. The red light stays on and I have it hanging on the wall with a bread tie waiting on a case with fan. I have a USB desk fan plugged into one of the USB ports blowing on it and the Pi4 is currently running 42C with a dinky 20mm heat sink, while streaming a youtube at 480 p , room temp 81 F or 28C ish ... I'm liking this Pi4 more and more all the time. I forgot how I did it but I've got the temp displayed real time continuously in the upper right hand corner on the task bar. I don't see anyway this thing could ever cool enough with the official case. With the fan off it runs up to 60C without any case.

Re: RPi 4: Booting by shorting GND and GPIO3 (pins 5 and 6) not working

Posted: Sat Sep 14, 2019 4:44 pm
by RedPanther
This thread was a quick help with getting a good power switch running on my RPi4B server. And it works flawlessly! I have a two switch setup on my system, pressing switch-1 shuts down the RPi, and pressing switch-2 after the RPi is shutdown kills power to all my drives for a clean reboot.

Also, to enable the CPU Temperature Monitor in desktop mode, right-click anywhere on the dock. Click “Add / Remove Panel Items”. On the right side of the new window, click “Add”. About the seventh item down should say “CPU Temperature Monitor”. Click on that, click “Add” at the bottom of the box. You should now see CPU temp in the corner of your dock. Close the currently open window, and you’re done!

Re: RPi 4: Booting by shorting GND and GPIO3 (pins 5 and 6) not working

Posted: Sat Sep 14, 2019 7:33 pm
by alphanumeric
With the new boot loader I can now boot up and shut down with the button on my Fan Shim. Down side is the fan keeps running after the Pi shuts down. I have to unplug the power supply to male it stop. :(
With the original boot loader, on shut down the +5V is turned off and the fan stops. Down side is the button can't boot the Pi back up. I have to power cycle it. :(
This is not really a complaint as such, just an observation. It is what it is and there isn't much to do about it. I'm going to stick with the new boot loader because as far as I know, its going to be what you get in any future update to the boot loader.