Tell me more ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I am using my raspberry pi as a headless server. The problem is that after a couple of hours of inactivity it seems to enter a power suspend state where it disappears from the web and refuses ssh connections. After having prodded it via ssh it comes back after a couple of minuttes and uptime informs that it has been alive all the while. This makes me think it is some kind of power management scheme that is in effect but I have read other places that the pi is not able to suspend.

Does anyone have an idea what is wrong?

share|improve this question
Which OS are you using? – xxmbabanexx Apr 11 at 13:44
even I face the occasional ssh failure when using my pi headless which a few retries resolve almost all the time.I use shellinabox to login my shell which seems faster for some reason I don't know.I am not sure about the security when using shellinabox but I access my pi mostly from within the LAN. – SteveIrwin Apr 11 at 18:48
I am on a standard Raspbian setup (the pre-installed sd-card) with all the graphical stuff removed. – Kenneth Apr 11 at 18:58

1 Answer

The raspberry pi hardware has no power management capability. Period. End of story. It does not have a sleep or suspend mode. It cannot not even be turned off. There's either power (plugged in), or there isn't (not plugged in).

When you shutdown the system, the software stops, meaning there is now no way to get it to do anything again. However, the "power state" of the hardware is still the same (because it only has one state, on).

So whatever your problem is, that is not it. You may want to look at your logs to see if anything else has been going on during the network downtime -- eg, (I'm speculating), if you have stuff attached to the usb ports that is near the limits of the pi's 150 mA output, that thing may intermittently fail, and if it's a wifi dongle, the system will then have to wait until the interface reappears. You'd see lots of evidence that in /var/log/syslog or /var/log/messages.

If it's any consolation, I use the pi headless on a WLAN and don't turn it off very often, and it's been pretty flawless. I use this methodology to ensure the connection stays up; peeking at the current log, it's had to reconnect itself only twice in the past 48 hours. However, I make pretty light use of it too, maybe occasionally there is a big download, etc., but not constant traffic (the more it's accessed the more opportunities there are for something to fail, so I can't say how reliable it would be serving a cafe full of people all day). Also, I have it on a 3.8A hub and the only thing plugged directly into the pi's usb is a "nano"-size wifi dongle.

share|improve this answer
Ok, power should not be a problem. I am using a 1A power supply and the only thing plugged into the pi is a usb hard-drive which runs off its own power supply. I am connecting directly to the router using the LAN on the pi, so no dongle either. The only thing in syslog that's not supposed to be there is a warning about IPv6 which should be disabled. Nothing about power. I think your scripting approach seems like a good way to go. I will attempt to try that tomorrow. – Kenneth Apr 11 at 18:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.