How to install the Realtek RTL8821CE driver
See also: How to install Wi-Fi driver in Linux if the computer is offline
Usually, when we install a Linux distribution on a laptop, often Wi-Fi support is present in whole or in part for most models. The drivers are integrated into the Linux kernel and as a result, everything “just works” out of the box. But problems start if there is no driver for your Wi-Fi. You need to find it and install it manually.
For example, the owner of HP CM-0078AU notebooks may encounter such a problem.
If you have a Wi-Fi adapter based on the Realtek RTL8821CE chipset, then Linux does not have a driver for it by default. As a result, the OS does not see the device, and there is no Wi-Fi icon at all in the panel next to the clock.
To fix this problem, just install the required driver.
This driver works on Linux kernels > 4.14 (all modern distributions meet this requirement). This driver has been tested on Debian, Ubuntu, Linux Mint, Arch Linux, Gentoo and should work on all derivative distributions.
This driver can be installed using DKMS. This is a system that automatically recompiles and installs kernel modules when a new kernel is installed as a result of an upgrade. To use DKMS, install the dkms package.
To check which integrated Wi-Fi adapter you have, run the command:
lspci | grep Network
If your output contains the line RTL8821CE, then this instruction will help you:
Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter
Offline installation of Realtek RTL8821CE
If the computer on which you want to install the driver does not have an Internet connection, then you can download the installation file from the Ubuntu repositories, transfer it to a USB flash drive to a computer without the Internet, and try to install it manually. This method may not work for the reason that the driver installation requires dependencies (for example, kernel headers) that could be installed if the computer had an Internet connection, but if the computer is offline, then you have to hope that all the necessary files are present by default.
Download the driver installation file:
wget http://archive.ubuntu.com/ubuntu/pool/universe/r/rtl8821ce/rtl8821ce-dkms_5.5.2.1-0ubuntu4_all.deb
If the link to the driver stopped working, then go to the page to find the actual link: https://pkgs.org/search/?q=rtl8821ce-dkms
Transfer the downloaded file to the computer where you want to install it, go to the directory with the driver and start the installation with the following command:
sudo apt install ./rtl8821ce-dkms_5.5.2.1-0ubuntu4_all.deb
How to install Realtek RTL8821CE Driver on Ubuntu 21.04 and Later
The driver has been placed in the standard repository, so you just need to run the command:
sudo apt install rtl8821ce-dkms
How to install Realtek RTL8821CE Driver on Ubuntu 20.04
Starting with Ubuntu 20.04, this driver is available in Additional Drivers (Software & Updates). Open the additional software settings and check the box “Using DKMS source for the Realtek 8821C…” (use DKMS source for the Realtek 8821C) and then reboot. After a reboot, everything will work.
How to install Realtek RTL8821CE driver on Debian, Ubuntu, Kali Linux, Linux Mint and their derivatives
Run the following commands:
sudo apt install bc module-assistant build-essential dkms git clone https://github.com/tomaspinho/rtl8821ce cd rtl8821ce sudo m-a prepare sudo ./dkms-install.sh
Then restart your computer and everything should work.
How to install Realtek RTL8821CE driver on Arch Linux, BlackArch and their derivatives
Install pikaur as shown in the “Automatic installation and update of AUR packages” article, then simply run the command:
pikaur -S rtl8821ce-dkms-git
Reboot your computer.
How to Install Realtek RTL8821CE Driver in Gentoo
Run the commands as root:
layman -a trolltoo emerge --ask net-wireless/rtl8821ce-driver
Removing the driver
Open a terminal and use git clone to clone the repository to your local drive:
git clone https://github.com/tomaspinho/rtl8821ce.git cd rtl8821ce
Then run the uninstall script:
sudo ./dkms-remove.sh
Driver update
Remove the driver:
sudo ./dkms-remove.sh
Make sure you have the latest version of the repository on disk:
git pull
Remove any stale binaries:
make clean
Reinstall:
sudo ./dkms-install.sh
Possible problems
Secure Boot
If your system uses secure boot, disable it in the BIOS settings, otherwise the kernel will not accept custom modules.
PCIe Activate State Power Management
Your distribution may ship with PCIe Activate State Power Management enabled by default. It may conflict with this driver. To disable:
sudo $EDITOR /etc/default/grub
Add pci=noaer to the end of GRUB_CMDLINE_LINUX_DEFAULT. The line should look something like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=noaer"
Then update your GRUB config:
sudo update-grub
Reboot.
Lenovo Yoga Laptops
Some newer Yoga laptops (like the Yoga 530) come with rtl8821ce as a Wi-Fi/Bluetooth chip. But the ideapad-laptop module that may be included with your distribution may conflict with this driver. To turn it off:
sudo modprobe -r ideapad_laptop
BlueTooth not working
This could be because the kernel is loading the wrong firmware file for this card. Take a look at the wahsot manual at https://github.com/tomaspinho/rtl8821ce/issues/19#issuecomment-452196840 to see if it can fix your issue.
See also:
- Linux Wi-Fi Cheat Sheet: Tips and Troubleshooting
- Three ways to set wireless interface to Monitor mode and Managed mode
Related articles:
- How to brute-force passwords using GPU and CPU in Linux (75.2%)
- Wi-Fi adapter Qualcomm Atheros QCA9377 does not capture data packets in monitor mode (SOLVED) (63.1%)
- How to install NVIDIA drivers, CUDA and Bumblebee on Arch Linux / BlackArch (61.9%)
- Linux Wi-Fi Cheat Sheet: Tips and Troubleshooting (60.6%)
- How to increase TX-Power of Wi-Fi adapters in Kali Linux (53.7%)
- Automatic capturing of handshakes with Besside-ng (RANDOM - 12.8%)
Ubuntu 20.10
Additional Drivers (Software & Updates)
Has "No additonal drivers available" and not any "Using DKMS source for the Realtek 8821C…"
checkboxes.
Hello! The driver has been placed in the standard repository, so you just need to run the command:
Thanks, pretty good information.+1
Thnaks
It is easy to install dkms package while you got some internet. Worse is if you have only wifi connection, your rtl8821ce is not available, and you have no rj45 plug. So repeat your arcticle to bring offline users the way how to install this driver. 😉 Also had to do this. 😉
Hello! If you've read the article, why did you miss the first line?
You even do not need to pay for mobile data, you can use a Wi-Fi connection via your phone. It does not require third-party software and can be used out of the box.
Is there any way the 8821CE could support monitor mode?
All replies are welcome, Thanks.
Hello Alex,
I normally do not leave replies on pages like this but felt I needed to. I have searched the web forever to find a page where there is step-by-step easy instructions on how to get my Realtek 8821ac driver to work with Linux Mint (Ubuntu). Your directions were the only ones that worked. Good job and keep it up!
-- Jesse in Minnesota
When I go
lspci |
grep
Network
I only get
08:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b821, no reference to the driver, rtl8821ce. I loaded it with modprobe and it shows with lsmod. Then I restart the network manager, but still no go.The system is MX Linux 21.1, the latest. The MX Linux Network Assistant shows as on the image. This thing has me beat.
Doesn't work downloading and installing DKMS driver on another computer and using USB to transfer to Linux computer……Only works using cell phone tethered to Linux computer and adding driver that way………Both Lint Mint 21 and Ubuntu 20.4 have same problem missing driver for RTL8821CE…..your article very HELPFULL…….my WIFI network now shows……THAN YOU VERY MUCH