rtl8821ae wifi slow

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
idlatch

rtl8821ae wifi slow

Post by idlatch »

Internet is very slow, 2 Kbps with spikes up to 2 Mbps. It occasionally drops the signal also. I've been going through the forums trying to find a fix to this, and have done everything i could find. I even tried to turn off the power management found here
https://itechscotland.wordpress.com/201 ... in-ubuntu/
I have turned off the power management with no increase in speed. I even created the file as directed above, but on restart the power management comes back on. Here is all the info I know how to pull;
inxi -Fxz

Code: Select all

System:    Host: rebecca-GB-BXA8-5557 Kernel: 3.16.0-38-generic x86_64 (64 bit, gcc: 4.8.2) 
           Desktop: Cinnamon 2.6.13  Distro: Linux Mint 17.2 Rafaela
Machine:   Mobo: GIGABYTE model: M1M3XCP-00 version: 1.x Bios: American Megatrends version: F2 date: 04/20/2015
CPU:       Quad core AMD A8-5557M APU with Radeon HD Graphics (-MCP-) cache: 8192 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm) bmips: 16768.5 
           Clock Speeds: 1: 1400.00 MHz 2: 1400.00 MHz 3: 1400.00 MHz 4: 1700.00 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Richland [Radeon HD 8550G] bus-ID: 00:01.0 
           X.Org: 1.15.1 drivers: ati,radeon (unloaded: fbdev,vesa) Resolution: 1440x900@59.9hz 
           GLX Renderer: Gallium 0.4 on AMD ARUBA GLX Version: 3.0 Mesa 10.1.3 Direct Rendering: Yes
Audio:     Card-1: Advanced Micro Devices [AMD] FCH Azalia Controller driver: snd_hda_intel bus-ID: 00:14.2 
           Card-2: Advanced Micro Devices [AMD/ATI] Trinity HDMI Audio Controller driver: snd_hda_intel bus-ID: 00:01.1 
           Sound: Advanced Linux Sound Architecture ver: k3.16.0-38-generic
Network:   Card-1: Realtek RTL8821AE 802.11ac PCIe Wireless Network Adapter driver: rtl8821ae port: d000 bus-ID: 06:00.0
           IF: wlan0 state: up mac: <filter>
           Card-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller 
           driver: r8169 ver: 2.3LK-NAPI port: e000 bus-ID: 05:00.0
           IF: eth0 state: down mac: <filter>
Drives:    HDD Total Size: 265.6GB (2.2% used) 1: id: /dev/sda model: WDC_WD2500LPLX size: 250.1GB temp: 31C 
           2: USB id: /dev/sdb model: TransMemory size: 15.5GB temp: 0C 
Partition: ID: / size: 223G used: 5.2G (3%) fs: ext4 ID: swap-1 size: 7.72GB used: 0.00GB (0%) fs: swap 
RAID:      No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors:   System Temperatures: cpu: 35.9C mobo: N/A gpu: 35.0 
           Fan Speeds (in rpm): cpu: N/A 
Info:      Processes: 181 Uptime: 15 min Memory: 401.8/7108.3MB Runlevel: 2 Gcc sys: 4.8.4 
           Client: Shell (bash 4.3.11) inxi: 1.9.17
lshw

Code: Select all

 *-network
                description: Wireless interface
                product: RTL8821AE 802.11ac PCIe Wireless Network Adapter
                vendor: Realtek Semiconductor Co., Ltd.
                physical id: 0
                bus info: pci@0000:06:00.0
                logical name: wlan0
                version: 00
                serial: xxxxxxxxxxxxxxxxx
                width: 64 bits
                clock: 33MHz
                capabilities: bus_master cap_list ethernet physical wireless
                configuration: broadcast=yes driver=rtl8821ae driverversion=3.16.0-38-generic firmware=N/A ip=192.168.0.8 latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn
                resources: irq:18 ioport:d000(size=256) memory:fe900000-fe903fff 
mintWifi

Code: Select all

sudo /usr/lib/linuxmint/mintWifi/mintWifi.py
-------------------------
* I. scanning WIFI PCI devices...
  -- Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter
      ==> PCI ID = 10ec:8821
