How to install Wi-Fi adapter RTL8821CE in latest kernel

My notebook is HP 14-0023TU, it has RTL8821CE.
I have installed driver as follows:
2242577743323245ddd48939ffb2f1fc63670785.png
This year the internet signal and ability to find routers are really poor and unstable.
Can you please teach me to uninstall and install from kernel ?
The current kernel on my notebook is 5.13.14.

[fedora002@localhost ~]$ grep RTW88 /boot/config*
/boot/config-5.13.12-200.fc34.x86_64:CONFIG_RTW88=m
/boot/config-5.13.12-200.fc34.x86_64:CONFIG_RTW88_CORE=m
/boot/config-5.13.12-200.fc34.x86_64:CONFIG_RTW88_PCI=m
/boot/config-5.13.12-200.fc34.x86_64:CONFIG_RTW88_8822B=m
/boot/config-5.13.12-200.fc34.x86_64:CONFIG_RTW88_8822C=m
/boot/config-5.13.12-200.fc34.x86_64:CONFIG_RTW88_8723D=m
/boot/config-5.13.12-200.fc34.x86_64:CONFIG_RTW88_8821C=m
/boot/config-5.13.12-200.fc34.x86_64:CONFIG_RTW88_8822BE=m
/boot/config-5.13.12-200.fc34.x86_64:CONFIG_RTW88_8822CE=m
/boot/config-5.13.12-200.fc34.x86_64:CONFIG_RTW88_8723DE=m
/boot/config-5.13.12-200.fc34.x86_64:CONFIG_RTW88_8821CE=m
/boot/config-5.13.12-200.fc34.x86_64:# CONFIG_RTW88_DEBUG is not set
/boot/config-5.13.12-200.fc34.x86_64:# CONFIG_RTW88_DEBUGFS is not set
/boot/config-5.13.13-200.fc34.x86_64:CONFIG_RTW88=m
/boot/config-5.13.13-200.fc34.x86_64:CONFIG_RTW88_CORE=m
/boot/config-5.13.13-200.fc34.x86_64:CONFIG_RTW88_PCI=m
/boot/config-5.13.13-200.fc34.x86_64:CONFIG_RTW88_8822B=m
/boot/config-5.13.13-200.fc34.x86_64:CONFIG_RTW88_8822C=m
/boot/config-5.13.13-200.fc34.x86_64:CONFIG_RTW88_8723D=m
/boot/config-5.13.13-200.fc34.x86_64:CONFIG_RTW88_8821C=m
/boot/config-5.13.13-200.fc34.x86_64:CONFIG_RTW88_8822BE=m
/boot/config-5.13.13-200.fc34.x86_64:CONFIG_RTW88_8822CE=m
/boot/config-5.13.13-200.fc34.x86_64:CONFIG_RTW88_8723DE=m
/boot/config-5.13.13-200.fc34.x86_64:CONFIG_RTW88_8821CE=m
/boot/config-5.13.13-200.fc34.x86_64:# CONFIG_RTW88_DEBUG is not set
/boot/config-5.13.13-200.fc34.x86_64:# CONFIG_RTW88_DEBUGFS is not set
/boot/config-5.13.14-200.fc34.x86_64:CONFIG_RTW88=m
/boot/config-5.13.14-200.fc34.x86_64:CONFIG_RTW88_CORE=m
/boot/config-5.13.14-200.fc34.x86_64:CONFIG_RTW88_PCI=m
/boot/config-5.13.14-200.fc34.x86_64:CONFIG_RTW88_8822B=m
/boot/config-5.13.14-200.fc34.x86_64:CONFIG_RTW88_8822C=m
/boot/config-5.13.14-200.fc34.x86_64:CONFIG_RTW88_8723D=m
/boot/config-5.13.14-200.fc34.x86_64:CONFIG_RTW88_8821C=m
/boot/config-5.13.14-200.fc34.x86_64:CONFIG_RTW88_8822BE=m
/boot/config-5.13.14-200.fc34.x86_64:CONFIG_RTW88_8822CE=m
/boot/config-5.13.14-200.fc34.x86_64:CONFIG_RTW88_8723DE=m
/boot/config-5.13.14-200.fc34.x86_64:CONFIG_RTW88_8821CE=m
/boot/config-5.13.14-200.fc34.x86_64:# CONFIG_RTW88_DEBUG is not set
/boot/config-5.13.14-200.fc34.x86_64:# CONFIG_RTW88_DEBUGFS is not set
[fedora002@localhost ~]$

I think to uninstall would be something like the following:

$ sudo dkms remove -m rtl8821ce -v ??? -k 5.13.12-200.fc34.x86_64

I don’t know what the version number is for the module you currently have installed. So I just put question marks (?) in that field. You should be able to run dkms status to see a list of what is currently installed (including the version numbers for the module and kernel).

To load the kernel-provided driver should just be a matter of running modprobe rtw88_8821ce. Use lsmod to see a list of what drivers are currently loaded. Any errors should be logged in the output of dmesg.

Edit: There should be a script to permanently remove the dkms module from your installation. The dkms module is probably installed under /usr/src/rtw88_8821ce-??? and I think you could just delete that directory if necessary (after you have removed the module from the kernel).

1 Like
[fedora002@localhost ~]$ dkms status
rtl8821ce, v5.2.5_1.26055.20180108.1: added
rtl8821ce, v5.5.2_34066.20200325: added
[fedora002@localhost ~]$

Are the following commands correct ?
$ sudo dkms remove -m rtl8821ce -v5.2.5_1.26055.20180108.1 -k 5.13.12-200.fc34.x86_64
$ sudo dkms remove -m rtl8821ce -v5.5.2_34066.20200325 -k 5.13.12-200.fc34.x86_64

Thank you in advance :slightly_smiling_face:

Did you try, Removal of driver

Already

1 Like

The dkms-remove.sh is probably the best method. It appears that the driver version is hard-coded in that script though. So you would need to be sure to run it from the exact same installation directory that you used to install the original driver.

I notice that the current driver version is v5.5.2_34066.20200325 but you reported earlier that you are running versions v5.2.5_1.26055.20180108.1 and v5.5.2_34066.20200325. Consequently, you would need to clone those versions of the repository if you do not still have them on your PC in order for the dkms-remove.sh script to work.

If you look at the script though, all it does is run dkms remove ... followed by rm -rf /usr/src/rtl8821ce-???. So you could do that manually as I suggested in my original post.

Not quite. You’ve merged a couple of v’s that should not be merged. Change -v5.2.5_1.26055.20180108.1 to -v v5.2.5_1.26055.20180108.1 and I think it should work.

1 Like