Rtl8821ae driver not working on ubuntu Yakkety Yak #183

Open
saptaru opened this Issue Dec 7, 2016 · 33 comments

Comments

Projects
None yet
10 participants

saptaru commented Dec 7, 2016

Hi,
I have installed ubuntu 16.10 a week ago and since the fresh install the wifi connection was not working properly and now it is not working at all.
I am using lenovo Ideapad 700 with wireless card rtl8821ae msi.
After installation the connection was ok but sudenly and randomly the internet was not working and had to reboot in order to work again (even if the wifi was still connected).
After doing this for some days there were no wifis available in the network-manager's list even if I have the wifi active.
After reading allot on the internet I decided to install this driver.
git clone https://github.com/lwfinger/rtlwifi_new.git
cd rltwifi-master
sudo make && sudo make install

.. still the same. Active wifi but no results in the list and there's a status next to the wifi "Device not ready "

I must say that the the wifi is not blocked by software or hardware since I made sure the status for rfkill list all is set to no

I cannot list here the output of the sudo lshw -class network right now.

I really need the wifi working and stable but I cannot even bring the wifi back again. I would avoid reinstalling the system again and I would say that's my last option.

Thanks!

Owner

lwfinger commented Dec 7, 2016

I also need a good trouble report to be able to help. Are you using any options when the module is loaded?

What kernel version? I do not keep track of the kernel used by any distro. I do need that information.

How do you control the wifi? Many of the problems are due to buggy user-mode software.

saptaru commented Dec 8, 2016

Hi,
Thanks for getting back to me!
I have attached an output below:
I am using network-manager to handle wifi connections.
What do you mean by running the module with options? On build runtime? I am running the make and make install with no options. I didn't found any documentation for running the installer, it might be helpful to point me to one.
I was thinking that it might be due to network-manager but if I restart it with my ethernet cable unplugged using sudo service network-manager restart ![device-not-ready-nm-restarted](https://cloud.githubusercontent.com/assets/690190/21005693/7531afde-bd3e-11e6-9036-6f4f1604f651.png) the I get all the options disabled except for the vpn connections (see second screenshot below)

device-not-ready
device-not-ready-nm-restarted

-comp:~$ sudo lshw -C network
  *-network                 
       description: Wireless interface
       product: RTL8821AE 802.11ac PCIe Wireless Network Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlp2s0
       version: 00
       serial: 78:45:61:c6:72:5b
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtl8821ae driverversion=4.8.0-30-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11
       resources: irq:321 ioport:c000(size=256) memory:d2100000-d2103fff
  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0                                                           
       bus info: pci@0000:03:00.0                                               
       logical name: enp3s0                                                     
       version: 15                                                              
       serial: 54:ee:75:b2:93:7b                                                
       size: 10Mbit/s                                                           
       capacity: 1Gbit/s                                                        
       width: 64 bits                                                           
       clock: 33MHz                                                             
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation                                                               
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168h-2_0.0.2 02/26/15 latency=0 link=no multicast=yes port=MII speed=10Mbit/s                 
       resources: irq:317 ioport:b000(size=256) memory:d2004000-d2004fff memory:d2000000-d2003fff

--------------------------
~$ ifconfig                                                
enp3s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500                            
        ether 54:ee:75:b2:93:7b  txqueuelen 1000  (Ethernet)                    
        RX packets 4514  bytes 3124605 (3.1 MB)                                 
        RX errors 0  dropped 0  overruns 0  frame 0                             
        TX packets 3810  bytes 688939 (688.9 KB)                                
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0              
                                                                                
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536                                    
        inet 127.0.0.1  netmask 255.0.0.0                                       
        inet6 ::1  prefixlen 128  scopeid 0x10<host>                            
        loop  txqueuelen 1  (Local Loopback)                                    
        RX packets 14338  bytes 878523 (878.5 KB)                               
        RX errors 0  dropped 0  overruns 0  frame 0                             
        TX packets 14338  bytes 878523 (878.5 KB)                               
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0              
                                                                                
wlp2s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500                            
        ether 78:45:61:c6:72:5b  txqueuelen 1000  (Ethernet)                    
        RX packets 0  bytes 0 (0.0 B)                                           
        RX errors 0  dropped 0  overruns 0  frame 0                             
        TX packets 0  bytes 0 (0.0 B)                                           
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

----------------
~$ rfkill list all
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
2: hci0: Bluetooth
        Soft blocked: yes
        Hard blocked: no
-------------------

~$ uname -a
Linux saptaru-comp 4.8.0-30-generic #32-Ubuntu SMP Fri Dec 2 03:43:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Other details that might be important:

  • all updates are installed
  • /etc/modprobe.d/ideapad.conf content:
    /etc/modprobe.d/ideapad.conf
  • /etc/modprobe.d/rtl8821ae.conf content:
    #options rtl8821ae fwlps=N options rtl8821ae msi=1
    I will post other details as soon as possible if needed.

Thanks for all your support!

saptaru commented Dec 10, 2016

An update:
I have installed wicd to manage connections and it seems to work without any changes.
So you were right about the network manager being buggy.
I have another laptop that uses ubuntu 16.04 with xfce and didn't work from the beginning with network manager.
Thanks!

Seconded. I spent way too many hours trying to get this fixed assuming it was a driver problem. Installing wicd fixed the problem right away.

mirh commented Apr 2, 2017

Quite likely this bug
Make sure to have at least nm-applet 1.4.4

wicd don't fix mine, can it be related to kernel version? It seems yes for ubuntu, not sure on debian, any report on this? https://ubuntuforums.org/showthread.php?t=2245164

It's true I made other changes suggested in the many branching threads on this topic as well. But installing wicd was the last thing that made the difference, it could be some combination. I have now a clean install of Mint with the standard driver and which again has the problem with Network Manager. It is more reliable with wicd, but does still drop on occasions.

My guess is it's something to do with the way these managers scan or rescan for signals. It's definitely nothing to do with suspend as I'm not suspending and resuming before the connection drops.

mirh commented Apr 3, 2017

It's definitely nothing to do with suspend as I'm not suspending and resuming before the connection drops.

Suspending is just one condition that very likely trigger the issue. Then if it's not nm, fine.. But everybody should have at least 1.4.4, if wicd seemingly makes a difference

Okay, I'm not sure how to check the version of nm-applet but the version of network manager I have installed (I'm using Mint at the moment) is:
network-manager/xenial-updates,now 1.2.6-0ubuntu0.16.04.1 amd64

In other news I now have, so far, a stable connection. The WiFi I am connecting to has 2 frequencies 2.4GHz and 5GHz. Each of these has a different BSSID. So by setting only one of the BSSID values in the settings, the connection now appears stable. The weird thing is it's actually (according to the router) connected to the other frequency than the one I specified. But whatever...

paulsinnett commented Apr 3, 2017

I do have problems returning from suspend as reported in the bug above.

mirh commented Apr 3, 2017

As I mentioned here not even latest yakkety has it, so definitively if you haven't compiled anything on your own, you haven't it.

Then, I'm not doubting there couldn't be a problem with rtl too, but.. one at time I guess?

I found this on the Mint site: https://community.linuxmint.com/software/view/network-manager

It includes a comment which links to instructions for patching Network Manager 1.2.2 to prevent background scans when already connected. I've applied this to my install (which is actually 1.2.6) and it does appear to fix the suspend issue so perhaps this is an issue that 1.4.4 fixes too. (I couldn't test hibernate, because that just flat out fails to resume, but probably for reasons other than WiFi.) I suspect these same instructions will work for Ubuntu Yakkety Yak too.

cryptid11 commented Apr 3, 2017

big news, on debian jessie it works updating from kernel 3.16 to 3.18! (as reported here https://ubuntuforums.org/showthread.php?t=2357435)

It seems that there are multiple problems and multiple solutions. But it's unclear where the errors are or if it's just incompatibility between versions. I have some time to help diagnose problems if anyone can suggest anything they want to try. My current setup is a Lenovo 310 ideapad with Cinnamon Mint 18.1. My current kernel version is 4.4.

mirh commented Apr 3, 2017

Network manager version is separated than applet one.
Mint is really a hell to search for, but still I found nothing. So I'd guess they are using ubuntu one. Which as I said is outdated.

My recommendation would be to try latest version of it (or at least clone repo at least up to last stable 1.4.6 branch), plus why not use 4.11 (otherwise you are missing this whole page of improvements)

Yes, it's an Ubuntu xenial one. The version of network manager is 1.2.6-0ubuntu0.16.04.1 but I've applied the patch above.

I'm not sure how I would go about getting a newer version as 1.2.6 is the latest in the package manager. As you say, Yakkety Yak is the same, I'd have to go to Zesty Zapus to go up to 1.4.4. I could switch to LMDE which gives me the testing version of everything. I'm not sure which version that would give me - 1.6.2 I think.

I have a recipe for a stable connection now though so I'm not worried about getting the latest and greatest of everything. Particularly if that introduces other instabilities.

But, as I say, if you want help tracking down what this particular issue is, or where it is, I'm happy to help as far as I am able.

mirh commented Apr 3, 2017

How hard these non-rolling are 🙄

I really wouldn't know how ppa works, but if you want to just test the hypothesis, you could download this, make, then killall nm-applet (hoping the executable is called like that there), then run newly built nm-applet from your folder.

I've tried a couple of things. First I tried switching to LMDE. Despite the warnings on the Mint site about how unstable this build would be, it turns out the current build LMDE 2 'Betsy' is actually the most conservative. Betsy is based on Debian Jesse which is currently using Network Manager version 0.9! On the plus side, it didn't seem to have as many networking issues, but on the minus side it was doing everything in software so it ran very slow and very hot.

Next I returned to Yakkety Yak. I managed to install a more up to date Network Manager by grabbing the debs for libnm0 and network-manager from the Zesty branch. This seems to have the same problems regarding needing to be locked down to one of the 2.4 or 5GHz signals by BSSID. But it does at least address the suspend issue.

Owner

lwfinger commented Apr 4, 2017

I'm not sure what is meant by "needing to be locked down to one of the 2.4 or 5GHz signals by BSSID". If you are trying to run 2.4 and 5 GHz simultaneously with an RTL8821AE, that is impossible.

If you mean something else, then please explain.

mirh commented Apr 4, 2017

I'm not sure then which part of "even zesty has an older-than-we-are-interested version" wasn't clear.

I'm not trying to run 2.4 and 5 GHz simultaneously. I'm trying to stop it flipping back and forth between those two.

I'm now trying Manjaro. That's taken my kernel up to 4.9.20 and the behaviour is apparently the same. I'm not sure which version of Network Manager this is using though. I'll need to figure out how to use the tools to find out.

Network manager 1.6.2-3
network-manager-applet 1.4.6-1

mirh commented May 13, 2017

They are offering 4.11 now. Could you try it?

I think this is fixed. At least I was able to stream 2+ hours of video on wifi without any messages notifying that the network dropped. This is with a fresh Manjaro install and switched to the 4.11 kernel.

mirh commented May 14, 2017

Cool!
I guess.. that if @saptaru confirms we could close this?

Sorry, spoke too soon. The problem eventually recurred and got stuck in a loop continuously connecting and re-connecting between the two different channels. Restricting it to one channel in the BSSID and rebooting cleared the issue.

mirh commented May 15, 2017

Guess like dmesg might provide some clue now?

galuel commented Jul 9, 2017

I have the same problem on an ASUS R510V, wifi disconnexions with rtl8821ae wifi card. I tried many other fixes that didn't work, and after installing WICD instead of network-manager it seems to work during much more time without interruptions.

I'm on Ubuntu 17.04 and I have the 1.4.4 version of network-manager obtained with :

$dpkg -l network-manager

hyaochn commented Jul 20, 2017

Same problem. Wireless drops every 1-2 hours. Have to type
sudo service network-manager restart
to reconnect.
Same with wicd

Distributor ID: Ubuntu
Description:

Ubuntu 17.04

Release: 17.04
Codename: zesty

Linux

Lenovo-Y520

4.10.0-28-generic #32-Ubuntu SMP Fri Jun 30 05:32:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

03:00.0 Network controller:

Realtek Semiconductor Co., Ltd. RTL8821AE

802.11ac PCIe Wireless Network Adapter

rtl8821ae 229376 0
btcoexist 167936 1 rtl8821ae
rtl_pci 32768 1 rtl8821ae
rtlwifi 98304 3 rtl_pci,btcoexist,rtl8821ae
mac80211 782336 3 rtl_pci,rtlwifi,rtl8821ae
cfg80211 602112 2 mac80211,rtlwifi
btrtl 16384 1 btusb
bluetooth 557056 33 btrtl,hci_uart,btintel,btqca,bnep,btbcm,rfcomm,btusb

network-manager:
Installed:

1.4.4-1ubuntu3.1


saptaru commented Oct 9, 2017

Hello,
Any news on this? It's been a while since I opened this issue :)
Btw I am still using the same system and the wifi still drops randomly. I was able to uninstall wicd without being able to connect to wifi anymore, so I switch back to wicd.
It will be great to have the wifi working. Maybe I will have some time to make a proper debug, just let me know where to start from.
Thanks!

andymnc commented Oct 18, 2017

same here

christianmtr commented Oct 20, 2017

I just comment in other issue that my connection works fine on Ubuntu Mate 16.04.

Ubuntu 17.10 is now solid for the 8821. No more WICDfor me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment