RTL8187 USB NIC: Windows likes it, Lubuntu not so much

DrMrLordX

Lifer
Apr 27, 2000
23,114
13,215
136
I got an el-cheapo USB NIC because anything over 802.11g is overkill for my slow-arsed internet connection, and hey, it was only ~$5 or so, and it supported Linux out of the box so why not?

Anyway, it seems to work okay some of the time, but once it runs for awhile (and heats up) under Linux, it starts to have connection problems that manifest as packet loss or inexplicable inability to deal with large numbers of small file downloads (so a download of a large file might work out okay, but loading a web page with a bunch of embedded .pngs/.jpgs will just stall out). It also seems to have problems with DNS when it's in one if its "moods". I've used it under two routers (an old Linksys WRT54G, and a refurb Netgear AC1450 flashed to a 1750/6300v2), and it exhibits the same behavior under both of them. The only way to deal with the problem is to blow a fan on it (which doesn't really fix the problem, just mitigates it, somewhat) and/or unplug the NIC for awhile, let it cool off, and then plug it back in.

Sometimes it will go for hours before acting stupid, and sometimes it's only a few minutes.

However, under Windows (Win7 and Win10) using the RTL8187L driver from the Realtek site, the thing works flawlessly, no matter how warm it gets. No dropped packets, no weird hesitation. It seems strange that changing OS and driver can produce such a radical change in behavior from the device.

So uh, any idea why it's behaving so poorly under Linux?

Just an FYI, but the Linux distro is Lubuntu 14.10. The NIC is supported by default in Lubuntu, and I didn't have to/try to install anything else to get it to work better.
 

DrMrLordX

Lifer
Apr 27, 2000
23,114
13,215
136
Or uh, if I can't get this stupid cheapo wireless NIC to behave properly under Lubuntu 14.10, would anyone care to recommend an 802.11ac PCIe replacement that will function properly in Lubuntu 14.10? Many of the Ubuntu-related recommendations I see out there for wireless NICs are for USB 802.11n products.
 

DrMrLordX

Lifer
Apr 27, 2000
23,114
13,215
136
Okay, so I learned something today. Apparently, this formerly-Linux-friendly NIC now has "issues" under newer kernel versions. But . . .

http://askubuntu.com/questions/453110/rtl8187-wireless-card-drops-signal-within-seconds
http://www.backtrack-linux.org/forums/showthread.php?t=54375

Going through those threads got me to a solution. If any of you have one of these cheap-arsed "Supported by Linux" RTL8187 USB NICs, they can be made to work, just try the above. For me, the following worked:

sudo ifconfig wlan0 down
sudo iw reg set BO
sudo iwconfig wlan0 txpower 20
sudo iwconfig wlan0 rate 36M auto
sudo iwconfig wlan0 frag 512
sudo iwconfig wlan0 rts 512
sudo iwconfig wlan0 retry short 31
sudo iwconfig wlan0 retry long 31
sudo ifconfig wlan0 up