Gael_G
Posts: 6
Joined: Thu Aug 28, 2014 1:52 pm

RPi B+ automatically restart after a shutdown through SSH

Thu Aug 28, 2014 2:04 pm

Hello,
I received my Raspberry Pi B+ today and everything seems to work fine except one thing.
I connect to my RPi via SSH, and to shutdown it safely, I run sudo shutdown -h now (or sudo halt) command. SSH window (I use PuTTY) closes but after a few seconds of waiting, I can reconnect to RPi (it restarts itself), which does not happen when I execute the command directly on the RPi (without SSH), with a screen plugged-in.
Someone would have a solution to this problem?
Thank you in advance for your answers!

Edit: This is a very strange problem, if the RPi is not connected to the display with HDMI, a single contact with a support (here, the antistatic packaging) make it restart. When I hold it in the air, it stays off, someone encountered the same problem?

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

Re: RPi B+ automatically restart after a shutdown through SS

Thu Aug 28, 2014 10:59 pm

Gael_G wrote:Hello,
I received my Raspberry Pi B+ today and everything seems to work fine except one thing.
I connect to my RPi via SSH, and to shutdown it safely, I run sudo shutdown -h now (or sudo halt) command. SSH window (I use PuTTY) closes but after a few seconds of waiting, I can reconnect to RPi (it restarts itself), which does not happen when I execute the command directly on the RPi (without SSH), with a screen plugged-in.
Someone would have a solution to this problem?
Thank you in advance for your answers!
Edit: This is a very strange problem, if the RPi is not connected to the display with HDMI, a single contact with a support (here, the antistatic packaging) make it restart. When I hold it in the air, it stays off, someone encountered the same problem?
This seems similar to an "early B+ issue" discussed in this thread: http://www.raspberrypi.org/forums/viewt ... 28&t=84800
How up-to-date is your installed O.S. (firmware)?
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

Gael_G
Posts: 6
Joined: Thu Aug 28, 2014 1:52 pm

Re: RPi B+ automatically restart after a shutdown through SS

Fri Aug 29, 2014 4:36 pm

FTrevorGowen wrote:
Gael_G wrote:Hello,
I received my Raspberry Pi B+ today and everything seems to work fine except one thing.
I connect to my RPi via SSH, and to shutdown it safely, I run sudo shutdown -h now (or sudo halt) command. SSH window (I use PuTTY) closes but after a few seconds of waiting, I can reconnect to RPi (it restarts itself), which does not happen when I execute the command directly on the RPi (without SSH), with a screen plugged-in.
Someone would have a solution to this problem?
Thank you in advance for your answers!
Edit: This is a very strange problem, if the RPi is not connected to the display with HDMI, a single contact with a support (here, the antistatic packaging) make it restart. When I hold it in the air, it stays off, someone encountered the same problem?
This seems similar to an "early B+ issue" discussed in this thread: http://www.raspberrypi.org/forums/viewt ... 28&t=84800
How up-to-date is your installed O.S. (firmware)?
Trev.
Thank you for your reply,
Sure, I had seen this thread, so I made all the recommended updates, but nothing to do, if the RPi + B is close to a surface (below), it restarts automatically, the only solutions that I 've found to stop it are:
- Connect to a monitor with HDMI
- Keep it away from any surface
I did a test: I ran the "sudo halt" command via SSH, then I kept the RPi away from the box. When I try to put it again (the card does not even touch the bottom of the case!) : it reboots...
I can't even leave it in a box if I want to shutdown it!
Thank you in advance for your answer.

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

Re: RPi B+ automatically restart after a shutdown through SS

Fri Aug 29, 2014 5:39 pm

sudo rpi-update fixed that problem on my B+

Try this instead of sudo halt:
sudo shutdown -h now
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

Gael_G
Posts: 6
Joined: Thu Aug 28, 2014 1:52 pm

Re: RPi B+ automatically restart after a shutdown through SS

Fri Aug 29, 2014 5:46 pm

klricks wrote:sudo rpi-update fixed that problem on my B+

Try this instead of sudo halt:
sudo shutdown -h now
Thanks for your reply, I already tried that, my B+ is up-to-date and all is working fine except that problem : I can't shutdown it except when I connect a screen with HDMI or when I hold it away from a surface...

Gael_G
Posts: 6
Joined: Thu Aug 28, 2014 1:52 pm

Re: RPi B+ automatically restart after a shutdown through SS

Fri Aug 29, 2014 6:08 pm

Stupid question: is that the steel case of my computer can interfere with the RPi if I put it on? (the RPi is protected with a cardboard box)
I ask this because if I move the RPi away from the computer case, it no longer reboots.
Reassure me, am I the only one to have problems as strange?

Edit: Nevermind, I moved the RPi, it didn't restart, everything seemed ok and by moving it slightly, it restarts ... What can I do?

User avatar
jojopi
Posts: 3271
Joined: Tue Oct 11, 2011 8:38 pm

Re: RPi B+ automatically restart after a shutdown through SS

Fri Aug 29, 2014 7:42 pm

Gael_G wrote:I made all the recommended updates
my B+ is up-to-date
Are you sure? The fix for this issue went into bootcode.bin. If you are using NOOBS, the active copy of bootcode.bin is the one in the NOOBS recovery partition, not the Raspbian boot partition. As far as I know, neither apt-get nor rpi-update will affect this.

So, if using NOOBS, you may need:

Code: Select all

sudo mount /dev/mmcblk0p1 /mnt
sudo cp /boot/bootcode.bin /mnt/
sync
sudo reboot

Gael_G
Posts: 6
Joined: Thu Aug 28, 2014 1:52 pm

Re: RPi B+ automatically restart after a shutdown through SS

Fri Aug 29, 2014 8:08 pm

jojopi wrote:
Gael_G wrote:I made all the recommended updates
my B+ is up-to-date
Are you sure? The fix for this issue went into bootcode.bin. If you are using NOOBS, the active copy of bootcode.bin is the one in the NOOBS recovery partition, not the Raspbian boot partition. As far as I know, neither apt-get nor rpi-update will affect this.

So, if using NOOBS, you may need:

Code: Select all

sudo mount /dev/mmcblk0p1 /mnt
sudo cp /boot/bootcode.bin /mnt/
sync
Thank you so much! It seems to work! Indeed, I used NOOBS because it seemed convenient and easy to use. It would be nice NOOBS automatically handles the synchronization of updates.
Thank you again, I will return to you if the problem come back!
Out of curiosity, would you explain to me what was the source of the problem?

Gaurav Harchwani
Posts: 19
Joined: Tue Sep 23, 2014 7:16 am

Re: RPi B+ automatically restart after a shutdown through SS

Wed Oct 29, 2014 9:04 am

I am dealing with the same problem now.My B+ is upto date and i dnt knw suddenly frm nowhere how this started.Its the problem only when i shutdown frm ssh.

Return to “Troubleshooting”