断电后找不到 wifi 适配器

断电后找不到 wifi 适配器

我的计算机上有 Ubuntu 20.04 和 Windows 10 双启动设置。

当我使用 Windows 10 时,家里突然断电,几个月来一切都运行正常。现在 Windows 可以正常工作,但 Ubuntu 却找不到我的 Wifi USB 适配器(Realtek 802.11ac NIC)。

lsusb我看到设备,它是Bus 002 Device 003: ID 0bda:c811 Realtek Semiconductor Corp.。虽然它iwconfig只是提示no wireless extensions.

我尝试编辑 Windows 中的某些选项,例如禁用快速启动和禁用在设备属性中关闭设备的功能。然后我尝试重新安装 Ubuntu 无线驱动程序“rtl8821CU”,但这给了我Error: can't use storage command in MessageContent with interface 0; interface class is 255, expected 8. Abort

sam@samUbuntu:~$ sudo ifconfig wlan0 up
wlan0: ERROR while getting interface flags: No such device

sam@samUbuntu:~$  sudo apt-get install --reinstall bcmwl-kernel-source
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 0 B/1.546 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 234783 files and directories currently installed.)
Preparing to unpack .../bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu7~20.04.3_amd64.deb ...
Removing all DKMS Modules
Done.
Unpacking bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu7~20.04.3) over (6.30.223.271+bdcom-0ubuntu7~20.04.3) ...
Setting up bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu7~20.04.3) ...
Loading new bcmwl-6.30.223.271+bdcom DKMS files...
Building for 5.15.0-41-generic
Building for architecture x86_64
Building initial module for 5.15.0-41-generic
This system doesn't support Secure Boot
Secure Boot not enabled on this system.
Done.

wl.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.15.0-41-generic/updates/dkms/

depmod...

DKMS: install completed.
libkmod: ERROR ../libkmod/libkmod-config.c:656 kmod_config_parse: /etc/modprobe.d/local.conf line 1: ignoring bad line starting with 'drm_kms_helper'
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: Generating /boot/initrd.img-5.15.0-41-generic
libkmod: ERROR ../libkmod/libkmod-config.c:656 kmod_config_parse: /etc/modprobe.d/local.conf line 1: ignoring bad line starting with 'drm_kms_helper'
libkmod: ERROR ../libkmod/libkmod-config.c:656 kmod_config_parse: /etc/modprobe.d/local.conf line 1: ignoring bad line starting with 'drm_kms_helper'

我也尝试过:

sam@samUbuntu:~$ sudo usb_modeswitch -W -v 0bda -p c811 -R
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= 0xc811

Look for default devices ...
  found USB ID 04e8:6863
  found USB ID 062a:4106
  found USB ID 0bda:c811
   vendor ID matched
   product ID matched
  found USB ID 8087:0024
  found USB ID 1d6b:0002
  found USB ID 046d:c31c
  found USB ID 1235:8016
  found USB ID 8087:0024
  found USB ID 1d6b:0002
 Found devices in default mode (1)
Access device 003 on bus 002
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
 with class 255

USB description data (for identification)
-------------------------
Manufacturer: Realtek
     Product: 802.11ac NIC
  Serial No.: 123456
-------------------------
Warning: no switching method given. See documentation
Reset USB device .
 Device was reset
-> Run lsusb to note any changes. Bye!

libusb: warning [libusb_exit] application left some devices open

答案1

第一的,bcmwl-内核源代码是 Broadcom 无线设备的驱动程序。您没有该驱动程序。请将其删除:

sudo apt purge bcmwl-kernel-source

接下来请执行以下操作:

sudo apt install --reinstall build-essential bc dkms git
git clone https://github.com/morrownr/8821cu-20210118.git
cd 8821cu-20210118
sudo ./install-driver.sh
sudo modprobe 8821cu

一切已准备就绪。

相关内容