[SOLVED] (RTL8821CU-CG) Wireless adapter installed, detected but not working

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
FamCompKid
Level 3
Level 3
Posts: 107
Joined: Thu Apr 25, 2019 1:18 am

[SOLVED] (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by FamCompKid »

Hi,

My wireless adapter arrived today and I'm stuck. (Last week I made a separate "I have no idea" post about this but I thought this needed another post; sorry if a new post shouldn't be the case.)

Wireless adapter is on RTL8821CU-CG, dual-band, and has bluetooth. (Here's its product page and its driver page if it helps.)

I followed this advice:

Code: Select all

sudo apt update
sudo apt install build-essential git dkms
git clone https://github.com/brektrou/rtl8821CU.git
cd rtl8821CU
chmod +x dkms-install.sh
sudo ./dkms-install.sh
sudo modprobe 8821cu
It was all good except that the wireless adapter didn't turn on (it has a green light indicator), so I rebooted.

After reboot, bluetooth turned on and I tried it and it worked, detected a phone.

But I can't see any signs of it being able to connect to WiFi.

I went to https://github.com/brektrou/rtl8821CU to consult.

lsusb returns (I removed irrelevant text):

Code: Select all

Bus 003 Device 016: ID 0bda:c820 Realtek Semiconductor Corp. 
Author says (removed irrelevant text):
switch the mode by type: (the device ID must be yours.)

Need install usb_modeswitch

sudo usb_modeswitch -KW -v 0bda -p 1a2b

It should work.
Based on my lsusb, I did this:

sudo usb_modeswitch -KW -v 0bda -p c820

But it returns this:

Code: Select all

Take all parameters from the command line

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.5.2 (C) Josua Dietze 2017
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x0bda
DefaultProduct= 0xc820

StandardEject=1

Look for default devices ...
  found USB ID 8087:8000
  found USB ID 1d6b:0002
  found USB ID 8087:8008
  found USB ID 1d6b:0002
  found USB ID 1d6b:0003
  found USB ID 1c4f:0026
  found USB ID 093a:2510
  found USB ID 0bda:c820
   vendor ID matched
   product ID matched
  found USB ID 04e8:6863
  found USB ID 1d6b:0002
 Found devices in default mode (1)
Access device 016 on bus 003
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
 with class 224
Error: can't use storage command in MessageContent with interface 0; interface class is 224, expected 8. Abort
I think I understand what it says but of course I have no idea what to do :)

Many thanks in advance!
Last edited by FamCompKid on Sun Nov 01, 2020 1:18 pm, edited 1 time in total.
Two PC's on Linux Mint 20.1 Cinnamon. Thank you.
sleeper12
Level 14
Level 14
Posts: 5177
Joined: Thu May 25, 2017 3:22 pm

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by sleeper12 »

Try this, one line at a time:

Code: Select all

sudo apt install build-essential -y
mkdir -p ~/build
cd ~/build
sudo apt install git
git clone https://github.com/brektrou/rtl8821CU.git
cd rtl8821CU
make
sudo make install 
Reboot
FamCompKid
Level 3
Level 3
Posts: 107
Joined: Thu Apr 25, 2019 1:18 am

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by FamCompKid »

Thank you, but I believe nothing happened, except that Bluetooth auto-started (an icon on the panel) but was disabled.

Just noting:

Code: Select all

~/build$ git clone https://github.com/brektrou/rtl8821CU.git
fatal: destination path 'rtl8821CU' already exists and is not an empty directory.
... but all the other commands went ok, I think. Just had to skip that one above.

Just also want to share this comment on Github from someone who ordered twice the same model of adapter that I have.

Have to go to bed now. TIA again. Will see this first thing tomorrow.
Two PC's on Linux Mint 20.1 Cinnamon. Thank you.
sleeper12
Level 14
Level 14
Posts: 5177
Joined: Thu May 25, 2017 3:22 pm

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by sleeper12 »

Could Bluetooth be blocking wifi? See #1.4.3 here:
https://easylinuxtipsproject.blogspot.c ... ml#ID1.4.3
FamCompKid
Level 3
Level 3
Posts: 107
Joined: Thu Apr 25, 2019 1:18 am

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by FamCompKid »

Hi and thanks again. After reboot, bluetooth remains disabled. This means I don't need to disable it in BIOS anymore, correct?
Two PC's on Linux Mint 20.1 Cinnamon. Thank you.
FamCompKid
Level 3
Level 3
Posts: 107
Joined: Thu Apr 25, 2019 1:18 am

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by FamCompKid »

