Raspberry Pi Model B (512mb RAM) frequently freezing up


25 posts
by Pots1012 » Sat Jan 05, 2013 12:09 am
My Raspberry Pi (Model B, 512mb RAM) freezes up frequently (about once out of every two times I use it). I'm using the latest Raspbian image. I've tried re-downloading image and reformatting the 8GB, class 10 SD card I'm using, just in case.

Three examples of the freeze ups: (1) the first time I used the Pi, it hung permanently after I entered "startx"; (2) in the middle of a "sudo apt-get upgrade" (I can't imaging that's a good thing); (3) in the middle of compiling Quake 3 from source. Everything stays on the screen, it just looks like it is loading forever.

I've done a lot of research, but it's difficult to get a handle on what is causing this as there are so many potential causes! My first thought was power, so I tested all the USB power adapters I had around (ironically, the one purchased with the Pi from the distributor had the lowest volt rating) and stuck with the one giving the best power (rated at 5V, 1AMP - multimeter tested at 4.82 or something like that).

The freezes occur even when no HDMI cable is plugged in (so only power and Ethernet plugged in) during an SSH session (this was the "apt-get upgrade" crash).

When I'm logged in locally, I use an HDMI monitor and a USB wireless mouse and keyboard combo (Logitech K260 - mouse and keyboard use the same single USB port). I've heard each Pi USB port puts out only 100mA. My keyboard says 20mA and the mouse says 100mA, but these are both battery powered so that shouldn't matter right? Interestingly, my wireless mouse doesn't work very well with the Pi (the keyboard usually works fine).

If the problem is with the keyboard/mouse, could the Raspberry Pi really be so sensitive to power issues that having my USB receiver for the mouse/keyboard plugged in would make it crash? But then again, it crashed even over SSH, so that shouldn't be the issue...

I have a USB wifi adapter coming, but I'm a little scared of how much worse these issues might get once I add that to the mix. I'm considering purchasing one of the verified powered USB hubs, but I'm not too exciting about spending nearly as much as the Pi itself to make USB peripherals work correctly.

Based on my symptoms, what do you think is most likely my problem? Does it sound like a bad Pi?
Posts: 13
Joined: Fri Jan 04, 2013 6:57 pm
by malakai » Sat Jan 05, 2013 12:52 am
I've heard each Pi USB port puts out only 100mA


Should be about 500mA it's a USB spec

Define hang and crash - this is not relatively a fast computer compared to today's standards some times it will cycle for several minutes 1 to 30 even more depending on tasks

Should be

sudo apt-get update
sudo apt-get upgrade

or
sudo apt-get update && sudo apt-get upgrade

If you plug in mouse, keyboard, and wireless should use a powered hub

Compiling Quake III can take over an hour to complete

I believe the wireless mouse keyboard combos have mixed reviews on the Pi would need to search the forums for Logitech "sitesearch:raspberrypi.org logitech" to see what others have posted.

Your symptoms sound typical of an older computer
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by Jim JKla » Sat Jan 05, 2013 12:53 am
If it freezes on an SSH session with just ethernet and power it can't be a periferal issue and therefore it stands a good chance of being faulty hardware or you are just plain asking too much of your little Raspberry.

I am running with an original 256 I have had some freeze ups mainly of late in the xwindow (startx) when I was experimenting with the wifi dongle and had a wired mouse plugged in next to the dongle.

If the wifi dongle was in the USB hub, and the mouse in the RPi (dirctly) there was no issue put both the dongle and the mouse in the hub and it's freeze time note they were still on the same USB bus.

Go Figure.

I have lost track of my freeze ups but they have mostly been during research. ;)

Just a question You have run EXPAND-ROOTFS in the raspi-config and it's not just running out of stack space :lol:
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick
User avatar
Posts: 2100
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by jamesh » Sat Jan 05, 2013 2:27 am
If you were only seeing the problem with stuff plugged in to USB, then I would say it's an instance of the USB issues, but in your case, since it does it headless, it may well be something faulty. Difficult to tell though. When did you get it and from who?
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11576
Joined: Sat Jul 30, 2011 7:41 pm
by Pots1012 » Sat Jan 05, 2013 3:42 am
malakai wrote:
I've heard each Pi USB port puts out only 100mA