-------------------------
* II. querying ndiswrapper...
-------------------------
* III. querying iwconfig...
eth0      no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:"xxxxxxxxxxxxxxxxx"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: xxxxxxxxxxxxxxxx   
          Bit Rate=6.5 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr=2347 B   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=70/70  Signal level=-26 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:2   Missed beacon:0

lo        no wireless extensions.

-------------------------
* IV. querying ifconfig...
eth0      Link encap:Ethernet  HWaddr xxxxxxxxxxxxxxxxxxx  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:xxxxxxxxxxxxxxxx  Mask:255.0.0.0
          inet6 addr: xxxxxxxxxxxxxxxxxxx/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:266 errors:0 dropped:0 overruns:0 frame:0
          TX packets:266 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:24800 (24.8 KB)  TX bytes:24800 (24.8 KB)

wlan0     Link encap:Ethernet  HWaddr xxxxxxxxxxxxxxxx  
          inet addr:xxxxxxxxxxx  Bcast:xxxxxxxxxxxxx  Mask:255.255.255.0
          inet6 addr: xxxxxxxxxxxxxxxxx/64 Scope:Link
          inet6 addr: xxxxxxxxxxxxxxxxxxxxxxx/64 Scope:Global
          inet6 addr: xxxxxxxxxxxxxxxxxxxxxxx/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:842 errors:0 dropped:0 overruns:0 frame:0
          TX packets:250 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:130451 (130.4 KB)  TX bytes:43198 (43.1 KB)

-------------------------
* V. querying DHCP...
RTNETLINK answers: File exists
-------------------------
* VI. querying nslookup google.com...
Server:		209.18.47.61
Address:	209.18.47.61#53

Non-authoritative answer:
Name:	google.com
Address: 216.58.218.206 
And as stated above, I created the file to keep the power manager permenently shut off, and as you can see below, it comes back on with reboot;

Code: Select all

rebecca@rebecca-GB-BXA8-5557 ~ $ iwconfig
eth0      no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:"xxxxxxxxxxxx"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: xxxxxxxxxxxxxxxxxxxx   
          Bit Rate=6.5 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr=2347 B   Fragment thr:off
          Power Management:on
          Link Quality=70/70  Signal level=-26 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:1   Missed beacon:0

lo        no wireless extensions.

rebecca@rebecca-GB-BXA8-5557 ~ $ sudo iwconfig wlan0 power off
[sudo] password for rebecca: 
rebecca@rebecca-GB-BXA8-5557 ~ $ iwconfig
eth0      no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:"xxxxxxxxxxxxx"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: xxxxxxxxxxxxxxxx   
          Bit Rate=6.5 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr=2347 B   Fragment thr:off
          Power Management:off
          Link Quality=70/70  Signal level=-26 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:1   Missed beacon:0

lo        no wireless extensions. 
I greatly appreciate any and all help!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: rtl8821ae wifi slow

Post by Laurent85 »

Install new Realtek wifi drivers this way, open a terminal:

Code: Select all

sudo add-apt-repository ppa:hanipouspilot/rtlwifi
apt update
apt install rtlwifi-new-dkms
echo "options rtl8821ae swenc=1 ips=0 fwlps=0" | sudo tee /etc/modprobe.d/rtl8821ae.conf
Reboot.
You might have to change some settings, generally above settings work best, here are available settings for your wifi card:
parm: swenc:Set to 1 for software crypto (default 0) (bool)
parm: ips:Set to 0 to not use link power save (default 1) (bool)
parm: swlps:Set to 1 to use SW control power save (default 0) (bool)
parm: fwlps:Set to 1 to use FW control power save (default 1) (bool)
parm: msi:Set to 1 to use MSI interrupts mode (default 0) (bool)
Image
idlatch

Re: rtl8821ae wifi slow

Post by idlatch »

That actually made it worse. I had to plug in the ethernet cable. With the cable plugged in it's running 30+ Mbps.
I'm new to linux, the setting for the wireless adapter, are those adjusted using the;
echo "options rtl8821ae swenc=1 ips=0 fwlps=0" | sudo tee /etc/modprobe.d/rtl8821ae.conf