FamCompKid wrote:
Sat Oct 31, 2020 5:27 am
I followed this advice:

Code: Select all

sudo apt update
sudo apt install build-essential git dkms
git clone https://github.com/brektrou/rtl8821CU.git
cd rtl8821CU
chmod +x dkms-install.sh
sudo ./dkms-install.sh
sudo modprobe 8821cu
Also, question: Why is it preferred to install from ones like the above? Is it because they're regularly updated? Can we not use the driver that comes with this particular adapter?
Two PC's on Linux Mint 20.1 Cinnamon. Thank you.
FamCompKid
Level 3
Level 3
Posts: 107
Joined: Thu Apr 25, 2019 1:18 am

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by FamCompKid »

I'm manually copying this from the desktop (I'm on laptop), hope it helps.

dkms status returns:

Code: Select all

rtl8821CU, 5.4.1, 5.4.0-52-generic, x86_64: installed (WARNING! Diff between built and installed module!) 
Two PC's on Linux Mint 20.1 Cinnamon. Thank you.
sleeper12
Level 14
Level 14
Posts: 5177
Joined: Thu May 25, 2017 3:22 pm

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by sleeper12 »

Is wifi working now or still not?
FamCompKid
Level 3
Level 3
Posts: 107
Joined: Thu Apr 25, 2019 1:18 am

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by FamCompKid »

It's still not working, thank you.
Two PC's on Linux Mint 20.1 Cinnamon. Thank you.
sleeper12
Level 14
Level 14
Posts: 5177
Joined: Thu May 25, 2017 3:22 pm

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by sleeper12 »

Let's see:

Code: Select all

 inxi -Fxxxz && rfkill list && mokutil --sb-state 
FamCompKid
Level 3
Level 3
Posts: 107
Joined: Thu Apr 25, 2019 1:18 am

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by FamCompKid »

EDIT: Updated with mokutil installed

Code: Select all

~$ inxi -Fxxxz && rfkill list && mokutil --sb-state
System:    Host: *** Kernel: 5.4.0-52-generic x86_64 bits: 64 compiler: gcc v: 7.5.0 Desktop: Cinnamon 4.4.8 
           wm: muffin 4.4.4 dm: LightDM 1.26.0 Distro: Linux Mint 19.3 Tricia base: Ubuntu 18.04 bionic 
Machine:   Type: Desktop Mobo: MSI model: H81M-P33 (MS-7817) v: 1.0 serial: <filter> BIOS: American Megatrends v: 1.6 
           date: 07/01/2014 
CPU:       Topology: Quad Core model: Intel Core i5-4590 bits: 64 type: MCP arch: Haswell rev: 3 L2 cache: 6144 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 26401 
           Speed: 800 MHz min/max: 800/3700 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 
Graphics:  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics vendor: Micro-Star MSI 
           driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:0412 
           Display: x11 server: X.Org 1.19.6 driver: modesetting unloaded: fbdev,vesa resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4600 (HSW GT2) v: 4.5 Mesa 20.0.8 compat-v: 3.0 
           direct render: Yes 
Audio:     Device-1: Intel 8 Series/C220 Series High Definition Audio vendor: Micro-Star MSI driver: snd_hda_intel 
           v: kernel bus ID: 00:1b.0 chip ID: 8086:8c20 
           Sound Server: ALSA v: k5.4.0-52-generic 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Micro-Star MSI driver: r8169 
           v: kernel port: e000 bus ID: 02:00.0 chip ID: 10ec:8168 
           IF: enp2s0 state: down mac: <filter> 
           Device-2: Samsung GT-I9500 [Galaxy S4] / GT-I9250 [Galaxy Nexus] (network tethering) type: USB 
           driver: rndis_host bus ID: 3-1:7 chip ID: 04e8:6863 serial: <filter> 
           IF: enp0s20u1 state: unknown speed: N/A duplex: N/A mac: <filter> 
Drives:    Local Storage: total: 931.51 GiB used: 301.64 GiB (32.4%) 
           ID-1: /dev/sda vendor: Western Digital model: WD10EZEX-08WN4A0 size: 931.51 GiB speed: 6.0 Gb/s 
           rotation: 7200 rpm serial: <filter> rev: 1A01 temp: 40 C scheme: MBR 
