priten
Posts: 16
Joined: Sun May 06, 2018 5:43 am

Compile Realtek Wireless Chipset Drivers

Tue May 08, 2018 12:34 am

I recently installed Solus (I love it btw!) and were struggling to get my WiFi to work. Due to missing drivers, the WiFi would only connect if I were sitting next to the router.

I had faced similar issue on my previous linux installation (Linux Mint), and I tried following the same steps as I did for Mint. It took me longer than expected time to compile the drivers and get it working.

Here's the complete instructions:

1. Check your chipset

Code: Select all

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0bda:b008 Realtek Semiconductor Corp. 
Bus 001 Device 003: ID 1a2c:0042 China Resource Semico Co., Ltd 
Bus 001 Device 002: ID 04f2:b56d Chicony Electronics Co., Ltd 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


2. Check the Realtek chipset version

Code: Select all

$ lspci -knn | grep Net -A2
03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]
	Subsystem: Hewlett-Packard Company RTL8723BE PCIe Wireless Network Adapter [103c:81c1]
	Kernel driver in use: rtl8723be
You can also checkout this guide for the chipset mapping: https://sites.google.com/site/easylinux ... /reserve-7



3. Get the development tools for compilation

Code: Select all

sudo eopkg it -c system.devel
sudo eopkg it linux-current-headers
# OR, depending on your kernel
sudo eopkg it linux-lts-headers
sudo eopkg it libelf-devel git

4. Compile Realtek Wireless Drivers

Code: Select all

git clone https://github.com/lwfinger/rtlwifi_new
cd rtlwifi_new/
make
sudo make install
sudo modprobe -rv rtl8723be
sudo modprobe -v rtl8723be ant_sel=2
sudo ip link set wlo1 up
sudo iw dev wlo1 scan
sudo su
sudo echo "options rtl8723be ant_sel=2" > /etc/modprobe.d/50-rtl8723be.conf
exit


References:
https://sites.google.com/site/easylinux ... /reserve-7
https://github.com/lwfinger/rtlwifi_new
viewtopic.php
https://unix.stackexchange.com/question ... ve#tab-top


I hope this help anyone who is new to Linux and wants to have a smooth experience.

rtyb
Posts: 36
Joined: Thu Apr 26, 2018 7:37 am
Location: Central America

Re: Compile Realtek Wireless Chipset Drivers

Fri May 11, 2018 9:09 am

Thanks Priten, I'm sure this'll come useful.
Win10 64-bit
Solus 3 64-bit

alexvieira
Posts: 1
Joined: Wed Jul 04, 2018 5:21 pm

Re: Compile Realtek Wireless Chipset Drivers

Wed Jul 04, 2018 5:58 pm

Hi. How are you?

Your post helped me a lot. Thank you very much! :D
I got my wireless device working again, although I don't know or don't understand what I did. I don't have technical knowledge about Linux, I just like to use it and I'm loving Solus. :mrgreen:

Since last Solus updates my wireless device stoped working, and my computer started to freeze every time I connected the device. My chipset is a Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter.

Based on your post and https://linuxforums.org.uk/index.php?topic=11261.45 here what I did:

Code: Select all

git clone https://github.com/lwfinger/rtl8188eu
cd rtl8188eu/
make
sudo make install
sudo modprobe -rv 8188eu
sudo modprobe -v 8188eu ant_sel=2
When I used "sudo make install" it gave me a error telling me that "/etc/modprobe.d/50-8188eu.conf" didn't exist, so I created "/etc/modprobe.d/" and "sudo make install" worked fine.

When I used "sudo ip link set wlo1 up" it gave me "Cannot find device "wlo1"", so I just jumped this and the next step. :mrgreen:

