LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-24-2024, 01:45 PM   #1
hunter0one
LQ Newbie
 
Registered: Apr 2019
Posts: 25

Rep: Reputation: Disabled
Post Poor network performance with rtl8xxxu module compared to rtl8192cu, rtl8192cu also behaves strangely (RTL8188CUS)


I have a Netis RTL8188CUS Wi-Fi Adapter which behaves strangely with both the rtl8192cu and rtl8xxxu modules in different ways. The kernel automatically loads both rtl8192cu and rtl8xxxu when the adapter is plugged in. When separating the two modules (i.e blacklisting one or the other), if I'm using rtl8192cu all I/O slows to a halt until the network becomes configured. Applications won't load and commands in the terminal won't run until its finished doing its thing. This can take up to 5 minutes and suspending is no longer possible. However, once all is said and done and I'm actually using it, the performance is what I normally would get. I don't have bouts where websites don't load or random lag spikes in games (this will make sense in a second).

On the other hand, if I use rtl8xxxu then it no longer slows down the system until the network is configured and suspend works fine. However, the network performance is quite bugged where every 30 seconds or so it gets "choked", websites don't load or if I'm in-game my ping skyrockets to 500+, causing it to be unplayable. Its my understanding that the rtl8xxxu is set to replace rtl8192cu and it doesn't hang my entire system up so it's what I use, but I'd like to know what causes the poor network performance and the solution since the former module doesn't have this problem.

What I've tried:
  • Turning on parameters for rtl8xxxu that have helped others (this is what I have in /etc/modprobe.d/rtl8xxxu-options.conf):
    Code:
    options rtl8xxxu dma_aggregation=Y ht40_2g=Y
    I've also tried different values for dma_agg_timeout and dma_agg_pages, but it didn't make any difference.
  • Turning off Network Manager's powersaving with "wifi.powersave=2"
  • Using nmcli con edit to change 802-11-wireless.powersave from 0 (default) to 2 (disabled) for the device
  • Ensuring "Power Management" is off in iwconfig

Here is the device in lsusb:
Code:
Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
 
Old 03-25-2024, 06:51 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
For future reference, Realtek don't support linux, the little software they do write is crappy, and you are always likely to have issues with them. They do sell their chips so cheap you could give them away in breakfast cereal packets, and they often end up in cheap usb wifi dongles. Avoid them. Spend a bit more. Anyone else is usually better. Even Mediatek & Ralink drivers generally work well.

That said, I wouldn't blacklist anything. It it wants half a dozen modules and works, let it have them.
If it doesn't work, check on github in case someone wrote one. Only download a driver that has recent commits. Some guys wrote a driver, got their job, and promptly forgot it. You compile that against the kernel source, and it ends up in a misc/ directory and is used like other modules. Then you can blacklist the duds.
 
Old 03-25-2024, 08:23 AM   #3
hunter0one
LQ Newbie
 
Registered: Apr 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
I have two Realtek dongles, the other one was an RTL8188FU which worked fine with rtl8xxxu in kernels newer than 6.2 but the fuse seems to have gone bad and just times out now according to dmesg. On the other hand I bought this RTL8188CUS because its one of the few ones known to support FreeBSD well, but I didn't realize just how slow FreeBSD wifi networking is, so here I am on Linux again.

Quote:
Originally Posted by business_kid View Post
That said, I wouldn't blacklist anything. It it wants half a dozen modules and works, let it have them.
If it doesn't work, check on github in case someone wrote one. Only download a driver that has recent commits. Some guys wrote a driver, got their job, and promptly forgot it. You compile that against the kernel source, and it ends up in a misc/ directory and is used like other modules. Then you can blacklist the duds.
When I just let both load, I suffer from the issues that rtl8192cu has. In other words it completely locks up my system, and I have to unload the module which takes around 5 minutes (for reference I have a Ryzen CPU, its very unnatural) but the network does at least work fine then, the problem is I'm sacrificing the ability to suspend or reboot without it taking a God-awful amount of time. It was my understanding that rtl8192cu is an older driver which has its functionality being replaced with rtl8xxxu.

The only driver I could find is this one that hasn't been worked on in several years, and doesn't work on 6+ kernels: https://github.com/pvaret/rtl8192cu-fixes
 
Old 03-25-2024, 02:16 PM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Ok. There's drivers for both your devices on github. I checked. You're probably best compiling both drivers and testing both. Go for the driver with the most recent commits. You need the kernel source code for your kernel, and the symlink(s) in /lib/modules/<version_number>/ must point to the kernel source tree. Run depmod afterwards.

Tell yourself you deserve the trouble for buying Realtek . Better look for any other supplier even if it means paying more. Qualcomm, Cypress and others make better supported stuff and don't raise a middle finger at Linux! I know for cheap dongles on Ebay or Amazon it can be bad.
 
Old 03-25-2024, 03:28 PM   #5
hunter0one
LQ Newbie
 
Registered: Apr 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
Ok. There's drivers for both your devices on github. I checked.
Where are you seeing this?
 
Old 03-26-2024, 08:22 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
https://github.com/
 
Old 03-26-2024, 11:33 AM   #7
hunter0one
LQ Newbie
 
Registered: Apr 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
So much for a help forum, forget it.
 
