Realtek wireless chipset: install the right driver


Back to the home page


In many cases you can install a better driver for Realtek chipsets. Namely for the following common chipsets: RTL8723BE, RTL8723AU, RTL8812AU, RTL8723BU, RTL8188CE, RTL8192CE, RTL8192SE, RTL8192DE, RTL8188EE, RTL8192EE, RTL8723AE, RTL8723BE, RTL8821AE, RTL8821CE, RTL8822BE, RTL8723DE and RTL8192EU.

Determine the chipset

1. First you need to determine the exact chipset you have. Like this:

Launch a terminal window.
(You can launch a terminal window like this: *Click*)

Use copy/paste to transfer the following word into the terminal:

lsusb

Press Enter.

Now you should see one line that approximately resembles the following output (example from my own computer):

Bus 002 Device 007: ID 0bda:818b Realtek Semiconductor Corp.

The combination of characters and numbers that I've made red, is the unique ID of your Realtek chipset. Use Google to find out which chipset it is. The solution differs for every chipset.

Contents of this page:

HP laptops with RTL8723BE or RTL8723DE chipsets: try antenna selection

2. Some HP laptops with Realtek WiFi chipsets have just one antenna on a Realtek card designed for two (stingy HP, anyone?). This has caused many problems for Linux users, as the default antenna is usually the missing one....

But thanks to Larry Finger and the good people at Realtek you can do some testing with a module parameter that allows for antenna selection. As follows:

a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

b. The how-to below, is written for an RTL8723BE chipset. If you have an RTL8723DE chipset, then replace all instances of rtl8723be by rtl8723de.

c. First unload the current active module with this command (use copy/paste to transfer it into the terminal):

sudo modprobe -r rtl8723be

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

d. Then reload it with the instruction to use antenna number 1, with this command:

sudo modprobe rtl8723be ant_sel=1

Press Enter.

e. Then check the signal strength with this command:

iwlist scan | egrep -i 'ssid|quality'

Press Enter.

f. Then test the second antenna, to find out which one has a stronger signal. For this, execute the following three commands:

sudo modprobe -r rtl8723be

sudo modprobe rtl8723be ant_sel=2

iwlist scan | egrep -i 'ssid|quality'

g. If ant_sel=1 gives the best signal, do this (this is one line, use copy/paste to transfer it to the terminal):

echo "options rtl8723be ant_sel=1" | sudo tee -a /etc/modprobe.d/rtl8723be.conf

h. If ant_sel=2 gives the best signal, do this (this is one line, use copy/paste to transfer it to the terminal):

echo "options rtl8723be ant_sel=2" | sudo tee -a /etc/modprobe.d/rtl8723be.conf

Realtek RTL8723BE chipset

3. For a Realtek RTL8723BE chipset you should be able to improve the stability and quality of your wireless connection, by disabling power management for the wireless chipset.

No need to install another driver then; in many cases, a rather simple hack of the settings of the current driver suffices.

a. First launch a terminal window.
(You can launch a terminal window like this: *Click*)

b. Then create a new empty settings file:

Copy/paste the following line into the terminal:

sudo touch /etc/modprobe.d/rtl8723be.conf

Press Enter.

c. Then edit the newly created file:
In the terminal (use copy/paste to avoid typing errors):

xed admin:///etc/modprobe.d/rtl8723be.conf

Press Enter.

Copy/paste the following line into that empty text file, which disables power management for the chipset:

options rtl8723be fwlps=0

d. Reboot your computer.

Your wireless connection should be stable now.

Hasn't this hack improved matters? Then install the rtlwifi_new driver from lwfinger, as described in item 7 on this page.

Realtek RTL8723AU chipset (0bda:b720)

4. Note: unfortunately, the RTL8723AU and the RTL8723BU chipset share the same USB ID.... Which is of course highly annoying. The how-to below is for the RTL8723AU chipset; for the RTL8723BU chipset see item 5 (below).

For the Realtek RTL8723AU chipset, you might have to install another driver. Note that this driver has only been tested to work with the 4.15.x Linux kernel, not with later kernels! For that new driver you can proceed like this:

a. First establish internet connection by other means, for example by ethernet cable.

b. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

c. Copy/paste the following command line into the terminal:

