How to Install Realtek Wifi Drivers in Ubuntu 22.04 | Linux Mint 21/20

Missing Wi-Fi drivers for your Ubuntu or Linux Mint PC? If you happen to have Realtek Wi-Fi adapter, this tutorial may help to install the driver.

Linux Kernel keeps updating with new device drivers. But, there are still some devices lack out-of-box support. Thanks to the open-source community, there are always a group of people maintaining missing drivers.

How to Tell Which Wi-Fi Chipset you have?

Firstly, you may want to find out the device name of your wireless network card. In Ubuntu or Linux Mint, you may just search for and open “hardinfo” (aka, System Profiler and Benchmark) either from start menu or ‘Activities’ overview.

Install "hardinfo" via Ubuntu Software or Synaptic Package Manager if you don't have it.
Open Hardinfo

When it opens, navigate to “Devices -> PCI Devices“. Then, find out the network controller information in the right. For USB Wi-Fi adapter, go find it under “Devices -> USB Devices“.

For those familiar Linux command, use lspci command to find integrated network card or lsusb for USB adapter:

Install Realtek Wi-Fi Driver from PPA:

There’s a github repository that maintains RTL8822BE, RTL8822CE, RTL8821CE, RTL8723DE, RTL8723AU, RTL8723BU, RTL8188EU driver source codes. Advanced users may go to that page, grab the source and build by yourself.

To make life easier, the kablosuz-wireless PPA maintains the driver packages for:

  • rtl8723bu, rtl8822bu, rtl8188eu, rtl8188eus, rtl8188fu, rtl8188gu, rtl8192cu, rtl8192du, rtl8192ee, rtl8192eu, rtl8192fu, rtl8723au, rtl8723bu, rtl8723de, rtl8723ds, rtl8723du, rtl8812au, rtl88XXau, rtl8814au, rtl8821ce, rtl8821cu, rtl8822bu, rtl8822ce, rtl8852au, rtw88, and rtw89.

The guy also maintains another PPA with packages for:

  • r8101, r8125, RTL8152/RTL8153/RTL8156, r8168, rts5139, and rts5229 network drivers.

Step 1: Disable Secure Boot

The drivers are built in DKMS mode that will work (rebuild automatically) even after update to new Kernel series. If you have your system installed in UEFI mode, you have to disable secure boot first.

1. To verify if your system is installed in UEFI mode, open terminal (Ctrl+Alt+T) and run command:

[ -d /sys/firmware/efi ] && echo "EFI" || echo "BIOS"

2. To check the status of secure boot:

mokutil --sb-state

If secure boot is enabled, reboot into BIOS/UEFI settings and disable it!

Step 2: Add the Ubuntu PPA

First, open terminal by pressing Ctrl+Alt+T key combination on keyboard. When it opens, run the command below to add the PPA:

sudo add-apt-repository ppa:kelebek333/kablosuz

For r8101, r8125, RTL8152/RTL8153/RTL8156, r8168, rts5139, and rts5229 network drivers, add another PPA:

sudo add-apt-repository ppa:kelebek333/drivers

Step 3: Update the cache

Ubuntu 22.04 now automatically updates the cache while adding PPA. But, Linux Mint does not. So you have to manually run the command below to refresh cache:

sudo apt update

Step 4: Select install driver package for your chipset

Open “Synaptic Package Manager“, navigate to “Origin” tab in the left. Finally click on “LP-PPA-kelebek333-drivers” or “LP-PPA-kelebek333-kablosuz” to list all the packages from that repository. Finally, right-click on desired driver package, mark for installation, and click Apply.

Install Synaptic Package Manager from Ubuntu Software if you don't have it.

Or, you can install the package via apt command (for example, install r8822bu driver):

sudo apt install r8822bu-dkms
Keep an eye on output info while installing the package. It tells where to install the Kernel modules.

Step 5: Load the driver (Kernel Module)

After installing the driver package, restart your computer. Then, you may find out the modules via:

ls /usr/lib/modules/$(uname -r)/updates/dkms
The command should outputs the previously installed Kernel modules in .ko files.

You can finally, load the driver (8723ds for example) via command:

sudo modprobe 8723ds

And, verify via lsmod command with ‘grep’ filter:

lsmod |grep '8723ds'

If you have loaded the correct network driver, Wi-Fi should work now!

How to Uninstall:

To unload the driver module, use modprobe command with -r flag. For example, unload ‘8723ds’ via command:

sudo modprobe -r 8723ds

And, to remove the driver package, either use “Synaptic Package Manager” or run apt remove command:

sudo apt remove package_name

To remove the Ubuntu PPAs, use command:

sudo add-apt-repository --remove ppa:kelebek333/kablosuz
sudo add-apt-repository --remove ppa:kelebek333/drivers

That’s all. Enjoy!

Hi, I'm Ji, the creator of Ubuntuhandbook.org. Now, I'm also writing partly in this web site.