Should be about 500mA it's a USB spec

Define hang and crash - this is not relatively a fast computer compared to today's standards some times it will cycle for several minutes 1 to 30 even more depending on tasks

Should be

sudo apt-get update
sudo apt-get upgrade

or
sudo apt-get update && sudo apt-get upgrade

If you plug in mouse, keyboard, and wireless should use a powered hub

Compiling Quake III can take over an hour to complete

I believe the wireless mouse keyboard combos have mixed reviews on the Pi would need to search the forums for Logitech "sitesearch:raspberrypi.org logitech" to see what others have posted.

Your symptoms sound typical of an older computer


500mA, eh? Good to know, thanks.

For me, "hang" and "crash" mean absolutely no progress in a task that would otherwise progress steadily. For example, "startx" typically finishes in 30 seconds to a minute for me. When it hangs, it just sits at the prompt, never changing.

In the Quake example, it probably sat for 45 minutes at the same exact line. I hard reset it and then tried again. The second time, it went through the whole process just fine.
Posts: 13
Joined: Fri Jan 04, 2013 6:57 pm
by Pots1012 » Sat Jan 05, 2013 3:45 am
jamesh wrote:If you were only seeing the problem with stuff plugged in to USB, then I would say it's an instance of the USB issues, but in your case, since it does it headless, it may well be something faulty. Difficult to tell though. When did you get it and from who?


It's from Allied Electronics. It was ordered in October, but it was back-ordered and didn't end up shipping out until late-December.

I'll have to try it headless more often and see if I can get it to lock up again. Perhaps I accidentally left my USB receiver for the mouse and keyboard plugged in when it crashed while headless that one time... If that was the case, then at least it could be narrowed to the receiver.
Posts: 13
Joined: Fri Jan 04, 2013 6:57 pm
by shuckle » Sat Jan 05, 2013 9:05 am
I am also getting regular hangs in one of my pis. It is connected to wired ethernet and dvi display and runs firefox 24/7 showing monitoring info. My record online time is 10 days, but usually it freezes after 2-3 days, sometimes several times per day. No sd corruptions yet. My latest fix was to change overclock from 1100 to 1000 and after that it has now been running 4 days, so there is hope that this fixed it.
Temperature is about 60 and cpu load 85 %. Freezes are nasty as there are no errors in logs, so it just guessing to fix it.
It would be so nice to be able to utilize moreof the gpu.
Posts: 413
Joined: Sun Aug 26, 2012 11:49 am
by Jim JKla » Sat Jan 05, 2013 9:53 am
To put this in context I've had PC' regularly freezing up over the years since the days of Win95 :lol:
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick
User avatar
Posts: 2100
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by itimpi » Sat Jan 05, 2013 11:56 am
Pots1012 wrote:500mA, eh? Good to know, thanks.

Unfortunately the USB spec does not mandate 500mA (this is just what most PC USB ports standardised on) - the standard mandates at least 100mA. The Pi can provide about 150mA per USB port. On the more recent boards without polyfuses on the USB ports the limit is not per port, so it is possible to get more power out of one port if the other port is not using much. Also if using a powered hub that 'back powers' you may appear to get more as the hub is providing the extra.
Posts: 1033
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
by pluggy » Sat Jan 05, 2013 1:23 pm
jamesh wrote:If you were only seeing the problem with stuff plugged in to USB, then I would say it's an instance of the USB issues, but in your case, since it does it headless, it may well be something faulty. Difficult to tell though. When did you get it and from who?


USB Issues ? Hmmmm......

;)

If somebody hasn't already mentioned it, I'd test the voltage across the test points and the Polyfuse (F3) on the bottom of the board. If you've got > 4.8 volts across the test points its likely its a flakey and needs returning. Has it got a "Made in China" sticker over the "Made in the UK" screen printing ?
Don't judge Linux by the Pi.......
User avatar
Posts: 2313
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by Pots1012 » Sat Jan 05, 2013 2:09 pm
pluggy wrote:
jamesh wrote:If you were only seeing the problem with stuff plugged in to USB, then I would say it's an instance of the USB issues, but in your case, since it does it headless, it may well be something faulty. Difficult to tell though. When did you get it and from who?


USB Issues ? Hmmmm......

;)

If somebody hasn't already mentioned it, I'd test the voltage across the test points and the Polyfuse (F3) on the bottom of the board. If you've got > 4.8 volts across the test points its likely its a flakey and needs returning. Has it got a "Made in China" sticker over the "Made in the UK" screen printing ?


It's made in China. Yes, it's getting over 4.8 across the test points. Perhaps I will request another one.
Posts: 13
Joined: Fri Jan 04, 2013 6:57 pm
by Pots1012 » Sat Jan 05, 2013 2:35 pm
Jim JKla wrote:To put this in context I've had PC' regularly freezing up over the years since the days of Win95 :lol:


Yeah, but I'm not really satisfied with this. My Windows machine very, very rarely crashes and I use it all the time. Linux is much more stable than Windows, and I'm not even doing anything out of the ordinary.
Posts: 13
Joined: Fri Jan 04, 2013 6:57 pm
by nazouille » Sat Jan 05, 2013 2:40 pm
do you have upgraded the firmware ?
if not, there is an issue with USB and 512MB board and the last available raspbian image.
viewtopic.php?f=29&t=27992&p=249426#p249426

You need the rpi-update tool to do that
https://github.com/Hexxeh/rpi-update
Posts: 28
Joined: Thu Jan 03, 2013 12:30 pm
Location: France
by Pots1012 » Sat Jan 05, 2013 3:17 pm
nazouille wrote:do you have upgraded the firmware ?
if not, there is an issue with USB and 512MB board and the last available raspbian image.
viewtopic.php?f=29&t=27992&p=249426#p249426

You need the rpi-update tool to do that
https://github.com/Hexxeh/rpi-update


Interesting, no I don't have it. I'll have to give that a shot, thanks.

Also, I saw that Adafruit sells a USB power adapter for the Pi that is rated at 5.25 volts. It's the only one like that I've seen. Anyone have this and notice any boost in stability, or is it just a gimmick?

Here's a link: https://www.adafruit.com/products/501
Posts: 13
Joined: Fri Jan 04, 2013 6:57 pm
by Pots1012 » Sat Jan 05, 2013 4:43 pm
I guess I should clarify my main question: if I know I'm getting enough power and the device is crashing, it's pretty much narrowed to a faulty board, correct? Honestly, even if there is some issue with the USB devices or the HDMI cable (for example, they are drawing too many mA), such an issue would at most cause those particular devices to stop functioning correctly (for example, flaky mouse scrolling), am I correct? What I am experiencing is repeated fatal crashing.
Posts: 13
Joined: Fri Jan 04, 2013 6:57 pm
by nazouille » Sun Jan 06, 2013 9:17 am
I am not sure to understand but comparing a 35$ board with a PC around 400$ is difficult.
A PC can have protections on USB controler and voltage regulators. It is not the case with the Pi board. So don't expect a 35$ board the same thing than a 400$ computer :)

From my point of view, having this much from a 35$ board is already very cool :)
Posts: 28
Joined: Thu Jan 03, 2013 12:30 pm
Location: France
by Jim JKla » Sun Jan 06, 2013 3:10 pm
My point was that freeze up is not limited to a brilliant $35 Rpi.

A PC whatever the cost can suffer the same fate without anywhere near this much support. ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick
User avatar
Posts: 2100
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by Pots1012 » Thu Jan 10, 2013 9:49 pm
Upgraded the firmware and the issue I was having with the USB mouse and keyboard combo was fixed.

Jury is still out on the freezeups. I haven't gotten to use the Pi much since I upgraded the firmware.
Posts: 13
Joined: Fri Jan 04, 2013 6:57 pm
by shuckle » Fri Jan 11, 2013 1:56 pm
Just to add that my Pi now works reliable after eliminating all I/O and changing overclock from 1100 to 1000.
Up 10 days now with average CPU load 85%, Load Average about 1.50 and temperature about 61 C.
It has heavy internet (wired) load, but only occasionally connected to mouse and keybord via external USB hub.
Posts: 413
Joined: Sun Aug 26, 2012 11:49 am
by Pots1012 » Sat Jan 12, 2013 2:57 am
shuckle wrote:Just to add that my Pi now works reliable after eliminating all I/O and changing overclock from 1100 to 1000.
Up 10 days now with average CPU load 85%, Load Average about 1.50 and temperature about 61 C.
It has heavy internet (wired) load, but only occasionally connected to mouse and keybord via external USB hub.