After that my computer froze again and I had to reset it. :(

After the reset, I connected my wireless device again and it is working fine, no freezes until now. :D

I don't know if what I did is right, if all these steps were necessary for my device, but it's working until now. Can anyone tell me if I did something wrong or useless? :mrgreen:

Thanks a lot!!!!

priten
Posts: 16
Joined: Sun May 06, 2018 5:43 am

Re: Compile Realtek Wireless Chipset Drivers

Fri Jul 13, 2018 12:27 am

Hi,

Sorry for the late reply. Are you still facing this issue?

Do you see any errors when you run the

Code: Select all

make
command?

alexvieira wrote:
Wed Jul 04, 2018 5:58 pm

Code: Select all

git clone https://github.com/lwfinger/rtl8188eu
cd rtl8188eu/
make
sudo make install
sudo modprobe -rv 8188eu
sudo modprobe -v 8188eu ant_sel=2

virtualmachine
Posts: 17
Joined: Tue Aug 14, 2018 10:23 am

Re: Compile Realtek Wireless Chipset Drivers

Tue Aug 14, 2018 10:28 am

Hi Solus Members,

My Laptop also using RTL8723BE PCIe Wireless Network Adapter,

I got no line ethernet to enable that laptop online and thus unable to download developer tools, codes and perform the compilation as shown, another machine is Windows 10. Do you guys got alternative binary driver download?

virtualmachine
Posts: 17
Joined: Tue Aug 14, 2018 10:23 am

Re: Compile Realtek Wireless Chipset Drivers

Tue Aug 14, 2018 2:13 pm

sudo eopkg it -c system.devel
sudo eopkg it linux-current-headers
I couldn't connect to wireless, and no lan net,
It is possible to download and install these packages offline?

priten
Posts: 16
Joined: Sun May 06, 2018 5:43 am

Re: Compile Realtek Wireless Chipset Drivers

Sat Aug 18, 2018 5:31 pm

virtualmachine wrote:
Tue Aug 14, 2018 2:13 pm
sudo eopkg it -c system.devel
sudo eopkg it linux-current-headers
I couldn't connect to wireless, and no lan net,
It is possible to download and install these packages offline?
I had the same issue. I created a mobile hotspot to resolve it.
The card was not able to connect to the Access Point over long distance but if you sit next to your router then it will be able to detect your WiFi network (or Mobile Hotspot) and connect to it,

icu184
Posts: 2
Joined: Sun Jan 14, 2018 12:25 am

Re: Compile Realtek Wireless Chipset Drivers

Tue Sep 04, 2018 6:27 pm

Good afternoon. I too am having an issue with my Realtek wireless card since the last update. I have the 8812au but I do not see it on the github page mentioned. I used to use https://github.com/scrivy/rtl8812AU_8821AU_linux but now I keep getting errors when trying to make the file. The below is what I get when I try to build the package that I used to use prior to the update to 4.18. Everytime that there is an update I would have to re-make the program for the driver. Is there a way that once I get it working that I could have it make itself automatically so that this doesn't happen again?

$ lsusb shows the below.

Bus 002 Device 002: ID 0bda:a811 Realtek Semiconductor Corp. RTL8811AU 802.11a/b/g/n/ac WLAN Adapter


erik@viking /opt/rtl8812AU_8821AU_linux $ sudo make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.18.5-90.current/build M=/opt/rtl8812AU_8821AU_linux modules
make[1]: Entering directory '/usr/src/linux-headers-4.18.5-90.current'
CC [M] /opt/rtl8812AU_8821AU_linux/os_dep/linux/ioctl_linux.o
In file included from ./include/linux/bitmap.h:9,
from ./include/linux/cpumask.h:12,
from ./arch/x86/include/asm/cpumask.h:5,
from ./arch/x86/include/asm/msr.h:11,
from ./arch/x86/include/asm/processor.h:21,
from ./arch/x86/include/asm/cpufeature.h:5,
from ./arch/x86/include/asm/thread_info.h:53,
from ./include/linux/thread_info.h:38,
from ./arch/x86/include/asm/preempt.h:7,
from ./include/linux/preempt.h:81,
from ./include/linux/spinlock.h:51,
from /opt/rtl8812AU_8821AU_linux/include/osdep_service_linux.h:24,
from /opt/rtl8812AU_8821AU_linux/include/osdep_service.h:41,
from /opt/rtl8812AU_8821AU_linux/include/drv_types.h:32,
from /opt/rtl8812AU_8821AU_linux/os_dep/linux/ioctl_linux.c:22:
In function ‘strncpy’,
inlined from ‘rtw_wx_set_enc_ext’ at /opt/rtl8812AU_8821AU_linux/os_dep/linux/ioctl_linux.c:3692:2:
./include/linux/string.h:246:9: error: ‘__builtin_strncpy’ specified bound 16 equals destination size [-Werror=stringop-truncation]
return __builtin_strncpy(p, q, size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:318: /opt/rtl8812AU_8821AU_linux/os_dep/linux/ioctl_linux.o] Error 1
make[1]: *** [Makefile:1500: _module_/opt/rtl8812AU_8821AU_linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.18.5-90.current'
make: *** [Makefile:1584: modules] Error 2

So as you can tell I really have no idea what I am doing lol. I don't even know why I have to "sudo" prior to making the file. I didn't think that I should have to do that but I do none-the-less.

icu184
Posts: 2
Joined: Sun Jan 14, 2018 12:25 am

Re: Compile Realtek Wireless Chipset Drivers

Wed Sep 05, 2018 3:08 am

I was able to get it running. I found another git https://github.com/gnab/rtl8812au that allowed me to be able to make the drivers for the current headers. Now how do I get the old ones out of there and is there a way that I don't have to rebuild everytime a new kernel comes out? Thanks in advance.

Return to “Tutorials”