RTL8821AE PCIe Wireless Network Adapter does not work correctly on LEAP 42.2 and 42.3

Issue description:
RTL8821AE (WLAN+Bluetooth) PCIe card does not work correctly, it means the connection is not stable and the speed is very slow.
I tested it on openSUSE LEAP 42.2 and 42.3

Solution:
I upgraded to the latest Tumbleweed. (I tested it on Tumbleweed-Snapshot20170725) The current kernel version is 4.11.8.
You need to clone the repository from https://github.com/lwfinger/rtlwifi_new to your local computer. You need some developers tools to compile (make, gcc, kernel-source, kernel-devel, etc…)

  1. Compile the source code manually with command “make”
  2. Copy the compiled .ko files to /lib/modules/4.11.8-2-default/kernel/drivers/net/wireless/realtek/rtlwifi/…
  3. Reboot your computer (or unload the old and load the new driver)

For more information please open the following link https://github.com/lwfinger/rtlwifi_new/issues/250

for SUSE Maintainers:
Is it possible to merge the rtlwifi_new reposirory’s master branch (https://github.com/lwfinger/rtlwifi_new) to the latest official openSUSE kernel (4.12.x or higher)?
The last commit is containing some fix for the rtl8821ae pcie wifi card.
For more information: https://github.com/lwfinger/rtlwifi_new/commits/master -> commit a24cb56
Could you backport it to LEAP 42.3’s kernel?

Thanks

**openSUSE Tumbleweed, kernel-4.11.8-2-default, Lenovo IdeaPad 700-15ISK with RTL8821AE

Solution:
I upgraded to the latest Tumbleweed. (I tested it on Tumbleweed-Snapshot20170725) The current kernel version is 4.11.8.

Why not installing the kernel from kernel:stable Repo?

uname -a && lsb-release -id
Linux linux64 4.12.4-1.g2a27bf2-default #1 SMP PREEMPT Fri Jul 28 05:45:21 UTC 2017 (2a27bf2) x86_64 x86_64 x86_64 GNU/Linux
Distributor ID: openSUSE project
Description:    openSUSE Leap 42.2

Or getting the last one as rpm from here:

Its the same as you compiled…

>Why not installing the kernel from kernel:stable Repo?
I would like to wait while openSUSE team will update/publish the latest stable kernel into Tumbleweed. (They usually update very often)

>Or getting the last one as rpm from here:
>https://build.opensuse.org/package/s...es/rtlwifi_new
Firstly from this build some new commits are missing.
The last change happened 10 months ago (last change: Fri Sep 30 15:38:21 UTC 2016 …)

The best place for the compiled .ko files is the latest stable kernel that openSUSE team keeps up-to-date. (the rtlwifi_new repository is part of the kernel)
I think it is a wrong way to make a custom build of it. Yes for Test enviroment is ok, but for production/desktop enviroment is not.

I think it will be merged in the next stable kernel, but until then we can use this solution temporarily.

Firstly from this build some new commits are missing.
The last change happened 10 months ago (last change: Fri Sep 30 15:38:21 UTC 2016 …)

Maybe inform the Packager???

But it is not necessary, AKoellh has done it meanwhile and build it with a Patch for Leap 42.3…

The best place for the compiled .ko files is the latest stable kernel that openSUSE team keeps up-to-date. (the rtlwifi_new repository is part of the kernel)
I think it is a wrong way to make a custom build of it. Yes for Test enviroment is ok, but for production/desktop enviroment is not.

I think it will be merged in the next stable kernel, but until then we can use this solution temporarily.

There are some Kernel Versions published after LwFinger has published it.

I think it is easier to install an rpm then to compile it.

PS:
Please use CodeTags also for Quote

Great news.
Thanks the information.

I am going to use the ‘Code Tags’ next time. (sorry for that)

Could I ask Axel if you could add Tumbleweed as a build target …

Many thanks (and thanks for doing this)

David

Download the src.rpm and build it by your own:
http://download.opensuse.org/repositories/home:/Akoellh:/Kernelmodules/openSUSE_Leap_42.3/src/rtlwifi_new-20170718.a24cb56-2.1.src.rpm

Go into the Directory and build it by your own:

uebung@linux64:~/Downloads> wget http://download.opensuse.org/repositories/home:/Akoellh:/Kernelmodules/openSUSE_Leap_42.3/src/rtlwifi_new-20170718.a24cb56-2.1.src.rpm                                            
--2017-07-30 17:45:01--  http://download.opensuse.org/repositories/home:/Akoellh:/Kernelmodules/openSUSE_Leap_42.3/src/rtlwifi_new-20170718.a24cb56-2.1.src.rpm                                                    
Auflösen des Hostnamen »download.opensuse.org (download.opensuse.org)«... 195.135.221.134, 2001:67c:2178:8::13                                                                                                     
Verbindungsaufbau zu download.opensuse.org (download.opensuse.org)|195.135.221.134|:80... verbunden.                                                                                                               
HTTP-Anforderung gesendet, warte auf Antwort... 302 Found                                                                                                                                                          
Platz: http://downloadcontent.opensuse.org/repositories/home:/Akoellh:/Kernelmodules/openSUSE_Leap_42.3/src/rtlwifi_new-20170718.a24cb56-2.1.src.rpm[folge]                                                        
--2017-07-30 17:45:02--  http://downloadcontent.opensuse.org/repositories/home:/Akoellh:/Kernelmodules/openSUSE_Leap_42.3/src/rtlwifi_new-20170718.a24cb56-2.1.src.rpm                                             
Auflösen des Hostnamen »downloadcontent.opensuse.org (downloadcontent.opensuse.org)«... 195.135.221.157                                                                                                            
Verbindungsaufbau zu downloadcontent.opensuse.org (downloadcontent.opensuse.org)|195.135.221.157|:80... verbunden.                                                                                                 
HTTP-Anforderung gesendet, warte auf Antwort... 200 OK                                                                                                                                                             
Länge: 673963 (658K) [application/x-redhat-package-manager]                                                                                                                                                        
In »»rtlwifi_new-20170718.a24cb56-2.1.src.rpm«« speichern.                                                                                                                                                         
                                                                                                                                                                                                                   
100%=========================================================================================================================================================================>] 673.963      687KB/s   in 1,0s    
                                                                                                                                                                                                                   
