Important issue with Realtek 8192 based wifi dongles

… like the popular Edimax one that is on the recommended parts list here. I use a handful of these.

I fired up another Pi today for a totally different purpose.
I popped in a Edimax wifi dongle, and was greeted with horrible, random ping times.
SSH wouldn’t connect until I pinged the board a bunch to ‘wake it up’ and get it to ARP.

I did some poking around in my Mikrotik and realized the dongle was disconnecting.
No… really? Yes. Power management is enabled by default! How … useless!

So then I wondered, why does this not happen on the Piaware? Well that’s because it is always sending packets.
A quick check shows me yep, it’s enabled, so the PiAware would disconnect the wifi and go to sleep as well if there wasn’t a stream of planes and/or the feeder check in.

I would like to make a suggestion that the devs include this fix in the main build.
Anyone who runs this dongle should peform this configuration change so their dongle doesn’t go to sleep.
If you don’t use the dongle, the option means nothing since the driver doesn’t load anyways.

Check if you are impacted - issue this command:

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

and it comes back with a 1 (one), it means you have this driver loaded and the power management is enabled.
If it comes back with a two, you have maximum power savings enabled! Even worse.

To disable power management for this driver:

sudo sh -c "echo 'options 8192cu rtw_power_mgnt=0' >> /etc/modprobe.d/8192cu.conf"
sudo reboot

… and you’re good to go.

After a reboot, you can verify power management is disabled by re-running the cat command above, and it should output a zero.

Now I can get back to what I was trying to accomplish in the first place :slight_smile:

Edit: Bonus. This fixed my FlightRadar24 problem too, because when it attempted to start, the network wasn’t ready yet, and it would fail. Now it’s working automatically on reboot.

Excellent! PS was turned on. Funny, I was an 802.11 field engineer for 15 years in the transportation and logistics markets. Power Saving was the root of all evil for us. Don’t know why I didn’t think about this. Thanks!

I was just about to update too to say that after a solid 14 hour run, the Pi2’s Wifi finally crapped out.

My advice - get rid of the dongle if you can. The power management fix doesn’t cut it (it was completely dead and wouldn’t reconnect without a reboot this morning).

Watching my PiAware at the router, it looks fine, then suddenly ping times will swing and Rx/Tx levels will drop to 1 Mb and SNR will go to pot! … then a couple seconds later it will recover. That tells me power management is still playing around, and I don’t need that.

I have had nothing but problems in the last 24 hours with my newly created Pi for GPS clocking. Between constant dropping of the wifi, the wpa_supplicant not behaving properly, power levels all over.

After some Googling around I have found nothing but horrible experiences with this chipset. I’m abandoning any hope and just stringing network cables over. It won’t look as pretty but at least it will work.

I’ve always disliked wireless, but with the iOS devices and having no choice, I began to accept it, but this gives me renewed hatred :laughing: I’ve always been a proponent of ‘if you can cable it, do it’.

I fully expect a response now from Oliver saying “compile the 8192 driver from scratch and it will work better” hehehheh. I remember having to do that with a different realtek chip on an actual eth0 port when we first started playing with Asus EEEboxes. Same sort of problem, but the error count would scale to infinity.

Compile the 8192 driver from scratch and it … oh, wait. :smiley:

I have a couple of these and they are flaky, but not to the point they drop out completely.
(Right now I have one that’s 15cm from the access point and it’s getting 300ms latency for no apparent reason)

No real hints other than make sure the interface comes back up properly if the link goes down.
The most reliable way I’ve found seems to be to turn off hotplug and turn on wpa-roam in /etc/network/interfaces, then put the SSID config etc in wpa_supplicant.conf

And if you’ve got a nice GPS clock source, don’t put it on the far end of a wireless link if you can avoid it…

Yep - I totally agree. I don’t have a switch in the room where the Pi is right now, but that is going to change really soon. At least this will save me some aggravation, perhaps, in the meantime.

I have an AirportExpress box (Apple) in the attic which connects via WiFi to my main router. The Pi is plugged directly into the AirportExpress with no issues and apart from that, the box also provides WiFi coverage for some rooms upstairs. It would be an expensive option to have it solely for the Pi…

My Pi communicates via a Vonets VAP11G WiFi bridge (I had lying about collecting dust)

Basically you set the bridge up on a PC for WiFi SSID and password, then attach it to the Ethernet port on the Pi and a supply (USB is ok) - and the Pi is then on WiFi (via the Ethernet port).

There are other makes.

The funny part is it probably would get better if I did, but I can’t be arsed.

It seems that the more data you push through them, the better they operate.

That’s how I had it, I tried manual, fixed IP, wpa inside the interfaces, wpa in the supplicant, all various results but in the end a dead dongle.

I know, I know. Nice precise tool and then throw it on a crap link. I will move my Mikrotik up to the office from the basement.

At the end of the day, you get what you pay for. A $15 dongle is going to operate like, well, a $10 dongle.


I’m not sure anyone has had this issue before or not. But when I turn on the microwave in the kitchen my 2.4 side of my router will stop working till the microwave stops. My wireless devices will stay connected to the router, but can’t access anything. I run a dual band router. I have had this happen with 3 different microwaves and routers.

I looked at my last microwave that I had and they run around the 2.4 Ghz range. Just a thought. …

Microwaves are horrible. When I deploy a new Mikrotik I tell the client to put a glass of water in the microwave and I watch the frequency usage graph. Then I can determine what channel group to use that has the least impact from the nuker.

Good idea. My last microwave I was wondering if RF was leaking from the microwave, so I got my RF tester that we use in the wireless field and it didn’t go off. But when You try different brand routers and microwaves. I would say it’s not leaking any RF.

i have this in my 8192cu.conf file

    options 8192cu rtw_power_mgnt=0 rtw_enusbss=0 rtw_ips_mode=0

As for the wifi drop down.
create a file in /etc/ named with below stuff


ping -c4 ${TESTIP} > /dev/null

if  $? != 0 ]
    logger -t $0 "WiFi seems down, restarting"
    ifdown --force wlan0
    ifup wlan0
    logger -t $0 "WiFi seems up."

change ip for local router ip or devices that is ALWAYS active.

Crontab entry # */5 * * * * root /etc/
to let it check each 5 minutes for wifi.

When I first set up the receiver I ran a cable. Not liking the cable running through the house I wanted to get a Wi-Fi dongle but everything I read in here worried me. Instead I used a Linksys RE4000W Wireless Range Extender. This range extender has two Ethernet ports. I didn’t really need an extender but the Ethernet port allows a wired connection to the receiver. So I am running wireless from my router to the extender, which I placed next to the receiver. With a short Ethernet cable I have a Wireless connection but it is wired to the receiver so I don’t have the problem of it dropping. While I did have to set up the extender, there was no setup on the receiver. Just plugged it in and it has been running for six days, never has gone offline.

I’ve had success with these units, and they are USB powered, so they work off of a powered USB hub.

Initial setup of my PI2 with CAT5 to Router was without issue. When I plugged the Edimax mini WIFI dongle it repeatedly failed the connection. After reading these post I was going to use my Bridge to get the WIFI signal to my router, but decided to swap out the WIFI dongle for an old ugly N stick that had always worked.

I pulled the failing WIFI mini dongle, installed the old 3" USB WIFI stick, and it has been running for the last month without issue.