Take the 2-minute tour ×
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.

Whenever I leave my Raspberry Pi on overnight, it always seems to have entered some kind of suspended state. The red power light is still on but the light on the USB WiFi device is off and I can't access it with SSH.

I have no peripherals attached except for a USB WiFi device. I just use it headless as an audio player.

Anyone know how to completely disable any kind of suspend features?

share|improve this question

migrated from superuser.com Aug 1 '12 at 4:05

This question came from our site for computer enthusiasts and power users.

    
It would be helpful to us if you could tag your question with the appropriate display manager. Thanks! –  Bryan Dunsmore Aug 1 '12 at 4:12
    
Can you see any output on an attached screen? And do you have an up-to-date OS? Could be a kernel panic, which happended to me randomly after certain uptime. –  macrojames Aug 1 '12 at 5:40
1  
@BryanDunsmore I doubt he is using a DM - it's a headless audio player... –  Alex Chamberlain Aug 1 '12 at 8:20
    
Possible duplicate of How do I prevent the screen from going blank? –  Jivings Aug 1 '12 at 10:53
    
@AlexChamberlain If he is using Raspian I highly doubt he has uninstalled the default display manager. =/ –  Bryan Dunsmore Aug 1 '12 at 15:50

4 Answers 4

up vote 17 down vote accepted

You didn't provide a lot of details, but I'm going to assume you are using a WiFi adapter with the Realtek 8192cu chip, since that seems to be commonly used. Mine is the same and I have been experiencing what I think is the same issue: when leaving the RPi idle for an extended period of time, the WiFi seems to be disabled and you can no longer connect via SSH, etc.

I have been searching for a solution to this for months and only just now found one here: https://github.com/xbianonpi/xbian/issues/217 The solution is for xbian, but it worked for me on Raspbian.

The problem seems to be that the adapter has power management features enabled by default. This can be checked by running the command:

cat /sys/module/8192cu/parameters/rtw_power_mgnt

A value of 0 means disabled, 1 means min. power management, 2 means max. power management. To disable this, you need to create a new file:

sudo nano /etc/modprobe.d/8192cu.conf

and add the following:

# Disable power management

options 8192cu rtw_power_mgnt=0

Once you save the file and reboot your RPi, the WiFi should stay on indefinitely.

share|improve this answer
    
Thank you! I will give this a try when I get a chance. –  dgrant Jan 19 '13 at 0:59
    
Unfortunately, the same thing is happening to be on xbian with 8192cu and power management is already set to 0. Somehow it still goes into coma... –  StasM Jul 30 '13 at 7:06

GDM

You can prevent GDM from suspending your computer by changing a value in dconf-editor. Note that I said dconf-editor, not gconf-editor.

$ dconf-editor

Now, you need to navigate to the org.gnome.settings-daemon.plugins.power node. You should see a whole list of key-value pairs. Change the following keys to the following values.

  • sleep-inactive-ac-type to nothing
  • sleep-inactive-battery-type to nothing

References

share|improve this answer
1  
Where did he say he was using GDM? –  Jivings Aug 1 '12 at 10:53
1  
@Jivings He didn't. I'm just providing an answer in the case that he is using GDM. –  Bryan Dunsmore Aug 1 '12 at 15:52
    
Sorry, but -1 from me for an open-ended answer, with no sure fire way of knowing if it answers the question. You should have left a comment. –  Jivings Aug 1 '12 at 15:59
1  
Then you should ask for more information before answering. –  Jivings Aug 2 '12 at 8:56
1  
I do have an account at stackoverflow and a few of the other stackexchange sites and I asked this question on superuser.stackexchange and then it got moved to raspberrypi.stackexchange. I guess that's why I got no notifications of replies. It got moved to a sub-site where I had no account, before anyone commented on it. Annoying. –  dgrant Aug 10 '12 at 16:43

My issue was the screen saver. Disable with the following commands:

This turns off the screen saver:

xset s off

Disable other energy star features:

xset -dpms

This will not work in a remote SSH session

share|improve this answer

Try with a schedule ping every minute ;)

share|improve this answer

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.