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…
— 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.