mokutil --sb-state

Press Enter. If it reports that Secure Boot is enabled: reboot and disable Secure Boot in the BIOS.

d. Copy/paste the following command line into the terminal, in order to install the required build packages (the building tools with which you're going to build the driver):

sudo apt-get install git build-essential linux-headers-$(uname -r)

e. Download the driver packages by means of git, with this command (use copy/paste):

git clone https://github.com/lwfinger/rtl8723au.git

f. Now you're going to compile the required kernel module from the driver packages. Copy/paste this line into the terminal, in order to enter the folder with the driver packages:

cd rtl8723au

And then run this command:

make

g. Finally, install the compiled module with this command:

sudo make install

h. Now put the current flawed driver on the blacklist; for that, use copy/paste to transfer the following command line to the terminal:

xed admin:///etc/modprobe.d/blacklist.conf

Now a text file is being opened. In that text file, add the following blue text block, at the end of the existing text (use copy/paste):

# The rtl8xxxu driver is flawed,
# so it needs to be prevented from loading.
# This should give the 8723au or the 8723bu driver
# the chance to load instead.
blacklist rtl8xxxu

Save the modified text file and close it.

i. Reboot your computer.

j. Your wifi should work well now: click on the icon of Network Manager in the system tray, in order to see the available wireless networks.

Note: do NOT install kernel updates or new kernels, because then you'll probably lose the driver again! So I advise to lock the current kernel (item 7).

If you also want Bluetooth, execute the following commands one by one:

git clone https://github.com/lwfinger/rtl8723au_bt.git
cd rtl8723au_bt
make
sudo make install
sudo modprobe -v 8723au_bt

Have the driver packages become unavailable? Then download a compressed file with all the packages from my Google Drive (packages as they were in January 21, 2019). Then unpack it and place the files straight in your user folder, otherwise the terminal commands will fail. Example: John should place the unpacked files in /home/john and not in some subdirectory.

Realtek RTL8812AU chipset (0bda:8812)

5. For the Realtek RTL8812AU chipset, you have to install a driver. You can proceed like this:

a. First establish internet connection by other means, for example by ethernet cable.

b. Unplug the wifi adapter with this chipset, from your computer.

c. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

d. Copy/paste the following command line into the terminal:

mokutil --sb-state

Press Enter. If it reports that Secure Boot is enabled: reboot and disable Secure Boot in the BIOS.

e. Copy/paste the following command line into the terminal, in order to install the required build packages (the building tools with which you're going to build the driver). This is one line:

sudo apt-get install linux-headers-$(uname -r) build-essential git

f. Download the driver packages by means of git, with this command (use copy/paste):

git clone https://github.com/zebulon2/rtl8812AU-driver-5.2.20

g. Now you're going to compile the required kernel module from the driver packages. Copy/paste this line into the terminal, in order to enter the folder with the driver packages:

cd rtl8812AU-driver-5.2.20

And then run this command:

make

h. Now install the compiled module with this command:

sudo make install

i. At this stage you'll need to tweak Network Manager. Copy/paste the following line into the terminal:

xed admin:///etc/NetworkManager/NetworkManager.conf

Press Enter.

In that text file, add the following two lines (use copy/paste):

[device]
wifi.scan-rand-mac-address=no

Save the changes and close the file.

j. Reboot your computer.

k. Plug in your wifi adapter. It should work now.

Note: do NOT install kernel updates or new kernels, because then you'll probably lose the driver again! So I advise to lock the current kernel (item 7).

Are the driver packages no longer available on github.com? Then get the driver packages from here (the driver as it was on January 21, 2019). And unpack the zipped file in your home folder, because it's a compressed folder. Don't unpack it in the subfolder Downloads, because then the terminal commands won't work.

Realtek RTL8723BU chipset (0bda:b720)

6. Note: unfortunately, the RTL8723BU and the RTL8723AU chipset share the same USB ID.... Which is of course highly annoying. The how-to below is for the RTL8723BU chipset; for the RTL8723AU chipset see item 4.

For the Realtek RTL8723BU chipset, you have to install another driver. Note that this driver has only been tested to work with the 4.15.x Linux kernel, not with later kernels! For that new driver, you can proceed like this:

a. First establish internet connection by other means, for example by ethernet cable.

b. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

c. Copy/paste the following command line into the terminal:

mokutil --sb-state

Press Enter. If it reports that Secure Boot is enabled: reboot and disable Secure Boot in the BIOS.

d. Copy/paste the following command line into the terminal, in order to install the required build packages (the building tools with which you're going to build the driver):

sudo apt-get install git build-essential linux-headers-$(uname -r)

e. Download the driver packages by means of git, with this command (use copy/paste):

git clone https://github.com/lwfinger/rtl8723bu

f. Now you're going to disable a line in the makefile of the new driver, because without this hack, two instances of the wireless chipset will show in Network Manager (which would of course be bizarre and useless). The command below is one huge line; make sure you copy/paste it, in order to avoid typing errors:

sed -i 's/EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE/#EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE/g' ~/rtl8723bu/Makefile

Press Enter.

g. Now compile the required kernel module from the driver packages. Copy/paste this line into the terminal, in order to enter the folder with the driver packages:

cd rtl8723bu

And then run this command:

make

h. Finally, install the compiled module with this command:

sudo make install

i. Now put the current flawed driver on the blacklist; for that, use copy/paste to transfer the following command line to the terminal:

xed admin:///etc/modprobe.d/blacklist.conf

Now a text file is being opened. In that text file, add the following blue text block, at the end of the existing text (use copy/paste):

# The rtl8xxxu driver is flawed,
# so it needs to be prevented from loading.
# This should give the 8723au or the 8723bu driver
# the chance to load instead.
blacklist rtl8xxxu

Save the modified text file and close it.

j. Reboot your computer.

k. Your wifi should work well now: click on the icon of Network Manager in the system tray, in order to see the available wireless networks.

Note: do NOT install kernel updates or new kernels, because then you'll probably lose the driver again! So I advise to lock the current kernel (item 7).

Are the driver packages no longer available on github.com? Then get the driver packages from here (driver as it was on January 21, 2019). Then unpack the zipped file in your home folder, because it's a compressed folder. Don't unpack it in the subfolder Downloads, because then the terminal commands won't work.

The rtlwifi_new driver from lwfinger (regular edition)

7. For the following Realtek wifi chipsets you can install the regular edition of the rtlwifi_new driver package from Larry Finger (lwfinger):
RTL8192CE, RTL8188CE, RTL8192SE, RTL8192DE, RTL8188EE, RTL8192EE, RTL8723AE, RTL8723BE and RTL8821AE.

Note: for the RTL8723BE chipset, it's sometimes not necessary to replace the driver, because the current driver can sometimes be fixed as described in item 3 on this page.

a. First establish internet connection by other means, for example by ethernet cable.

b. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

c. Copy/paste the following command line into the terminal:

mokutil --sb-state

Press Enter. If it reports that Secure Boot is enabled: reboot and disable Secure Boot in the BIOS.

d. Copy/paste the following command line into the terminal, in order to download and install the required build packages (the building tools with which you're going to build the driver):

sudo apt-get install git build-essential linux-headers-$(uname -r)

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

e. Download the actual driver (the construction kit) by means of git, with this command (use copy/paste):

git clone https://github.com/lwfinger/rtlwifi_new.git

f. Copy/paste this line into the terminal, in order to enter the folder with the driver packages:

cd rtlwifi_new

Press Enter.

g. Now you're going to compile the required kernel module from the driver package. For that, run this command:

make

h. Finally, install the compiled module with this command:

sudo make install

i. Reboot your computer.

j. Your wifi should work better now: click on the icon of Network Manager in the system tray, in order to see the available wireless networks.

Note: do NOT install kernel updates or new kernels, because then you'll probably lose the driver again! So I advise to lock the current kernel (item 7).

Is the driver no longer available on github.com? Then get the driver from here (the driver as it was on January 21, 2019). Then unpack the zipped file in your home folder, because it's a compressed folder. Don't unpack it in the subfolder Downloads, because then the terminal commands won't work!

The rtlwifi_new driver from lwfinger (extended edition)

8. If you have an RTL8822BE or RTL8723DE Realtek wifi chipset, you need the extended edition of the rtlwifi_new driver package from Larry Finger (lwfinger). Install it like this:

a. First establish internet connection by other means, for example by ethernet cable.

b. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

c. Copy/paste the following command line into the terminal:

mokutil --sb-state

Press Enter. If it reports that Secure Boot is enabled: reboot and disable Secure Boot in the BIOS.

d. Copy/paste the following command line into the terminal, in order to download and install the required build packages (the building tools with which you're going to build the driver):

sudo apt-get install git build-essential linux-headers-$(uname -r)

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

e. Download the actual driver (the construction kit) by means of git, with this command (use copy/paste):

git clone https://github.com/lwfinger/rtlwifi_new.git

f. Copy/paste this line into the terminal, in order to enter the folder with the driver packages:

cd rtlwifi_new

Press Enter.

g. Activate the extended feature of the driver, with this command line (use copy/paste to transfer it to the terminal):

git checkout origin/extended -b extended

Press Enter.

h. Now you're going to compile the required kernel module from the driver package. For that, run this command:

make

i. Finally, install the compiled module with this command:

sudo make install

j. Reboot your computer.

k. Your wifi should work better now: click on the icon of Network Manager in the system tray, in order to see the available wireless networks.

Note: do NOT install kernel updates or new kernels, because then you'll probably lose the driver again! So I advise to lock the current kernel (item 7).

Is the driver no longer available on github.com? Then get the driver from here (the driver as it was on January 21, 2019). Then unpack the zipped file in your home folder, because it's a compressed folder. Don't unpack it in the subfolder Downloads, because then the ensuing terminal commands won't work!

Realtek RTL8192EU chipset (2357:0109)

9. Below you'll find a series of commands that you can apply to improve wifi performance for your RTL8192EU chipset. It's probably only fit for the 4.15.x kernel series, so it might fail on kernels from later series!

For the time being this how-to is without any further explanation. Proceed like this:

a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

b. Copy/paste the following command line into the terminal:

mokutil --sb-state

Press Enter. If it reports that Secure Boot is enabled: reboot and disable Secure Boot in the BIOS.

c. Copy/paste the following 10 command lines into the terminal, one by one. Press Enter after each individual line:

sudo apt-get install git linux-headers-generic build-essential dkms

git clone https://github.com/Mange/rtl8192eu-linux-driver

cd rtl8192eu-linux-driver

sudo dkms add .

(note the dot at the end of the command line!)

sudo dkms install rtl8192eu/1.0

echo "blacklist rtl8xxxu" | sudo tee /etc/modprobe.d/rtl8xxxu.conf

echo -e "8192eu\n\nloop" | sudo tee /etc/modules

sudo update-grub

sudo update-initramfs -u

systemctl reboot -i


d. Finally, check whether the driver module has been loaded:

lsmod | grep 8192eu

Are the driver packages no longer available on github.com? Then get the driver packages from here (driver as it was on January 21, 2019). Then unpack the zipped file in your home folder, because it's a compressed folder. Don't unpack it in the subfolder Downloads, because then the terminal commands in my how-to won't work.

Realtek RTL8821CE chipset

10. Below you'll find a series of commands that you can apply to install a new driver, which should get your RTL8821CE chipset to work.

For the time being this how-to is without any further explanation. Proceed like this:

a. Ensure that you have temporary internet access by other means.

b. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

c. Copy/paste the following command line into the terminal:

mokutil --sb-state

Press Enter. If it reports that Secure Boot is enabled: reboot and disable Secure Boot in the BIOS.

d. Copy/paste the following command lines into the terminal, one by one (press Enter after each one of them):

sudo apt-get install git dkms build-essential

git clone https://github.com/tomaspinho/rtl8821ce.git

cd rtl8821ce

sudo ./dkms-install.sh

e. Reboot your computer.

Are the driver packages no longer available on github.com? Then get the driver packages from here (driver as it was on January 19, 2019). Then unpack the zipped file in your home folder, because it's a compressed folder. Don't unpack it in the subfolder Downloads, because then the terminal commands in my how-to won't work.


Want more tips?

Do you want more tips and tweaks? There's a lot more of them on this website!

For example:

Speed up your Linux Mint!

Clean your Linux Mint safely

Avoid 10 fatal mistakes


To the content of this website applies a Creative Commons license.

Back to the home page

Disclaimer