It's Brent

Fixing Raspberry Pi Wifi from Dropping

Posted on May 22, 2014

I noticed some issues with my Raspberry Pi dropping the Wifi and not reconnecting. After some tinkering I was able to get it fixed. I am using the Edimax EW-7811Un network adapter, which works awesome for it’s size and price. I originally created a script that checked network status and tried to bring the network back up that ran on a cron job, but it never worked properly. Here is the following solution that I got working.

First thing is to go into the /etc/ifplugd/action.d/ directory and move the ifupdown to a backup file (ie ifupdown.original). Then use the following command to copy the ifupdown from wpa_supplicant.

cp /etc/wpa_supplicant/ ./ifupdown

The next thing is to disable power management on the Edimax wifi adapter. Power management will cause the device to sleep if it is not in use, but sometimes not wake up. To check if it is on, run the following command. If you see a 1 printed, then power management is turned on.

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

If you that command returned a 1, then either create or modify the file /etc/modprobe.d/8192cu.conf using vim or whichever editor you are familiar with. In that file, add the following text.

# Disable power saving
options 8192cu rtw_power_mgnt=0

After you have done all this, reboot your Pi. Once rebooted and run the command to check your power management, you should get a 0. This has solved most of my issues with the Wifi not working. My only remaining issue is a baby monitor that interferes on the same frequency.


I am a software developer living in Shreveport, LA with my wife, daughter, and 2 dogs. Most of my time is spent developing for the web using Rails, on mobile for iOS, and sometimes for the Mac. When I'm not programming I follow the Texas Rangers through the ups and downs of all 162 games.

You can find me on Twitter and Github.

Follow @BrentNycum