大约一分钟后,wifi 停止工作,因为它仍然连接到 wifi,但没有传输数据。当我将内核升级到 4.17(从 4.15)时,这种情况开始发生,当我运行 4.17 时它甚至不会注册我的 usb 适配器,但只能工作一分钟左右。如果我使用相同的 wifi 适配器登录同一系统上的 Windows,一切都会正常。我已经确认这不是我的通用 wifi 的问题,因为当我在同一台机器上启动 Windows 时它可以工作,它也可以在我的笔记本电脑上运行 Ubuntu。在发生这种情况之前,自从我切换这台电脑以来,它已经工作了 5 个月,没有任何故障。
我按照以下命令安装我的驱动程序:
sudo git clone https://github.com/gnab/rtl8812au.git
sudo cp -r rtl8812au /usr/src/rtl8812au-4.2.2
sudo dkms add -m rtl8812au -v 4.2.2
sudo dkms build -m rtl8812au -v 4.2.2
sudo dkms install -m rtl8812au -v 4.2.2
系统盘
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0bda:a811 Realtek Semiconductor Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 145f:01c1 Trust
Bus 001 Device 002: ID 0c45:5104 Microdia
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
是否配置
enp33s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 30:9c:23:03:94:d2 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enx000f004aa319: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 2600:1700:16e0:6d90:1522:cd74:5f8a:6dc3 prefixlen 64 scopeid 0x0<global>
inet6 2600:1700:16e0:6d90:be9b:318:b16d:dfcf prefixlen 64 scopeid 0x0<global>
inet6 fe80::ae05:cd57:188b:30dd prefixlen 64 scopeid 0x20<link>
ether 00:0f:00:4a:a3:19 txqueuelen 1000 (Ethernet)
RX packets 10399 bytes 13031066 (13.0 MB)
RX errors 0 dropped 1816 overruns 0 frame 0
TX packets 5708 bytes 760985 (760.9 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1011 bytes 93331 (93.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1011 bytes 93331 (93.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
sudo lshw -C 网络
*-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:21:00.0
logical name: enp33s0
version: 15
serial: 30:9c:23:03:94:d2
size: 10Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168h-2_0.0.2 02/26/15 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
resources: irq:35 ioport:f000(size=256) memory:fe604000-fe604fff memory:fe600000-fe603fff
*-network
description: Wireless interface
physical id: 1
bus info: usb@3:1
logical name: enx000f004aa319
serial: 00:0f:00:4a:a3:19
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rtl8812au multicast=yes wireless=IEEE 802.11bgn
答案1
目前,Ubuntu 的存储库中包含了该驱动程序。对于 Ubuntu,您必须启用 Universe 软件包源。
sudo apt-get 更新
sudo apt-get 安装 r8168-dkms
重启
但即便如此,它也可能不是完美的,因为驱动程序不是开源的,而且内核更新至 4.15此时此刻。
最终他们会更新驱动程序,并且包管理器也会更新包,因此等待可能是一个选择,但您需要安装包才能执行此操作。
- 因此,第二个选项是将内核降级到 4.15,这样你就可以确保 WIFI 正常工作。(无论如何,我都会安装正确的驱动程序。)如何降级内核