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*)

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

b. First unload the currently 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.

c. Then reload it with the instruction to use antenna number 2, with this command:

sudo modprobe rtl8723be ant_sel=2

Press Enter.

d. Then check the signal strength with this command:

iwlist scan | egrep -i 'ssid|quality'

Press Enter.

e. Then test the the other antenna (number 1), 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=1

iwlist scan | egrep -i 'ssid|quality'

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

If ant_sel=1 gives the best signal (unusual, but not impossible), 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

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*)

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*)

Press Enter. If it reports that Secure Boot is enabled: reboot and disable Secure Boot in the BIOS. In order to do this, you might need to set an administrator password in the BIOS first. Disabling Secure Boot is no loss: it adds no meaningful security anyway. It's primarily a means for Microsoft to enforce its vendor lock-in on your computer...

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. Now you're going to remove the folder with the driver packages, which has become useless (and can't be used for other kernels, as it has been tailored to your current kernel by "make"). With this command:

rm -v -R --interactive=never rtl8*

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).

Or if you want to install newer kernels anyway, from time to time: download the folder with the driver build packages again with git, create a compressed (.tar.gz) file from it, rename the compressed file to wifi-driver and keep it in reserve.

You can then use it in the now familiar way (first unzip it, of course) to build and install the driver again when you've lost your WiFi after booting with a newly installed kernel.

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

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*)

Press Enter. If it reports that Secure Boot is enabled: reboot and disable Secure Boot in the BIOS. In order to do this, you might need to set an administrator password in the BIOS first. Disabling Secure Boot is no loss: it adds no meaningful security anyway. It's primarily a means for Microsoft to enforce its vendor lock-in on your computer...

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. Now you're going to remove the folder with the driver packages, which has become useless (and can't be used for other kernels, as it has been tailored to your current kernel by "make"). With this command:

rm -v -R --interactive=never rtl8*

k. Reboot your computer.

l. 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).

Or if you want to install newer kernels anyway, from time to time: download the folder with the driver build packages again with git, create a compressed (.tar.gz) file from it, rename the compressed file to wifi-driver and keep it in reserve.

You can then use it in the now familiar way (first unzip it, of course) to build and install the driver again when you've lost your WiFi after booting with a newly installed kernel.

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*)

Press Enter. If it reports that Secure Boot is enabled: reboot and disable Secure Boot in the BIOS. In order to do this, you might need to set an administrator password in the BIOS first. Disabling Secure Boot is no loss: it adds no meaningful security anyway. It's primarily a means for Microsoft to enforce its vendor lock-in on your computer...

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:

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. Now you're going to remove the folder with the driver packages, which has become useless (and can't be used for other kernels, as it has been tailored to your current kernel by "make"). With this command:

rm -v -R --interactive=never rtl8*

k. Reboot your computer.

l. 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).

Or if you want to install newer kernels anyway, from time to time: download the folder with the driver build packages again with git, create a compressed (.tar.gz) file from it, rename the compressed file to wifi-driver and keep it in reserve.

You can then use it in the now familiar way (first unzip it, of course) to build and install the driver again when you've lost your WiFi after booting with a newly installed kernel.

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*)

Press Enter. If it reports that Secure Boot is enabled: reboot and disable Secure Boot in the BIOS. In order to do this, you might need to set an administrator password in the BIOS first. Disabling Secure Boot is no loss: it adds no meaningful security anyway. It's primarily a means for Microsoft to enforce its vendor lock-in on your computer...

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. Now you're going to remove the folder with the driver packages, which has become useless (and can't be used for other kernels, as it has been tailored to your current kernel by "make"). With this command:

rm -v -R --interactive=never rtlwif*

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).

Or if you want to install newer kernels anyway, from time to time: download the folder with the driver build packages again with git, create a compressed (.tar.gz) file from it, rename the compressed file to wifi-driver and keep it in reserve.

You can then use it in the now familiar way (first unzip it, of course) to build and install the driver again when you've lost your WiFi after booting with a newly installed kernel.

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*)

Press Enter. If it reports that Secure Boot is enabled: reboot and disable Secure Boot in the BIOS. In order to do this, you might need to set an administrator password in the BIOS first. Disabling Secure Boot is no loss: it adds no meaningful security anyway. It's primarily a means for Microsoft to enforce its vendor lock-in on your computer...

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. Now you're going to remove the folder with the driver packages, which has become useless (and can't be used for other kernels, as it has been tailored to your current kernel by "make"). With this command:

rm -v -R --interactive=never rtlwif*

k. Reboot your computer.

l. 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).

Or if you want to install newer kernels anyway, from time to time: download the folder with the driver build packages again with git, create a compressed (.tar.gz) file from it, rename the compressed file to wifi-driver and keep it in reserve.

You can then use it in the now familiar way (first unzip it, of course) to build and install the driver again when you've lost your WiFi after booting with a newly installed kernel.

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.

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*)

Press Enter. If it reports that Secure Boot is enabled: reboot and disable Secure Boot in the BIOS. In order to do this, you might need to set an administrator password in the BIOS first. Disabling Secure Boot is no loss: it adds no meaningful security anyway. It's primarily a means for Microsoft to enforce its vendor lock-in on your computer...

c. Copy/paste the following 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/clnhub/rtl8192eu-linux.git

cd rtl8192eu-linux

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

d. Reboot your computer.

e. 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 July 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*)

Press Enter. If it reports that Secure Boot is enabled: reboot and disable Secure Boot in the BIOS. In order to do this, you might need to set an administrator password in the BIOS first. Disabling Secure Boot is no loss: it adds no meaningful security anyway. It's primarily a means for Microsoft to enforce its vendor lock-in on your computer...

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.