So, it happened again. Updating my Lenovo IdeaPad S540-14API to Ubuntu 21.10 broke the WiFi once more, and drivers are not working. Looks like having them for the Realtek RTL8821CE isn’t something to expect from the official repositories.
Luckily there’s an open-source solution from this GitHub repo that worked on Ubuntu 21.04 and now continues to do the trick for Ubuntu 21.10.
Check the adapter
First, it’s important to check if you have the right adapter. Running
sudo lshw -C network should give something like this as result:
*-network UNCLAIMED description: Network controller product: RTL8821CE 802.11ac PCIe Wireless Network Adapter vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:02:00.0 version: 00 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress cap_list configuration: latency=0 resources: ioport:2000(size=256) memory:c0700000-c070ffff
Some people point out that secure boot must be disabled for the driver to work. This wasn’t an issue for me (maybe it was disabled already for some time ?) but it doesn’t hurt checking before (shortcut for Lenovo BIOS is
Fn + F2 during boot).
Make sure you have
dkms installed, and run:
git clone https://github.com/tomaspinho/rtl8821ce cd rtl8821ce chmod +x dkms-install.sh chmod +x dkms-remove.sh sudo ./dkms-install.sh
It might be worth reboot and test, but for me this wasn’t enough. By the end of the repo’s Readme they make it clear that there’s an extra issue with the Linux kernel >= 5.9.
In case you’re curious, you can check your current kernel version running
The issue is that we need to force ignore the broken module that comes with ubuntu. For this run the following:
sudo gedit /etc/modprobe.d/blacklist.conf
And add this to the end of the file:
# WiFi fix. Instructions from: # https://delestro.com/2022/01/10/lenovo-wifi-with-ubuntu/ blacklist rtw88_8821ce
Save the file, turn off the computer, wait a few seconds and boot again. For me this was everything needed, worked like a charm.
sudo lshw -C again:
*-network description: Wireless interface product: RTL8821CE 802.11ac PCIe Wireless Network Adapter vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:02:00.0 logical name: wlp2s0 version: 00
It’s a known issue that you may experience some bluetooth problems with this driver.
On my case, what happens is that it isn’t possible to scan for new Bluetooth devices after the system sleeps and unfortunately there’s no current fix for this. But simply reestarting the computer solves the issue and the Bluetooth gets back to normal.