RTL8821CU on Debian 12

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
onknight
Posts: 3
Joined: 2024-06-01 22:56

RTL8821CU on Debian 12

#1 Post by onknight »

Hello everyone,
My name is Thomas and I knew to working with Linux. Debian 12 is my first OS
I'm coming from a Windows environment
And I started with the current version number 12. I'm running a Lenovo ThinkPad e530
But the current Wi-Fi card is out of date. I tried to change it on my own
Since I was able to upgrade pretty much the rest of the laptop with no problems

Image

However the screws and wires are just too tiny and my eyes just aren't good enough to install the Intel 6250 WiMAX card into the laptop
So I returned it to Amazon however after hours of searching I was able to find a RTL8821CU Bluetooth and Wi-Fi dongle https://www.amazon.ca/gp/product/B08BC6 ... UTF8&psc=1
It has Bluetooth along with Wi-Fi 600.

Since I'm a novice in the Debian environment.
I need help installing it well I need to install drivers using command lines or will software & Updates see the card and install it
've only been using the OS for about a week

Thank you for the help in advance

amin11
Posts: 53
Joined: 2023-03-25 09:04
Has thanked: 7 times
Been thanked: 7 times

Re: RTL8821CU on Debian 12

#2 Post by amin11 »

Before buying hardware, check its compatibility with GNU OS.
Do not use Nvidia and RTL products.
I did not find your device name in the supported devices by firmware-realtek.
Give it back if you can.

Or if you have to go the following way:

Code: Select all

https://github.com/brektrou/rtl8821CU

User avatar
sunrat
Administrator
Administrator
Posts: 7162
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 126 times
Been thanked: 616 times

Re: RTL8821CU on Debian 12

#3 Post by sunrat »

The Linux kernel database shows this device is supported by the RTW88_8821CU driver since kernel 6.2 - https://cateee.net/lkddb/web-lkddb/RTW88_8821CU.html . Your solution may be as simple as installing a more recent kernel from Backports as Bookworm only has default kernel 6.1.
You may need the more recent firmware-realtek package from Trixie. Download and install manually - https://packages.debian.org/trixie/all/ ... k/download


Older kernels would need an out-of-tree driver compiled. Instructions below but shouldn't be needed with Backports kernel.
amin11 wrote: 2024-06-02 01:32

Code: Select all

https://github.com/brektrou/rtl8821CU
That driver is reported to work up to kernel 5.x on its Github page. Better to use this one which is reported to work up to kernel 6.9 -
https://github.com/morrownr/8821cu-20210916

Simpler install instructions modified from this guide - https://docs.alfa.com.tw/Support/Linux/RTL8821CU/
STEP 1 : Open Terminal Emulator

STEP 2 : Run commands

sudo apt update
sudo apt install bc git build-essential dkms rfkill

STEP 3 : Download driver source

git clone https://github.com/morrownr/8821cu-20210916.git

STEP 4 : Compile and install

cd 8821cu-20210916
sudo ./install-driver.sh

STEP 5 (Optional): Check driver existence

Run commands below:

find /lib/modules/`uname -r`/ -name "8821cu.ko"

There should be a file in search result if driver was successfully installed.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

onknight
Posts: 3
Joined: 2024-06-01 22:56

Re: RTL8821CU on Debian 12

#4 Post by onknight »

Thank you everyone I'll let you know how things go when it comes tomorrow

I if it doesn't work there's always the Amazon return policy LOL
Last edited by onknight on 2024-06-02 02:59, edited 1 time in total.

User avatar
sunrat
Administrator
Administrator
Posts: 7162
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 126 times
Been thanked: 616 times

Re: RTL8821CU on Debian 12

#5 Post by sunrat »

@onknight I just wrote a new how-to explaining how to install a newer kernel from backports - [HowTo] Install a kernel from Backports
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

onknight
Posts: 3
Joined: 2024-06-01 22:56

Re: RTL8821CU on Debian 12

#6 Post by onknight »

sunrat wrote: 2024-06-02 02:18 The Linux kernel database shows this device is supported by the RTW88_8821CU driver since kernel 6.2 - https://cateee.net/lkddb/web-lkddb/RTW88_8821CU.html . Your solution may be as simple as installing a more recent kernel from Backports as Bookworm only has default kernel 6.1.
You may need the more recent firmware-realtek package from Trixie. Download and install manually - https://packages.debian.org/trixie/all/ ... k/download

Older kernels would need an out-of-tree driver compiled. Instructions below but shouldn't be needed with Backports kernel.
amin11 wrote: 2024-06-02 01:32

Code: Select all

https://github.com/brektrou/rtl8821CU
That driver is reported to work up to kernel 5.x on its Github page. Better to use this one which is reported to work up to kernel 6.9 -
https://github.com/morrownr/8821cu-20210916

Simpler install instructions modified from this guide - https://docs.alfa.com.tw/Support/Linux/RTL8821CU/
STEP 1 : Open Terminal Emulator

STEP 2 : Run commands

sudo apt update
sudo apt install bc git build-essential dkms rfkill

STEP 3 : Download driver source

git clone https://github.com/morrownr/8821cu-20210916.git

STEP 4 : Compile and install

cd 8821cu-20210916
sudo ./install-driver.sh

STEP 5 (Optional): Check driver existence

Run commands below:

find /lib/modules/`uname -r`/ -name "8821cu.ko"

There should be a file in search result if driver was successfully installed.
All right I'll follow this post to the letter thank you again old Linux Guru

User avatar
sunrat
Administrator
Administrator
Posts: 7162
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 126 times
Been thanked: 616 times

Re: RTL8821CU on Debian 12

#7 Post by sunrat »

onknight wrote: 2024-06-02 03:36All right I'll follow this post to the letter thank you again old Linux Guru
Don't follow all of it. Just install the Backports kernel, and firmware from Trixie. The firmware is - http://ftp.ca.debian.org/debian/pool/no ... -2_all.deb
To install it, open a terminal in the directory containing the downloaded file and:

Code: Select all

sudo apt install ./firmware-realtek_20230625-2_all.deb
You can use tab completion to automatically complete the filename for that command. Just type sudo apt install fir then press the Tab key.

The older build instructions I posted should not be needed but I posted them to show the old method of getting drivers for that device. Probably I shouldn't have! :? :wink:
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply