Sunstarx55
Posts: 7
Joined: Sun Apr 16, 2017 8:08 am

Raspberry Pi Zero won't shutdown

Sun Apr 16, 2017 8:16 am

As the title says, I can't get my Zero to shutdown.

I've tried all the different commands I know of, from "reboot -p" to "shutdown -h now"
Also I have started two fresh installs, and fully updating everything.

The only thing that's plugged into it is a wireless adaptor so I can SSH into it.

Different power supplies display the same results so it's not that.

Unless someone can provide me with an answer, I think it may be because I've applied some velcro tape to the back of the board. However I'm unsure of that (Mainly because I thought the tape would be a permanent addition, it's quite strong stuff so I don't wanna take it off unless I have no choice) Could it be shorting something?

Thanks for any help!

EDIT: Somehow I neglected to mention that the commands work, but the pi turns itself back on after it powers off. Sorry for the confusion.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5727
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Raspberry Pi Zero won't shutdown

Sun Apr 16, 2017 2:18 pm

Sunstarx55 wrote:As the title says, I can't get my Zero to shutdown.
I've tried all the different commands I know of, from "reboot -p" to "shutdown -h now"
Also I have started two fresh installs, and fully updating everything.
The only thing that's plugged into it is a wireless adaptor so I can SSH into it.
Different power supplies display the same results so it's not that.
Unless someone can provide me with an answer, I think it may be because I've applied some velcro tape to the back of the board. However I'm unsure of that (Mainly because I thought the tape would be a permanent addition, it's quite strong stuff so I don't wanna take it off unless I have no choice) Could it be shorting something?
Thanks for any help!
EDIT: Somehow I neglected to mention that the commands work, but the pi turns itself back on after it powers off. Sorry for the confusion.
W.r.t. "Different power supplies" were you also using a different uUSB connecting cable?
Any possibility of a (whisker) "short" of the "RUN" header** contacts?
Trev.
**Just below the RH end of the main GPIO connections:
http://www.cpmspectrepi.uk/raspberry_pi ... iZero.html
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Sunstarx55
Posts: 7
Joined: Sun Apr 16, 2017 8:08 am

Re: Raspberry Pi Zero won't shutdown

Sun Apr 16, 2017 3:25 pm

I've tried powering it from a phone charger, both plug and usb port on my pc. And the main thing I want powering it is a 22400mAh power bank. Specifically this one https://www.amazon.co.uk/gp/product/B00 ... UTF8&psc=1.

Same results on all of them, I'll try peeling back the adhesive on the velco on the backside of the RUN pins as you mentioned. I couldn't see anything on the top.

User avatar
elkberry
Posts: 167
Joined: Wed Dec 28, 2016 9:21 pm

Re: Raspberry Pi Zero won't shutdown

Sun Apr 16, 2017 4:29 pm

Powering from an USB power bank ... may work, may not work. I've tried several ones, and most of them are barely at 5V for 0.1A, some give 5.1V even at 1A; use an USB doctor to check.

As for you Pi Zero restarting after shutdown: that depends, again, on your particular power bank. Some of mine correctly power off themselves, and keep off, after the Pi power consumption has been dropped to halt level. Some other banks of mine first switch off, then, while in off mode, they detect the Pi drawing a small leakage current, and switch on again. It sounds as if you have one of those USB power banks that like to switch on again.
From ZX81 to Raspberry Pi, but wait ... where's the 7805 gone?

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5727
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Raspberry Pi Zero won't shutdown

Sun Apr 16, 2017 7:07 pm

Sunstarx55 wrote:I've tried powering it from a phone charger, both plug and usb port on my pc. And the main thing I want powering it is a 22400mAh power bank. Specifically this one https://www.amazon.co.uk/gp/product/B00 ... UTF8&psc=1.
Same results on all of them, I'll try peeling back the adhesive on the velco on the backside of the RUN pins as you mentioned. I couldn't see anything on the top.
O.K. That's some extra info. we needed to know, but did you try different uUSB cables? (The USB port on a PC, esp. USB2.0 may not provide enough power/current, being limited to ~500mA)
elkberry wrote:Powering from an USB power bank ... may work, may not work. I've tried several ones, and most of them are barely at 5V for 0.1A, some give 5.1V even at 1A; use an USB doctor to check.
As for you Pi Zero restarting after shutdown: that depends, again, on your particular power bank. Some of mine correctly power off themselves, and keep off, after the Pi power consumption has been dropped to halt level. Some other banks of mine first switch off, then, while in off mode, they detect the Pi drawing a small leakage current, and switch on again. It sounds as if you have one of those USB power banks that like to switch on again.
That could be a possibility (ie. avoid those "smart" chargers).

FWIW, I've measured the load characteristics of quite a few 'phone chargers and powerbanks - you may find their behaviour's of interest:
http://www.cpmspectrepi.uk/raspberry_pi ... plies.html (and the further links within that page)
http://www.cpmspectrepi.uk/raspberry_pi ... 2FChargers
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

drgeoff
Posts: 10938
Joined: Wed Jan 25, 2012 6:39 pm

Re: Raspberry Pi Zero won't shutdown

Sun Apr 16, 2017 7:28 pm

elkberry wrote:
As for you Pi Zero restarting after shutdown: that depends, again, on your particular power bank. Some of mine correctly power off themselves, and keep off, after the Pi power consumption has been dropped to halt level. Some other banks of mine first switch off, then, while in off mode, they detect the Pi drawing a small leakage current, and switch on again. It sounds as if you have one of those USB power banks that like to switch on again.
Even when shutdown, all RPis including the Zeros, draw a significant current. Much more than is usually conveyed by the words "leakage current".

