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


Forcing a Rails database column to be not null

How you can force a table column to always have something in it with Rails

Writing Marketing

We've deleted an article's worth of unhelpful words

We've improved several pages across our site by removing words that add no value, and often detract from the article.