Score:-1

My USB Wifi dongle (RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller) is not working

pk flag

at first I must say I am new in UBUNTU.The version of my Ubuntu is Ubuntu 22.04.2 LTS. I have connected dongle from 'RTL8111/8168/8411 PCI Express Gigabit Ethernet from Realtek Semiconductor Co., Ltd'. It did not worked out of the box so I looked online and tried to solve the problem but it is still now working. When I type:

lsusb
the Wifi dongle is listed:
Bus 002 Device 008: ID 0e8d:2004 MediaTek Inc. moto g22
Bus 002 Device 005: ID 058f:6361 Alcor Micro Corp. Multimedia Card Reader
Bus 002 Device 004: ID 0bda:c811 Realtek Semiconductor Corp. 802.11ac NIC
Bus 002 Device 003: ID 24ae:2013 Shenzhen Rapoo Technology Co., Ltd. Rapoo 2.4G Wireless Device
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 275d:0ba6  USB OPTICAL MOUSE 
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

When I type

sudo lshw -C network

It gives me following output:

  *-network                 
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: enp2s0
       version: 06
       serial: 9e:07:07:e3:98:a0
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.049.02-NAPI latency=0 link=no multicast=yes port=twisted pair
       resources: irq:25 ioport:e800(size=256) memory:f9fff000-f9ffffff memory:f9ff8000-f9ffbfff
  *-network
       description: Ethernet interface
       physical id: 5
       bus info: usb@2:1.6
       logical name: enx463925c9264f
       serial: 46:39:25:c9:26:4f
       capabilities: ethernet physical
       configuration: autonegotiation=off broadcast=yes driver=rndis_host driverversion=5.19.0-38-generic duplex=half firmware=RNDIS device ip=192.168.34.226 link=yes multicast=yes port=twisted pair

I also installed the driver r8168. When I type:

sudo dkms status
It gives me following output:
broadcom-sta/6.30.223.271, 5.19.0-38-generic, x86_64: installed
r8168/8.049.02, 5.19.0-38-generic, x86_64: installed
rtl8821CU/5.4.1: added

When I restart I see:

 [    1.333512] r8168 0000:02:00.0 (unnamed net_device)(uninitialized): invalid ether addr 00:00:00:00:00:00 

maybe someone had similar problem and could help me please?

Thanks in advance!

Additional information posted as an answer

Thank you a lot for the reply @chili555 I did as you advised, but it is still not working.

The outputs from the commands are as follows:

~$ sudo dkms remove rtl8821CU/5.4.1 --all

Error! The module/version combo: rtl8821CU-5.4.1 is not located in the DKMS tree.enter code here

~/8821cu-20210916$ sudo ./install-driver.sh

: ---------------------------
: install-driver.sh v20230227
: x86_64 (architecture)
: 4/4 (in-use/total processing units)
: 12246640 (total system memory)
: 5.19.0-38-generic (kernel version)
: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
: dkms-2.8.7
EFI variables are not supported on this system
: ---------------------------

Checking for previously installed drivers.
: ---------------------------

Starting installation.
Installing 8821cu.conf to /etc/modprobe.d
The dkms installation routines are in use.
Copying source files to /usr/src/rtl8821cu-5.12.0.4
Creating symlink /var/lib/dkms/rtl8821cu/5.12.0.4/source -> /usr/src/rtl8821cu-5.12.0.4
The driver was added to dkms successfully.
: ---------------------------

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
./dkms-make.sh.................................
Signing module:
 - /var/lib/dkms/rtl8821cu/5.12.0.4/5.19.0-38-generic/x86_64/module/8821cu.ko
EFI variables are not supported on this system
/sys/firmware/efi/efivars not found, aborting.
cleaning build area...
Compile time: 313.36 seconds
The driver was built by dkms successfully.
: ---------------------------

8821cu.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.19.0-38-generic/updates/dkms/

depmod............
The driver was installed by dkms successfully.
: ---------------------------

Info: Upgrade this driver with the following commands as needed:
$ git pull
$ sudo sh install-driver.sh
Note: Upgrades to this driver should be performed before distro upgrades.
Note: Upgrades can be performed as often as you like.
Note: Work on this driver is continuous.
: ---------------------------

Do you want to edit the driver options file now? (recommended) [Y/n] 
Do you want to apply the new options by rebooting now? (recommended) [Y/n]

