Realtek 8821CU Wi-Fi Recovery (Debian 12)
Problem
After a kernel update (6.1.0-48-amd64), Wi-Fi disappeared completely.
Symptoms:
- No
wlx.../wlan0interface inip a - USB adapter still visible in
lsusb modprobe 8821cuproduced:
Exec format error
8821cu: disagrees about version of symbol module_layoutCause:
- Old/outdated 8821cu module compiled for previous kernel
- Multiple old kernel/module remnants (35/47/48)
- DKMS inconsistency after kernel update
Hardware
USB Wi-Fi adapter:
Realtek 0bda:c811
RTL8821CUWorking Solution
1. Download newer driver
Source:
https://github.com/morrownr/8821cu-20210916
Download ZIP:
- Code → Download ZIP
Transfer ZIP to Linux machine.
2. Install required packages
sudo apt update
sudo apt install dkms build-essential linux-headers-$(uname -r)3. Remove broken old DKMS/module state
Check current DKMS:
sudo dkms statusRemove old module:
sudo dkms remove 8821cu/5.12.0.4 --allDelete old installed modules:
sudo find /lib/modules/$(uname -r) -name '*8821cu*' -deleteRebuild module database:
sudo depmod -a
sudo update-initramfs -u4. Install fresh driver
Unpack ZIP:
cd ~/Desktop
unzip 8821cu-20210916-main.zip
cd 8821cu-20210916-mainInstall:
sudo bash dkms-install.shExpected result:
8821cu/5.12.0.4, 6.1.0-48-amd64, x86_64: installedWITHOUT:
WARNING! Diff between built and installed module!5. Load module manually
sudo modprobe 8821cuCheck:
ip aExpected:
wlx...orwlan0
appears.
6. Enable automatic loading at boot
echo 8821cu | sudo tee /etc/modules-load.d/8821cu.confRebuild initramfs:
sudo update-initramfs -uVerify:
cat /etc/modules-load.d/8821cu.confExpected:
8821cu7. Recommended: freeze kernel updates temporarily
Until system stability is confirmed:
sudo apt-mark hold linux-image-amd64 linux-headers-amd64Useful diagnostics
Kernel version:
uname -rUSB adapter detection:
lsusbNetwork interfaces:
ip aKernel messages:
sudo dmesg | tail -50DKMS status:
sudo dkms statusNotes
The message:
Deprecated feature: REMAKE_INITRDis harmless and not related to failure.
The important thing is that DKMS reports the module as installed cleanly.
Recommendation for future hardware
For Linux stability, prefer:
- Intel AX200 / AX210
- MediaTek chipsets
Realtek USB adapters often require manual DKMS maintenance after kernel updates.