When I restarted after running the posted commands I ran the iwconfig command and the power saver was on again.
Before I posted this I followed some other posts and turned off IPv6, it made no difference.
I was curious about something else, when i ran the inxi -Fxz command, I noticed the processor listed was;
A8-5557M APU with Radeon HD Graphics
Clock Speeds: 1: 1400.00 MHz 2: 1400.00 MHz 3: 1400.00 MHz 4: 1700.00

The processor is rated at 2.1/3.1 Ghz via the manufacturer. Why is it showing up as 1.4 Ghz in the inxi output?
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: rtl8821ae wifi slow

Post by Laurent85 »

That actually made it worse
You can try different settings. Changing the wifi access point protection mode might also help.
You can revert the changes this way if you want:

Code: Select all

apt purge  rtlwifi-new-dkms
Next open Software Sources -> PPAs -> select hanipouspilot/rtlwifi -> Remove
Why is it showing up as 1.4 Ghz in the inxi output?
Frequency scaling changes dynamically to meet current cpu performance needs. Cpu frequency scales down when idle, for the benefit of less power consumption and less heat to dissipate.
Image
idlatch

Re: rtl8821ae wifi slow

Post by idlatch »

Frequency scaling changes dynamically to meet current cpu performance needs. Cpu frequency scales down when idle, for the benefit of less power consumption and less heat to dissipate.
Cpu Throttling, I get that. Mini pcs are built on the same principle as laptops and use most of the same HW. But from what I've seen using the inxi command, and what I've read, it acts more like a list hw, not a running config. http://www.binarytides.com/inxi-system- ... ion-linux/
When I've run the inxi -Fxz it always comes up with the same results reguardless of what I'm doing. This has only 2 conclusions, either it's a list hw command or the cpu isn't throttling. The latter wouldn't surprise me, it's a mobile amd processor in a world dominated by the mobile intel chips. But if the inxi command is just another way to list installed hw like lshw then that's still a problem, because the kernal is only reading it as a 1.4 Ghz.
I don't mean to seem like I'm arguing, to the contrary I'm actually quite thankful for your help. I've taken the Linux+ course, still need to take the test though, and I have quite a lot of expirience with computers in general, but am lacking in expirience with linux. This is good expirience for me to learn the cli and linux in general. But I'm a visual thinker, so reading these things don't necesserally click with me. However, once it does cllick, I can minipulate anything to do anything. Right now I'm just trying to make sure I understand what the commands are doing and why.

As far as adjusting the router settings.... Do you think it's an issue of the pc using a different encryption than the router? I think the pc is set to use wpa2 where the router is using wpa2-aes/tkip. I thought wpa2-aes/tkip was backwards compatable with wpa2. I admit to sleeping through most of Net+, I hate networking with a passion lol
I do know that the wireless nic on the pc is an ac, where the router is gn. But all that's going to do is force the router to slow down to ac speeds when sending packets to the pc, but I should still get 10 Mbps instead of 0.2.... See why I hate dealing with networking?
I got the pc for my wife, so I have to work on it between her uses, gimme a bit to play with the settings for the nic.
Any ideas on why the power manager keeps coming back on after restarts?
idlatch

Re: rtl8821ae wifi slow

Post by idlatch »

parm: swenc:Set to 1 for software crypto (default 0) (bool)
parm: ips:Set to 0 to not use link power save (default 1) (bool)
parm: swlps:Set to 1 to use SW control power save (default 0) (bool)
parm: fwlps:Set to 1 to use FW control power save (default 1) (bool)
parm: msi:Set to 1 to use MSI interrupts mode (default 0) (bool)
Is there a command to check these settings? That was as I mess with them I can keep track of what's been changed?
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: rtl8821ae wifi slow

Post by Laurent85 »

You might first try to change the router's wpa2 encryption mode and keep wpa2 encyption mode on client side, what modes are available on router's side ?

Module option settings are set this way, otherwise default options are used:

Code: Select all

echo "options rtl8821ae swenc=1 fwlps=0" | sudo tee /etc/modprobe.d/rtl8821ae.conf
You can also directly edit the file settings as root:

Code: Select all

gksu gedit /etc/modprobe.d/rtl8821ae.conf
Reboot or reload the module:

Code: Select all

sudo modprobe -r rtl8821ae
sudo modprobe rtl8821ae
Option settings currently active are available this path /sys/module/rtl8821ae/parameters, value "Y" means 1, "N" means 0, either use cat command or this little command line script:

Code: Select all

cat /sys/module/rtl8821ae/parameters/*
# or script:
for option in $(ls /sys/module/rtl8821ae/parameters/*); do echo -n $option ": "; cat $option; done
You might also try the latest ubuntu wily 4.2 kernel now available in trusty repositories:
Update Manager -> View -> Linux kernels -> select latest 4.2.0-18 kernel -> Install
Reboot.
Image
graywolf126

Re: rtl8821ae wifi slow

Post by graywolf126 »

idlatch wrote:
Frequency scaling changes dynamically to meet current cpu performance needs. Cpu frequency scales down when idle, for the benefit of less power consumption and less heat to dissipate.
Cpu Throttling, I get that. Mini pcs are built on the same principle as laptops and use most of the same HW. But from what I've seen using the inxi command, and what I've read, it acts more like a list hw, not a running config. http://www.binarytides.com/inxi-system- ... ion-linux/
When I've run the inxi -Fxz it always comes up with the same results reguardless of what I'm doing. This has only 2 conclusions, either it's a list hw command or the cpu isn't throttling. The latter wouldn't surprise me, it's a mobile amd processor in a world dominated by the mobile intel chips. But if the inxi command is just another way to list installed hw like lshw then that's still a problem, because the kernal is only reading it as a 1.4 Ghz.
I don't mean to seem like I'm arguing, to the contrary I'm actually quite thankful for your help. I've taken the Linux+ course, still need to take the test though, and I have quite a lot of expirience with computers in general, but am lacking in expirience with linux. This is good expirience for me to learn the cli and linux in general. But I'm a visual thinker, so reading these things don't necesserally click with me. However, once it does cllick, I can minipulate anything to do anything. Right now I'm just trying to make sure I understand what the commands are doing and why.

As far as adjusting the router settings.... Do you think it's an issue of the pc using a different encryption than the router? I think the pc is set to use wpa2 where the router is using wpa2-aes/tkip. I thought wpa2-aes/tkip was backwards compatable with wpa2. I admit to sleeping through most of Net+, I hate networking with a passion lol
I do know that the wireless nic on the pc is an ac, where the router is gn. But all that's going to do is force the router to slow down to ac speeds when sending packets to the pc, but I should still get 10 Mbps instead of 0.2.... See why I hate dealing with networking?
I got the pc for my wife, so I have to work on it between her uses, gimme a bit to play with the settings for the nic.
Any ideas on why the power manager keeps coming back on after restarts?
Where are you on this? Any other insight to offer that you discovered?
I have two PCs with the same hardware as you, mine are Gigabyte Brix. I'm having the exact same issue as you and it happens on every Ubuntu based distro I have tried. I love Mint Cinnamon so I tried it first, Then I tried Linux Lite which I use on some older PCs. Right now I'm using Ubuntu Mate 15.10. That is a range of kernels from 3.16 to 4.2. Both computers dual boot windows. In Windows when doing a speedtest I'm getting 30-40 MB down and 5-6 MB up which is right for my ISP connection. On all of those Linux distros the best I have gotten is around 5 MB down. But that never lasts. If I start an install in Steam it may go up to 1.4 mb/sec at first but then drops down to 20-30 kb/sec and stays there. Quite often just dropping out completely then starting back up a minute later.
User avatar
Pjotr
Level 23
Level 23
Posts: 19888
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: rtl8821ae wifi slow

Post by Pjotr »

idlatch wrote:the router is using wpa2-aes/tkip.
Change that to WPA2 Personal with "AES only". No TKIP, no AES + TKIP.

And use the rtlwifi_new driver package from lwfinger, either by means of the hanipouspilot PPA (see what Laurent85 has written about that, earlier in this thread) or by applying this how-to for using the lwfinger account on GitHub:
https://sites.google.com/site/easylinux ... m-lwfinger
(item 8, right column)

Note that in this case, the driver on GitHub contains more recent code than the one in the hanipouspilot PPA:
https://github.com/lwfinger/rtlwifi_new ... ea00fe8242

.... so you might prefer the GitHub method.

Finally, make sure that your wireless network is broadcasting on the optimal channel:
https://sites.google.com/site/easylinux ... st-channel
(item 1, left column)
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Locked

Return to “Networking”