: ---------------------------
: install-driver.sh v20230227
: x86_64 (architecture)
: 4/4 (in-use/total processing units)
: 12246640 (total system memory)
: 5.19.0-38-generic (kernel version)
: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
: dkms-2.8.7
EFI variables are not supported on this system
: ---------------------------

Checking for previously installed drivers.
: ---------------------------

Starting installation.
Installing 8821cu.conf to /etc/modprobe.d
The dkms installation routines are in use.
Copying source files to /usr/src/rtl8821cu-5.12.0.4
Creating symlink /var/lib/dkms/rtl8821cu/5.12.0.4/source -> /usr/src/rtl8821cu-5.12.0.4
The driver was added to dkms successfully.
: ---------------------------

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
./dkms-make.sh.................................
Signing module:
 - /var/lib/dkms/rtl8821cu/5.12.0.4/5.19.0-38-generic/x86_64/module/8821cu.ko
EFI variables are not supported on this system
/sys/firmware/efi/efivars not found, aborting.
cleaning build area...
Compile time: 313.36 seconds
The driver was built by dkms successfully.
: ---------------------------

8821cu.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.19.0-38-generic/updates/dkms/

depmod............
The driver was installed by dkms successfully.
: ---------------------------

Info: Upgrade this driver with the following commands as needed:
$ git pull
$ sudo sh install-driver.sh
Note: Upgrades to this driver should be performed before distro upgrades.
Note: Upgrades can be performed as often as you like.
Note: Work on this driver is continuous.
: ---------------------------

Do you want to edit the driver options file now? (recommended) [Y/n] 
Do you want to apply the new options by rebooting now? (recommended) [Y/n]enter code here

while installing driver it tells: EFI variables are not supported on this system I am not sure how inportant it is.

I pressed yes after this.

When I run ~$ sudo dkms status I get:

broadcom-sta/6.30.223.271, 5.19.0-38-generic, x86_64: installed
rtl8821cu/5.12.0.4, 5.19.0-38-generic, x86_64: installed

Output of sudo dmesg | grep 8821:

[sudo] password for rgtm: 
[   21.202833] RTW: rtl8821cu v5.12.0.4-1-g9241a6516.20210916_COEX20200730-5151
[   21.202835] RTW: rtl8821cu BT-Coex version = COEX20200730-5151
[   21.624773] usbcore: registered new interface driver rtl8821cu
[   21.655048] rtl8821cu 2-1.3:1.0 wlx1cbfce9da648: renamed from wlan0
Marco avatar
br flag
https://linux-hardware.org/?id=usb:0bda-c811
Score:3
cn flag

Your USB wireless dongle is this: 0bda:c811 Realtek Semiconductor Corp. 802.11ac NIC. The rtl8168 device is ethernet, not wireless. The correct driver is rtl8821CU but the driver you installed didn't build correctly and so is not installed and working.

With a working internet connection, open a terminal and do:

sudo dkms remove rtl8821CU/5.4.1 --all
sudo apt update
sudo apt install --reinstall build-essential git bc dkms
git clone https://github.com/morrownr/8821cu-20210916.git
cd 8821cu-20210916
sudo ./install-driver.sh
sudo modprobe 8821cu

You should be all set.

Rgtm avatar
pk flag
Thank you a lot for the reply @chili555 I did as you advised, but sadly it is still not working. I have posted the results as the answer for my previous question as I was not able to post it all here. Thanks again!!
chili555 avatar
cn flag
Please reboot and show us: sudo dmesg | grep 8821
Rgtm avatar
pk flag
Here is the output of sudo dmesg | grep 8821. I have updated my latest answer with it. sudo dmesg | grep 8821 [sudo] password for rgtm: [ 21.202833] RTW: rtl8821cu v5.12.0.4-1-g9241a6516.20210916_COEX20200730-5151 [ 21.202835] RTW: rtl8821cu BT-Coex version = COEX20200730-5151 [ 21.624773] usbcore: registered new interface driver rtl8821cu [ 21.655048] rtl8821cu 2-1.3:1.0 wlx1cbfce9da648: renamed from wlan0 `
chili555 avatar
cn flag
Looks good to me! Do you see networks when yo click the Network Manager icon at the top right? Does it try to connect? Does this command show available networks? `nmcli device wifi list`
Rgtm avatar
pk flag
Thank you a lot @chili555! It works now. Have a great day. :)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.