14

I'm facing a similar issue to this one, How do I disable suspend mode?, except I have a Raspberry Pi 3 and am running OpenELEC 6.0.3. When I leave it on without using it for awhile, I can no longer ssh to it or connect to it via samba. I have to use it use again and then I'm able to connect to it (although occasionally I have to reboot in order to be able to ssh to it for some reason).

Is the wifi going into sleep mode when there is no traffic? How can I disable it on the Pi 3?

OpenUserX03
  • 273
  • 1
  • 3
  • 6

3 Answers3

13

To stop your wifi from go to sleep after idle for awhile, you need to disable its power management.

Edit file /etc/network/interfaces

Assume you Pi connect to network through wlan0. Add new line with wireless-power off right BELOW the line iface wlan0 inet manual

Save and reboot your Pi

run iwconfig now you should see Power Management:off

Aura
  • 428
  • 2
  • 12
10

Editing /etc/network/interfaces no longer works in Raspbian, as TSGames commented in the most upvoted answer.

Instead, you can use /sbin/iw wlan0 get power_save to read the current power save state, and sudo /sbin/iw wlan0 set power_save off to disable power state.

Since the iw command is not persistant, I added /sbin/iw wlan0 set power_save off to /etc/rc.local right before exit 0 to have it set at startup (no need for sudo since rc.local already is run with admin rights).

Oystein
  • 201
  • 2
  • 6
0

Octopi going to sleep fix.

The following did the trick for Octopi print server:

added the wireless-power off into the ipconfig.txt file since this file is called by the file at: /etc/network/interfaces

No more sleeping octopi server!

Dana

Dana D
  • 1