内核升级后如何让 Wavlink USB wifi 适配器在 Ubuntu 18.04.2 LTS 中再次工作

内核升级后如何让 Wavlink USB wifi 适配器在 Ubuntu 18.04.2 LTS 中再次工作

自上次内核更新以来,Wifi 适配器停止工作。

Wifi USB 适配器:Wavlink AC1300 双频 USB 适配器
型号 # WL-WN688U8 (Rev.A)

我正在使用建议的附加开源驱动程序:

使用额外的驱动程序

Linux 内核版本和 Ubuntu 版本:

~$ uname -a  
Linux PC 5.0.0-23-generic #24~18.04.1-Ubuntu SMP Mon Jul 29 16:12:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

USB Wifi 适配器被识别为 RTL8812AU:

~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
(...)
Bus 001 Device 007: ID 0bda:8812 Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac WLAN Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

尽管没有无线接口:

~$ lshw -C network
WARNING: you should run this program as super-user.
  *-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:03:00.0
       logical name: enp3s0
       version: 0c
       serial: 1c:1b:0d:df:16:70
       size: 10Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=half firmware=rtl8168g-2_0.0.1 02/06/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:16 ioport:d000(size=256) memory:f7c00000-f7c00fff memory:f0000000-f0003fff
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

似乎没有安装 dkms 模块:

~$ dkms status
rtl8812au, 4.3.8.12175.20140902+dfsg: added

尝试重新安装:

~$ sudo dkms build -m rtl8812au -v 4.3.8.12175.20140902+dfsg
[sudo] password for user:  

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
'make' all......(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/rtl8812au-dkms.0.crash'
Error! Bad return status for module build on kernel: 5.0.0-23-generic (x86_64)
Consult /var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/make.log for more information.

make.log中的错误输出:

/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/os_dep/linux/os_intfs.c:779:22: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .ndo_select_queue = rtw_select_queue,
                      ^~~~~~~~~~~~~~~~
/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/os_dep/linux/os_intfs.c:779:22: note: (near initialization for ‘rtw_netdev_ops.ndo_select_queue’)
cc1: some warnings being treated as errors
scripts/Makefile.build:284: recipe for target '/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/os_dep/linux/os_intfs.o' failed
make[2]: *** [/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build/os_dep/linux/os_intfs.o] Error 1
Makefile:1606: recipe for target '_module_/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build' failed
make[1]: *** [_module_/var/lib/dkms/rtl8812au/4.3.8.12175.20140902+dfsg/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.0.0-23-generic'
Makefile:1457: recipe for target 'modules' failed
make: *** [modules] Error 2

欢迎任何帮助!

答案1

Wifi 适配器再次可用。以下是使其再次可用的方法。

问题:RTL8812au 芯片组的驱动程序版本 4.3.8.12175 与内核 5.0.0-23 不兼容。

解决方案:搜索 RTL8812au 的较新驱动程序版本并安装。

如何:在 GitHub 上下载并安装 gordboy 的 RTL8812au-5.6.4.1 驱动程序,然后按照自述文件进行安装:https://github.com/gordboy/rtl8812au-5.6.4.1

使用 dkms 安装:简而言之,打开终端(CTRL+ALT+T)并在终端中使用以下命令:

sudo apt install git build-essential dkms
sudo git clone https://github.com/gordboy/rtl8812au-5.6.4.1.git 
sudo cp -r rtl8812au-5.6.4.1 /usr/src/rtl8812au-5.6.4.1
sudo dkms add -m rtl8812au -v 5.6.4.1
sudo dkms build -m rtl8812au -v 5.6.4.1
sudo dkms install -m rtl8812au -v 5.6.4.1
sudo dkms status

dkms status 的输出应该是:

rtl8812au, 5.6.4.1, 5.0.0-23-generic, x86_64: installed

并且 Wifi 适配器应该可以工作直到下一次不受支持的内核版本升级。

要卸载并删除:在终端中使用以下命令:

sudo dkms remove -m rtl8812au -v 5.6.4.1 --all

2021年1月6日 编辑: 从 GitHub 安装 gordboy RTL8812au 驱动程序:v.5.9.3.2(适用于 Linux 内核 5.4)。

sudo apt install git build-essential dkms
sudo git clone https://github.com/gordboy/rtl8812au-5.9.3.2.git 
sudo cp -r rtl8812au-5.9.3.2 /usr/src/rtl8812au-5.9.3.2
sudo dkms add -m rtl8812au -v 5.9.3.2
sudo dkms build -m rtl8812au -v 5.9.3.2
sudo dkms install -m rtl8812au -v 5.9.3.2
sudo dkms status

要卸载并删除此版本:

sudo dkms remove -m rtl8812au -v 5.9.3.2 --all

答案2

更新:GitHub 存储库已更新至 5.6.4.2

sudo apt install git build-essential dkms
sudo git clone https://github.com/gordboy/rtl8812au-5.6.4.2.git 
sudo cp -r rtl8812au-5.6.4.2 /usr/src/rtl8812au-5.6.4.2
sudo dkms add -m rtl8812au -v 5.6.4.2
sudo dkms build -m rtl8812au -v 5.6.4.2
sudo dkms install -m rtl8812au -v 5.6.4.2
sudo dkms status

相关内容