WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: rtl8821ae firmware problem.  (Read 11941 times)

Offline bonbob

  • Jr. Member
  • **
  • Posts: 99
rtl8821ae firmware problem.
« on: July 06, 2018, 01:30:18 PM »
Hello all.
I have an m-pci wi-fi card on rtl8821ae chipset and use it in AP-mode with hostapd on CorePure64;
Seems drivers not load at all, even if i load firmware-rtlwifi.tcz extension. Here is log:

Code: [Select]
root@TCL:~# dmesg | grep rtl
rtl8821ae: Using firmware rtlwifi/rtl8821aefw_29.bin
rtl8821ae: Using firmware rtlwifi/rtl8821aefw_wowlan.bin
rtl8821ae 0000:04:00.0: Direct firmware load for rtlwifi/rtl8821aefw_29.bin failed with error -2
rtl8821ae 0000:04:00.0: Falling back to user helper
ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
rtlwifi: rtlwifi: wireless switch is on
rtl8821ae 0000:04:00.0: Direct firmware load for rtlwifi/rtl8821aefw_wowlan.bin failed with error -2
rtl8821ae 0000:04:00.0: Falling back to user helper
rtlwifi: -----hwsec_cam_bitmap: 0x0 entry_idx=4
rtlwifi: -----hwsec_cam_bitmap: 0x10 entry_idx=5
rtlwifi: -----hwsec_cam_bitmap: 0x30 entry_idx=6

wlan0 interface has appeared in system and seems it work, but download speed via wi-fi is very-very poor (less than 1Mbit/s)
can i fix it?

Offline bonbob

  • Jr. Member
  • **
  • Posts: 99
Re: rtl8821ae firmware problem.
« Reply #1 on: July 06, 2018, 03:11:03 PM »
Well... i found this binaries, but they are not working.

Code: [Select]
rtl8821ae: Using firmware rtlwifi/rtl8821aefw_29.bin
rtl8821ae: Using firmware rtlwifi/rtl8821aefw_wowlan.bin
ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
rtlwifi: rtlwifi: wireless switch is on
rtl8821ae: Init MAC failed
rtl8821ae: Init MAC failed
rtl8821ae: Init MAC failed
rtl8821ae: Init MAC failed
rtl8821ae: Init MAC failed
rtl8821ae: Init MAC failed
rtl8821ae: Init MAC failed

Offline bonbob

  • Jr. Member
  • **
  • Posts: 99
Re: rtl8821ae firmware problem.
« Reply #2 on: July 07, 2018, 10:45:42 AM »
So, information in net says that there is some problem with drivers for linux. They are unstable. The best solution is to change Wi-Fi adapter on some older chipset (atheros is recommended). Problem with rtl8821ae has not only TCL. On Linux Mint it work slow too. On Alpine Linux softAP has not appeared at all, with any errors or warnings. My best achievement was to increase upload speed to accurate 5Mbit/s, and it not depend on Wi-Fi signal power. Anyway it is too slow for me.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: rtl8821ae firmware problem.
« Reply #3 on: July 07, 2018, 10:53:27 AM »
Until the driver is fixed just get a USB WiFi device, many of the AC adapters (Which are quite fast) are supported now. 

Offline bonbob

  • Jr. Member
  • **
  • Posts: 99
Re: rtl8821ae firmware problem.
« Reply #4 on: July 07, 2018, 01:54:18 PM »
I returned to my old adapter with  AR5414 chipset. It works perfect a 24hrs in a day, weeks and monthes. Unfortunately it works  only with G-mode on 2.4Ghz. So i have  to wait a undefinite time, while rtl8821ae became as good as AR5414.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: rtl8821ae firmware problem.
« Reply #5 on: July 07, 2018, 08:43:47 PM »
I returned to my old adapter with  AR5414 chipset. It works perfect a 24hrs in a day, weeks and monthes. Unfortunately it works  only with G-mode on 2.4Ghz. So i have  to wait a undefinite time, while rtl8821ae became as good as AR5414.
Can’t you get an N, or AC based usb WiFi adaptor in your area? Or get one shipped?  I mean they’re cheap these days