By "eliminating all I/O" you mean having no mouse and keyboard connected, correct?

That's interesting. So mouse and keyboard must be a big cause for instability.
Posts: 13
Joined: Fri Jan 04, 2013 6:57 pm
by M_P » Sat Jan 12, 2013 3:07 am
Do you have another SD card kicking around you can use to test?
Posts: 42
Joined: Sun Jan 06, 2013 5:40 pm
by shuckle » Sat Jan 12, 2013 7:59 am
Pots1012 wrote:
shuckle wrote:Just to add that my Pi now works reliable after eliminating all I/O and changing overclock from 1100 to 1000.
Up 10 days now with average CPU load 85%, Load Average about 1.50 and temperature about 61 C.
It has heavy internet (wired) load, but only occasionally connected to mouse and keybord via external USB hub.


By "eliminating all I/O" you mean having no mouse and keyboard connected, correct?

That's interesting. So mouse and keyboard must be a big cause for instability.


No. I mean i removed cron and run iceweasel in private browsing mode to eliminate all sd card read and writes.
I do not have mouse or keyboard connec ted at all. Removing those decreased number of interrupts dramatically (from 1200 to 600 per second)
Posts: 413
Joined: Sun Aug 26, 2012 11:49 am
by Pots1012 » Sun Jan 13, 2013 4:43 am
M_P wrote:Do you have another SD card kicking around you can use to test?


I don't, actually. BUT, I just ordered a second RPi to see if it behaves the same as the one I have though, so I'll be getting a card for that one too. I'll have to try the new card in the old Pi to see if anything is different.

If the new Pi works wonderfully, I'll request an RMA on the old one.
Posts: 13
Joined: Fri Jan 04, 2013 6:57 pm
by tommy3244 » Wed Jul 24, 2013 1:36 pm
My Model A (256 mb RAM) also freezes up, except it's not when a ssh session is connected or startx. I usually run it without a display, and it freezes frequantly after I leave it on for a few hours. Sometimes I try to ssh it after, around 3 hours with no contact, and it says that there is no server on the ssh port I use. Sometimes it's while I have it connected via ssh and run a command. Sometimes it's when I leave a ssh session open and check it later. I allways have to unplug it and plug it back in. I have extra usb ports attached to the pi, and the only thing I have in there right now is a wireless adapter. I wanted to use it as a server. I thought the model b I just bought might be better, but according to this post, it has the same problems.
Posts: 1
Joined: Wed Jul 24, 2013 1:28 pm
by jamesh » Wed Jul 24, 2013 2:01 pm
tommy3244 wrote:My Model A (256 mb RAM) also freezes up, except it's not when a ssh session is connected or startx. I usually run it without a display, and it freezes frequantly after I leave it on for a few hours. Sometimes I try to ssh it after, around 3 hours with no contact, and it says that there is no server on the ssh port I use. Sometimes it's while I have it connected via ssh and run a command. Sometimes it's when I leave a ssh session open and check it later. I allways have to unplug it and plug it back in. I have extra usb ports attached to the pi, and the only thing I have in there right now is a wireless adapter. I wanted to use it as a server. I thought the model b I just bought might be better, but according to this post, it has the same problems.


Has the whole Pi frozen, or has just the networking failed for some reason? If networking has gone down, a dmesg log might be helpful in diagnosing the problem.

This is almost certainly a software issue (perhaps in combination with particular extenral HW), not a problem with the Pi itself, so is probably unrelated to model A or B.

Have you upgraded to the latest firmware, this has a number of USB fixes in it that may help.

sudo apt-get install rpi-update (if not already done)
sudo rpi-update
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11576
Joined: Sat Jul 30, 2011 7:41 pm