Moreover, merely putting a RPi into shutdown mode is usually not really sufficient when powering from a battery. A mechanical or electrical disconnection (after the shutdown state has been reached) is usually desirable.
Quis custodiet ipsos custodes?

Sunstarx55
Posts: 7
Joined: Sun Apr 16, 2017 8:08 am

Re: Raspberry Pi Zero won't shutdown

Sun Apr 16, 2017 7:32 pm

I've tried 3 different cables, alternating them between the power sources I mentioned. For the wall outlet however I only have one usb plug, so I can't test that.

Took the velcro off, doesn't seem to be any shorts I can see.

Is it possible there's a setting somewhere that could cause this? I'm running Kali for ARM devices.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5727
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Raspberry Pi Zero won't shutdown

Sun Apr 16, 2017 7:48 pm

Sunstarx55 wrote: ...
Is it possible there's a setting somewhere that could cause this? I'm running Kali for ARM devices.
Pity you didn't mention that sooner - its behaviour could be different to Raspbian (which will be assumed here if you don't say what O.S. you're running at the outset). How up to date is it? What happens if you try current Raspbian instead?
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Sunstarx55
Posts: 7
Joined: Sun Apr 16, 2017 8:08 am

Re: Raspberry Pi Zero won't shutdown

Sun Apr 16, 2017 7:53 pm

FTrevorGowen wrote: Pity you didn't mention that sooner - its behaviour could be different to Raspbian (which will be assumed here if you don't say what O.S. you're running at the outset). How up to date is it? What happens if you try current Raspbian instead?
Trev.
Herp derp, I had cut a chunk out of my original post.

It's the latest version, fully updated. I'll make a backup and try Raspbian. If it is an OS setting is there a standardised location for it? I would expect it to be in the boot partition somewhere.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5727
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Raspberry Pi Zero won't shutdown

Sun Apr 16, 2017 8:06 pm

Sunstarx55 wrote:
FTrevorGowen wrote: Pity you didn't mention that sooner - its behaviour could be different to Raspbian (which will be assumed here if you don't say what O.S. you're running at the outset). How up to date is it? What happens if you try current Raspbian instead?
Trev.
Herp derp, I had cut a chunk out of my original post.
It's the latest version, fully updated. I'll make a backup and try Raspbian. If it is an OS setting is there a standardised location for it? I would expect it to be in the boot partition somewhere.
AFAIK (for Raspbian) it's not an "O.S. setting" per se, but (probably) a systemd "sequence" or similar**.
Trev.
** O.T., but with similarities: I'm running Debian 8 on a Gigabyte brick with a (supplied) WiFi module for which, as yet, I've not been able to install the correct driver. That doesn't always shutdown cleanly/completely and I physically have to finallise the "power off". However, when it does so, I see "Power down" (or something like that) messages from a systemd service.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Sunstarx55
Posts: 7
Joined: Sun Apr 16, 2017 8:08 am

Re: Raspberry Pi Zero won't shutdown

Sun Apr 16, 2017 8:42 pm

Nope, it's doing the same thing on Raspbian with all three power sources.

Weird and frustrating.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5727
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Raspberry Pi Zero won't shutdown

Sun Apr 16, 2017 8:50 pm

Sunstarx55 wrote:Nope, it's doing the same thing on Raspbian with all three power sources.
Weird and frustrating.
OK, the only thing I can think of now is, is it something odd about the WiFi dongle (or associated driver)? So what make/model is it? Posting the output (within code tags maybe) of the lsusb and usb-devices may provide useful info. too.
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Sunstarx55
Posts: 7
Joined: Sun Apr 16, 2017 8:08 am

Re: Raspberry Pi Zero won't shutdown

Sun Apr 16, 2017 9:14 pm

Unfortunately I just tried it with just keyboard and hdmi, no cigar :/

Maybe the Pi itself is faulty, I'll have a look around on Friday and see if I can get another.

Thanks for the help though!

sstan32
Posts: 1
Joined: Tue Mar 31, 2020 8:38 pm

Re: Raspberry Pi Zero won't shutdown

Tue Mar 31, 2020 8:56 pm

I also encountered this problem after activating the console on the USB port by starting the g_serial service in / etc / modules using the OTG mode - see: https://gist.github.com/gbaman/50b6cca6 ... owtootg-md
By activating the console on the USB port, the reboot and shutdown commands are executed correctly only from this console.
By disabling this service the reboot and shutdown commands from the ssh or default console (ttyAMA0) are executed correctly.

pi @ RPi0W: ~ $ sudo systemctl disable getty@ttyGS0.service
Removed /etc/systemd/system/getty.target.wants/getty@ttyGS0.service.
pi @ RPi0W: ~ $ sudo systemctl disable getty@tty1.service
Removed /etc/systemd/system/getty.target.wants/getty@tty1.service.
RPi0W pi @: ~ $
pi @ RPi0W: ~ $ sudo reboot
RPi0W pi @: ~ $

**************** The next reboot will work !!!! *********************

RPi0W pi @: ~ $
RPi0W pi @: ~ $
pi @ RPi0W: ~ $ sudo reboot
[64.462623] reboot: Restarting system
**************** It works! *****************************************
Hope it helps some! All good!

Return to “Troubleshooting”