Partition: ID-1: / size: 915.89 GiB used: 301.64 GiB (32.9%) fs: ext4 dev: /dev/sda1 
Sensors:   System Temperatures: cpu: 41.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 195 Uptime: 1h 00m Memory: 7.66 GiB used: 1.23 GiB (16.0%) Init: systemd v: 237 runlevel: 5 
           Compilers: gcc: 7.5.0 alt: 7 Shell: bash v: 4.4.20 running in: gnome-terminal inxi: 3.0.32 
0: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no
EFI variables are not supported on this system
Two PC's on Linux Mint 20.1 Cinnamon. Thank you.
JeremyB
Level 20
Level 20
Posts: 11929
Joined: Fri Feb 21, 2014 8:17 am

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by JeremyB »

Any results for

Code: Select all

dmesg | grep -i rtw
FamCompKid
Level 3
Level 3
Posts: 107
Joined: Thu Apr 25, 2019 1:18 am

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by FamCompKid »

JeremyB wrote:
Sun Nov 01, 2020 10:47 am
Any results for

Code: Select all

dmesg | grep -i rtw
Thank you, Jeremy.

Code: Select all

~$ dmesg | grep -i rtw
[   14.608573] 8821cu: unknown parameter 'rtw_led_ctrl' ignored
Before we go further, I've been thinking about upgrading to LM 20. Actually my plan was to sort out my WiFi issues here on LM 19.3 first but now I realize that may be a bad idea. I'll return this adapter if it doesn't work on LM 20 but I think upgrading first would be the best course of action. However, it's bedtime over here and I'll do the upgrade (clean install) in 24 hours tops. What do you think? Sorry about that and thanks again.
Two PC's on Linux Mint 20.1 Cinnamon. Thank you.
JeremyB
Level 20
Level 20
Posts: 11929
Joined: Fri Feb 21, 2014 8:17 am

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by JeremyB »

Mint 20 won't make any difference as you are already using the same kernel it has. Run this and post URL

Code: Select all

wget -N -t 5 -T 10 https://github.com/UbuntuForums/wireless-info/raw/master/wireless-info && chmod +x wireless-info && ./wireless-info && cat wireless-info.txt | nc termbin.com 9999
FamCompKid
Level 3
Level 3
Posts: 107
Joined: Thu Apr 25, 2019 1:18 am

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by FamCompKid »

[EDIT: I removed the URL because I'm not savvy enough to decide whether it's safe to publicly post my networking info. However, I'm keeping a text file in case someone needs it, although I doubt that.]

Thank you, that's great to hear!
Last edited by FamCompKid on Mon Nov 02, 2020 3:35 am, edited 1 time in total.
Two PC's on Linux Mint 20.1 Cinnamon. Thank you.
JeremyB
Level 20
Level 20
Posts: 11929
Joined: Fri Feb 21, 2014 8:17 am

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by JeremyB »

Do

Code: Select all

sudo rm /etc/modprobe.d/8821cu.conf
Reboot and do

Code: Select all

./wireless-info && cat wireless-info.txt | nc termbin.com 9999
Post URL
FamCompKid
Level 3
Level 3
Posts: 107
Joined: Thu Apr 25, 2019 1:18 am

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by FamCompKid »

[EDIT: Removed the URL. Please see my previous reply.]

Thank you.
Last edited by FamCompKid on Mon Nov 02, 2020 3:36 am, edited 1 time in total.
Two PC's on Linux Mint 20.1 Cinnamon. Thank you.
JeremyB
Level 20
Level 20
Posts: 11929
Joined: Fri Feb 21, 2014 8:17 am

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by JeremyB »

Lets try something from the github issue

Code: Select all

sudo modprobe -r 8821cu
sudo modprobe 8821cu rtw_RFE_type=0x26
See if it works
FamCompKid
Level 3
Level 3
Posts: 107
Joined: Thu Apr 25, 2019 1:18 am

Re: (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by FamCompKid »

IT'S WORKING THANK YOU SO MUCH! :)

Sorry I really have no clue but... I'll just have to do it all over again on LM 20? I'm upgrading any time this week.

Thank you again :)
Two PC's on Linux Mint 20.1 Cinnamon. Thank you.
JeremyB
Level 20
Level 20
Posts: 11929
Joined: Fri Feb 21, 2014 8:17 am

Re: [SOLVED] (RTL8821CU-CG) Wireless adapter installed, detected but not working

Post by JeremyB »

Actually I would recommend doing

Code: Select all

echo "options 8821cu rtw_RFE_type=0x26" | sudo tee /etc/modprobe.d/8821cu.conf
That will load the module correctly at boot time rather than have to run those 2 commands each time
Post Reply

Return to “Newbie Questions”