On Friday I noticed a bit of ‘weirdness’ happening with my new model B+ Raspberry Pi. When I shut it down with sudo halt
it would shut down fine. But when my hand, or the wireless keyboard I was using, got close to the GPIO pins, the Pi would start up again all by itself. I didn’t even need to touch it. Getting close was enough.
Let’s Ask the Twitterverse
I wasn’t sure if this was a quirk of the B+ or something to do with the dodgy wiring in our house in Poland (not earthed). Intrigued to see if anyone else could reproduce this ‘issue’, I put out a tweet on Friday evening.
OK. Someone with a B+ please try this. Shutdown (sudo halt), then touch GPIO16 & GPIO20 with your finger & release. What happens?
— RasPi.TV (@RasPiTV) July 18, 2014
I also started a thread here on the Raspberry Pi Forums
Within a couple of hours, Clive Beale and Matt Hawkins had both tried it, but not been able to reproduce the issue.
@RasPiTV Nowt (n = 6, got bored)
— Clive Beale (@clivebeale) July 18, 2014
@RasPiTV tried and nothing happened. Did yours restart or burst into flames?
— RaspberryPi-Spy (@RPiSpy) July 18, 2014
Let’s Show Them What’s Happening
That made me think it might be something to do with my specific setup. So on Saturday morning I woke up early and decided to gather ‘video evidence’ of the issue, so people could see what was happening…
To prove I am utterly bonkers, I made a quick 'unofficial' vid of the odd B+ reboot issue others couldn't reproduce. http://t.co/QbCYS4Mgof
— RasPi.TV (@RasPiTV) July 19, 2014
I got some almost instant help by email from Peter Onion, who walked me through making a home made ESD protection rig. (Peter is one of the few people I know who has delved into OpenGLES 2 on the Pi. You should check out his Raspberry Pi based Panadapter which uses the FFT GPU libraries.)
That Helped, But it’s Not the Cure
This made the problem go away when battery powered, but not mains powered…
OK. So this suggestion from @PeterOnion coupled with battery power did the trick. Must've been static &/or earthing. pic.twitter.com/MwVMv7DmqW
— RasPi.TV (@RasPiTV) July 19, 2014
All of this led me to start being ‘rather afraid’ of my house wiring. :(
Someone Else Has This Issue Too – It’s Real
But then, a bit later on Saturday, Derek ‘Guzunty’ Campbell chipped in on the forum thread that he’d got the same issue, which seemed to disappear by connecting pin 28 to GND. I tried this and it worked, regardless of mains or battery power. So power source may have been a red-herring. Although obviously, if the port on pin 28 is ‘floating’, anything that reduces electro-static discharge (ESD) may prevent the port from being triggered.
Zachary Igielman also reported having the same issue on twitter.
@RasPiTV it happened to me, I'm going to take a video and see if it's the same as yours
— Zachary Igielman (@ZacharyIgielman) July 19, 2014
Surely it must be real if three of us have it?
The Engineers Caught Wind of it
A little later in the day, James Hughes (one of the most active moderators on the forums and the Broadcom engineer who wrote the Raspberry Pi camera software), sent an email about the issue to Dom Cobley (the Broadcom engineer who does a lot of the Kernel work on Raspbian).
A few others on the forum chipped in with ideas and did some tests of their own. Joan tested whether or not the i2c port on pin 28 had a hardware pull-up resistor (no it doesn’t). So, out of this forum thread, emerged the idea to tweak the bootcode.bin file to prevent this port from being accidentally triggered by finger proximity.
On Saturday night, Dom uploaded a new bootcode.bin to DropBox, which Derek, I and others tested as working. And as far as we can tell, the issue is now resolved. (You can find the file link in the forum thread.)
48 Hours to Closure – and At the Weekend Too!
So within 48 hours of the issue being raised, at the weekend, we have a solution. I expect it will soon find its way into the main official firmware. So many people helped out in diagnosing the issue, testing things and trying out solutions. I find this really impressive.
It wasn’t a very big issue at all. Just a minor thing that wasn’t quite working the way it ought to because of a small hardware change. But such is the awesomeness of the Raspberry Pi community, that even a minor issue like this one got ironed out very quickly.
Its those nylon pants you wear generating static electricity Alex.
LOL Clive had a similar thought.
[…] Alex Eames at RasPi.tv found a potential problem with the B+ the other day. It would start after a halt when his hand approached two of the GPIO pins. Thanks to the Raspberry Pi community, and some of the brains at the Foundation, the problem has now been solved. It’s worth reading less because of the technical problem itself but more to hear how the community rallied around and helped each other solve that problem. Read all about it here. […]
I have had the same issue as well, but didn’t see this in time to confirm it. Am pleased its being fixed, it baffled me at first.
Now.. Has anyone noticed that sudo shutdown -h no longer powers off the network interface on a model b??!
Is that for wake on LAN? If it is that would be cool….
I wondered that, however at the moment it doesn’t respond to a WOL packet.
And, having just re-tested it, I can confirm that a B+ shuts down it’s LAN but a 256MB Model B and a 512MB model B do not shut down their LAN following a sudo shutdown -h.
(All running latest firmware and Raspbian)
Ian
Looks like this has now been fixed in the rpi-update firmware…
http://www.raspberrypi.org/forums/viewtopic.php?p=581749#p581749
[…] as to what could be the issue(s). ThePizone was quickly out to highlight efforts made by Alex from Raspi.TV and many good people on Raspberry Pi forum to ‘kill the bug’. Please follow there […]
[…] https://raspi.tv/2014/just-how-awesome-is-the-raspberry-pi-community-fixing-the-b-wont-shutdown-issue […]
[…] as to what could be the issue(s). ThePizone was quickly out to highlight efforts made by Alex from Raspi.TV and many good people on Raspberry Pi forum to ‘kill the bug’. Please follow there […]
I still get this Issue. hmm. Doesn’t matter though just very curious.
Really? What version of Raspbian (or other OS) are you using? What does ‘vcgencmd version’ say?