Running sudo dkms remove rtl8821ce/1.0.5.r124.g7a11dc9 --all gave this output:
code
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/rtl8821ce/1.0.5.r124.g7a11dc9/source/dkms.conf does not exist.
Error! rtl8821ce/1.0.5.r124.g7a11dc9 is broken!
Missing the source directory or the symbolic link pointing to it.
Manual intervention is required!
How to fix?
Assistant
The error message you encountered indicates that the DKMS (Dynamic Kernel Module Support) system cannot locate the necessary dkms.conf file for the rtl8821ce module. This situation typically arises when the source files for the DKMS module have been removed or corrupted, leaving DKMS unable to manage the module properly.
To resolve this issue, you can follow one of two approaches:
Manual Removal of the Broken DKMS Module
Reinstalling the DKMS Module and Then Removing It Properly
Below are the detailed steps for both approaches:
1. Manual Removal of the Broken DKMS Module
Since DKMS cannot manage the module due to missing files, you can manually remove the module's files from the system. Here's how:
a. Identify the Module Path
Based on the error message, the module is located at:
code
/var/lib/dkms/rtl8821ce/1.0.5.r124.g7a11dc9/
b. Remove the Module Directory
Execute the following command to remove the module directory:
The rtl8821ce module should no longer appear in the list.
2. Reinstalling the DKMS Module and Then Removing It Properly
If you prefer a cleaner approach and might need the module in the future, you can reinstall the module's source, allowing DKMS to recognize it properly, and then remove it using DKMS commands.
a. Install Necessary Dependencies
Ensure you have the necessary packages to build DKMS modules:
Backup Important Data: Before making changes to system files, it's always a good idea to backup important data or create a system restore point.
Check for Other Versions: If you have multiple versions of the rtl8821ce module installed, ensure you're removing the correct one.
Reboot if Necessary: After removing kernel modules, especially those related to hardware drivers, it's advisable to reboot your system to ensure changes take effect properly.
By following either of the above approaches, you should be able to resolve the DKMS error and cleanly remove the broken rtl8821ce module from your system.
If you encounter further issues or need assistance reinstalling the driver, feel free to ask!