Old 03-26-2024, 12:53 PM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
You're supposed to lift a finger yourself, you know. Can you not do a simple search for your wifi cards on github.com's main page?
 
Old 03-26-2024, 08:33 PM   #9
hunter0one
LQ Newbie
 
Registered: Apr 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
You're supposed to lift a finger yourself, you know.
I have looked for a solution long enough now that I felt I needed to actually ask for help! And this is the second time I've had you tell me to buy different hardware. I make sure what I get supports Linux as I don't use any other OS. In fact, the rtl8188fu worked fantastic using the rtl8xxxu module, but recently the EFuse stopped parsing:

Code:
[  820.608715] usb 1-7: new high-speed USB device number 4 using xhci_hcd
[  820.817957] usb 1-7: New USB device found, idVendor=0bda, idProduct=f179, bcdDevice= 0.00
[  820.817966] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  820.817970] usb 1-7: Product: 802.11n NIC
[  820.817974] usb 1-7: Manufacturer: Realtek
[  825.251781] usb 1-7: Fatal - failed to parse EFuse
Out-of-tree modules are really something I want to avoid, but to be clear I've already tried looking on GitHub because desperate times call for desperate measures and the most recent I could find, rtl8192cu-fixes, does not build on a contemporary kernel!
 
Old 03-27-2024, 06:49 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
OK. For the RTL8192CU, try https://github.com/Rick-Moba/rtl8192cu updated a week ago.

The drivers for the rtl 8188cus, the drivers are all ancient. The last one was updated in 2020 to kernel 5.18. The usual thing is that the kernel headers change, so the source errors out. So I'd suspect that one of the kernel modules (rtl8xxx, rtlwifi) can provide support. Mind you, there was little change in 5.x --> 6.x kernels.

Bear in mind wifi devices are 802.11b,g, n or perhaps 802.11a capable.the b,g. & n are increasing speeds, and 802.11a is the fastest. An old device might not be 802.11n compatible. So your speed would slow, but that's ok on some old devices. You'll have to check they can both do.

I'd try thr rtl8192cu first.
 
Old 03-27-2024, 10:48 AM   #11
hunter0one
LQ Newbie
 
Registered: Apr 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Thanks, I didn't see that one. All the results from GH's front page were from over a year ago..

I made an XBPS template and it builds and works just fine! Though, I'll have to test it more before I assume this is solved.
 
Old 03-27-2024, 08:03 PM   #12
hunter0one
LQ Newbie
 
Registered: Apr 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Okay, I haven't had any of the aforementioned issues since I installed the 8192cu DKMS. This is performing as expected. It's solved. Thanks!
 
Old 04-09-2024, 05:13 PM   #13
Bitterblue
LQ Newbie
 
Registered: Apr 2024
Posts: 2

Rep: Reputation: 0
Hi, hunter0one.

I fixed some problems in rtlwifi/rtl8192cu recently. You should try it again with kernel 6.9. It should not take 5 minutes to configure the network anymore. I'm not sure about suspending, I didn't have any trouble with that with my RTL8192CU.

The lag spikes etc is due to bugs in rtl8xxxu. Where did you buy such an old chip in 2024? I would like one too, for my collection, then I could fix rtl8xxxu.

The only way you get "Fatal - failed to parse EFuse" from rtl8xxxu is if the first two bytes of the efuse don't have the magic value 0x8129. It sounds like your device broke somehow.
 
Old 04-11-2024, 06:02 PM   #14
hunter0one
LQ Newbie
 
Registered: Apr 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
Hi Bitterblue.

I'll try to build 6.9 and get back to you. I was going to wait until it's actually released but I guess it wouldn't hurt.

Quote:
Where did you buy such an old chip in 2024
I just got both on Amazon looking for cheap wifi chips. I know it's not the best place but Amazon's the only one I'm on.

https://www.amazon.com/Netis-Wireles...s%2C120&sr=8-1 Here's the one I have.

As for the RTL8188FU I can't find the listing anymore but there's a bunch with similar casing (black and red like this one).

I imagine it probably burnt out, overheating seems to be a problem with these little chips. I'll probably invest in some better adapter that also has bluetooth here soon but I hope this helps with improving rtl8xxxu. :-)
 
Old 04-13-2024, 06:49 PM   #15
hunter0one
LQ Newbie
 
Registered: Apr 2019
Posts: 25

Original Poster
Rep: Reputation: Disabled
I'm happy to report back kernel 6.9.0-rc3 fixes my need for the 8192cu DKMS. I also removed my modprobe.d blacklist to see what would happen and while rtl8192cu and rtl8xxxu both load it works and performs as expected. Thank you!
 
  


Reply

Tags
module, realtek, rtl8139, wifi, wifi dongles



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
touchpad behaves strangely when web browsing harnadem Linux - Hardware 7 03-29-2017 07:38 PM
"Run program" in KDE4 behaves strangely (look-up function works sometimes, not always Olaus Linux - Software 1 09-21-2009 06:16 AM
Why firefox behaves strangely? vibinlakshman Linux - Newbie 3 05-12-2009 09:34 AM
The command fdisk behaves strangely Gins Linux - General 5 10-28-2006 11:42 AM
New install behaves strangely - Konqueror NickC SUSE / openSUSE 4 05-20-2005 10:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration