Monday, April 20, 2015

Disable Wifi Power Management

If you are experiencing drop outs on your wifi interent connection, it could be that your dongle is turning itself off after an idle period. To stop your wifi dongle doing this, we need to disable its power management.
Either SSH to your Pi, or login to its desktop and open up a terminal.
First, make a backup of your existing interfaces file:
sudo cp /etc/network/interfaces /etc/network/interfaces.backup
Now edit the original interfaces file:
sudo nano /etc/network/interfaces
Assuming you haven’t edited this file before all you need to do is delete its entire contents, and copy the following into it:
auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off
iface default inet dhcp
The important block of code here is:
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off
iface default inet dhcp
So only add that section if you have a custom configuration for any other network interfaces.
Now exit the nano editor and save your changes:
Ctrl+x
Y
Enter
Now reboot your raspberry pi:
sudo reboot
Once the raspberry pi has rebooted, check that the wifi dongle’s power management has been disabled by typing this command:
iwconfig
And checking for: “Power Management:off”

No comments:

Post a Comment