Sent from my iPhone using Tapatalk

aus9

  • Guest
Re: rtl8821ae firmware problem.
« Reply #6 on: July 08, 2018, 04:15:39 AM »
Hi

FWIW you may like to try a modprobe option in loading that config as per

options rtl8821ae debug=0 disable_watchdog=N fwlps=N swlps=Y swenc=Y ips=N msi=0

Quote
options rtl8821ae debug=0 disable_watchdog=N fwlps=N swlps=Y swenc=Y ips=N msi=0

ref
https://gist.github.com/anhewa/575bd408a7386732fe9de74f7c87eb83

you may be able to use OUR /etc/modprobe.conf file for that purpose?

other distros may use /etc/modprobe.d  and if above fails we could look at creating that dir and injecting a file into it
with a name like wl.conf

good luck

aus9

  • Guest
Re: rtl8821ae firmware problem.
« Reply #7 on: July 08, 2018, 04:30:41 AM »
@ coreplayer2

there appears to be a git change claiming fix connection problem

ref
https://github.com/lwfinger/rtlwifi_new/tree/master/rtl8821ae

Do you think this might help the OP?

aus9

  • Guest
Re: rtl8821ae firmware problem.
« Reply #8 on: July 08, 2018, 09:33:12 PM »
@ bonbob

and as I have built one kernel from lwfinger's site, I can modify my build script to build 8188ae.

Initially my offer would be to get you to test it privately, but I have yet to build it.
Are you interested?

I will have to fix up 8188 which you can see in Apps but gives you the idea, or you could modify my build script and have a go yourself for either private use or once tested submit.

Offline bonbob

  • Jr. Member
  • **
  • Posts: 99
Re: rtl8821ae firmware problem.
« Reply #9 on: July 11, 2018, 06:27:43 PM »
Can’t you get an N, or AC based usb WiFi adaptor in your area? Or get one shipped?  I mean they’re cheap these days

I don't need any cheap USB adapter. For the best perfomance wi-fi card must have at least sockets for the external antennas and 20dBm txpower. Unfortunately many cheap adapters with stable drivers has AR92 and a AR95 сhipsets with 14-15 dBm txpower.  I have tried to use Intel, Broadcom or Ralink cards. All of them has different problems in TCL. Only rtl8821ae show the best results.

this options
Code: [Select]
options rtl8821ae debug=0 disable_watchdog=N fwlps=N swlps=Y swenc=Y ips=N msi=0has change nothing in perfomance.

Bluetooth device has not appeared in system at all. But It is not critical for me.
If you has some ideas i'll try all of them.

aus9

  • Guest
Re: rtl8821ae firmware problem.
« Reply #10 on: July 11, 2018, 09:17:59 PM »
ok let me see if I can build the kernel module.

aus9

  • Guest
Re: rtl8821ae firmware problem.
« Reply #11 on: July 11, 2018, 10:37:08 PM »
Ok I will work out with coreplayer2 whether we look at submitting this package to repo or not.

its only the module and FW for rtl8821ae as the following info might help?

Code: [Select]
tc@box:~$ modinfo rtl8821ae
filename:       /lib/modules/4.14.10-tinycore64/kernel.tclocal/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/rtl8821ae.ko.gz
author:         Realtek WlanFAE <wlanfae@realtek.com>
description:    Realtek 8821ae 802.11ac PCI wireless
license:        GPL
parm:           int_clear:Set to 0 to disable interrupt clear before set (default 1)

parm:           disable_watchdog:Set to 1 to disable the watchdog (default 0)

parm:           debug_mask:Set debug mask (default 0)
parm:           debug_level:Set debug level (0-5) (default 0)
parm:           msi:Set to 1 to use MSI interrupts mode (default 1)

parm:           fwlps:Set to 1 to use FW control power save (default 1)

parm:           swlps:Set to 1 to use SW control power save (default 0)

parm:           ips:Set to 0 to not use link power save (default 1)

parm:           swenc:Set to 1 for software crypto (default 0)