2017-07-30 17:45:03 (687 KB/s) - »»rtlwifi_new-20170718.a24cb56-2.1.src.rpm«« gespeichert [673963/673963] 

Build it:

uebung@linux64:~/Downloads> rpmbuild --rebuild rtlwifi_new-20170718.a24cb56-2.1.src.rpm 
Installing rtlwifi_new-20170718.a24cb56-2.1.src.rpm                                                                                                                                                                
warning: rtlwifi_new-20170718.a24cb56-2.1.src.rpm: Header V3 RSA/SHA256 Signature, key ID 639ea1f1: NOKEY                                                                                                          
arch/x86/Makefile:136: CONFIG_X86_X32 enabled but no binutils support                                                                                                                                              
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.wgzMiU                                                                                                                                                               
+ umask 022                                                                                                                                                                                                        
+ cd /home/uebung/rpmbuild/BUILD                                                                                                                                                                                   
+ cd /home/uebung/rpmbuild/BUILD                                                                                                                                                                                   
+ rm -rf rtlwifi_new
+ /usr/bin/xz -dc /home/uebung/rpmbuild/SOURCES/rtlwifi_new.tar.xz
+ /bin/tar -xf -
+ STATUS=0
+ '' 0 -ne 0 ']'
+ cd rtlwifi_new
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ cd /home/uebung/rpmbuild/BUILD
+ rm -rf rtlwifi_new
+ /usr/bin/xz -dc /home/uebung/rpmbuild/SOURCES/rtlwifi_new.tar.xz
+ /bin/tar -xf -
+ STATUS=0
+ '' 0 -ne 0 ']'
+ cd rtlwifi_new
.
.
.
.
Wrote: /home/uebung/rpmbuild/RPMS/x86_64/rtlwifi_new-kmp-default-20170718.a24cb56_k4.12.4_1.g2a27bf2-2.1.x86_64.rpm
Wrote: /home/uebung/rpmbuild/RPMS/x86_64/rtlwifi_new-debugsource-20170718.a24cb56-2.1.x86_64.rpm
Wrote: /home/uebung/rpmbuild/RPMS/x86_64/rtlwifi_new-kmp-default-debuginfo-20170718.a24cb56_k4.12.4_1.g2a27bf2-2.1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.pVHQFL
+ umask 022
+ cd /home/uebung/rpmbuild/BUILD
+ cd rtlwifi_new
+ /usr/bin/rm -rf /home/uebung/rpmbuild/BUILDROOT/rtlwifi_new-20170718.a24cb56-2.1.x86_64
+ rm -rf filelists
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.GrUF5Q
+ umask 022
+ cd /home/uebung/rpmbuild/BUILD
+ rm -rf rtlwifi_new
+ rm -rf filelists
uebung@linux64:~/Downloads>

The rpm is then in ~/rpmbuild/RPMS/x86_64