Stopping your wireless from turning off on your Raspberry PI

How to stop your wireless from turning off on your Raspberry Pi

If like me you have had issues with your wireless USB dongle turning off when your Pi thinks it is idle there is an easy way you can fix this.

  • We make a quick edit
  • We restart the networking processes
  • We verify it has worked

Making the Edit

You need to edit your /etc/network/interfaces, we need to do this as sudo.

sudo vim /etc/network/interfaces

(sudo nano works just as well if you don’t like vim.)

The change we need to make is to add wireless-power off to this configuration file, this tells the wireless USB dongle not to attempt to do its own power management.

We should add this to the bottom of the file.

As an example here is my complete file (don’t just copy and paste my entire file, do whatever works for you!);

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off

Restarting the Network Processes

Once we have made this edit we simply need to restart the networking processes, we do this by calling the following;

/etc/init.d/networking restart

Verify the change has worked

Once things have restarted we need to make sure that when we run iwconfig we can see as part of the output “Power Management:off”.

iwconfig | grep "Power Management"

If you an see “Power Management:off” our change has worked.

Recent posts View all

Web Dev

Render's Support

I'm really happy with Render's support and will be recommending them for people to consider

Web dev

Free tools to improve your website

There are lots of freely available tools to help get a sense check on how your website is doing and recommend improvements