alias:          pci:v000010ECd00008821sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008812sv*sd*bc*sc*i*
depends:        rtlwifi,rtl_pci,btcoexist,mac80211
intree:         Y
vermagic:       4.14.10-tinycore64 SMP mod_unload
firmware:       rtlwifi/rtl8821aefw_29.bin
firmware:       rtlwifi/rtl8821aefw.bin

as I do not have this device....when you load pciutils ....do you get a match for either of those 2 pci devices?
possible
pci:10EC 8821 or   pci:10EC 8812

if so....and if interested create a temp email and send me and email to aus9 at gmx dot com
I will send you the TCZ stuff......once you have downloaded
for the test.....remove all realtek firmware and wireless TCZs and only load this TCZ which is called rtl8821ae
it contains one kernel module and 3 FW for 8821ae


EDIT  I know you say corepure64
and its built on 64 bit sorry if you are 32 bit....we would then have to look at you running a build script?
« Last Edit: July 11, 2018, 10:46:54 PM by aus9 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: rtl8821ae firmware problem.
« Reply #12 on: July 12, 2018, 01:01:03 AM »
Can’t you get an N, or AC based usb WiFi adaptor in your area? Or get one shipped?  I mean they’re cheap these days

I don't need any cheap USB adapter. For the best perfomance wi-fi card must have at least sockets for the external antennas and 20dBm txpower. Unfortunately many cheap adapters with stable drivers has AR92 and a AR95 сhipsets with 14-15 dBm txpower.  I have tried to use Intel, Broadcom or Ralink cards. All of them has different problems in TCL. Only rtl8821ae show the best results.

If you has some ideas i'll try all of them.

Oh my!!   Are those AR chips from way back in 2016? ;p       WiFi tech. has improved tremendously over the last year alone.   
Obviously I don't know your specific environment but I'd also consider a router upgrade.

I'm using a builtin "Intel Dual Band Wireless-AC 8260' via PCIe which runs flawlessly on TC9 (like all Intel adapters) connected with a multi node Mesh network and honestly it's hard to tell the difference these days between Wireless and Gigabit Ethernet unless you run a benchmark..






« Last Edit: July 12, 2018, 01:11:05 AM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: rtl8821ae firmware problem.
« Reply #13 on: July 12, 2018, 09:03:49 AM »

Hello bonbob

Many folks are impressed by the Asus AC1900 USB-AC68 Dual antenna USB3 adapter.  I have no idea the availability of Linux drivers,  but 79USD still seems cheap to me, might be worth investigating?

aus9

  • Guest
Re: rtl8821ae firmware problem.
« Reply #14 on: July 12, 2018, 09:28:51 PM »
re-visit that web link that says
options rtl8821ae debug=0 disable_watchdog=N fwlps=N swlps=Y swenc=Y ips=N msi=0

If you do not want to try my new TCZ....thats fine.......and please look at buying a good wifi adapter pci or usb
in the meantime, assuming you are open to suggestions here is one more....assumes you are on current repo FW and WL modules

Code: [Select]
lsmod | grep 8821
rtl8821ae             208896  0
rtl_pci                24576  1 rtl8821ae
btcoexist             139264  1 rtl8821ae
rtlwifi                57344  3 rtl8821ae,rtl_pci,btcoexist
mac80211              258048  3 rtl8821ae,rtl_pci,rtlwifi

create a file under .local/bin  lets call it test

contents
Quote
#!/bin/sh
tce-load -i wireless-4.14.10-tinycore64 firmware-rtlwifi-new
sudo rmmod rtl8821ae
# may need to unload some more modules too?
sudo modprobe rtl8821ae debug_level=0 disable_watchdog=0 fwlps=0 swlps=0 swenc=1 ips=0 msi=0
sudo /usr/local/etc/init.d/rfkill start

Code: [Select]
chmod +x .local/bin/test
naturally you can copy and paste these commands into your terminal as I am not sure if we have to unload some modules before unloading your realtek module
I could test loading and unloading my usb module but that is not a true test






« Last Edit: July 12, 2018, 09:30:26 PM by aus9 »