昨天我买了一台新笔记本电脑,预装了 Windows 10,然后我将其升级到了 Windows 11。我通过 USB 安装了 Ubuntu 20.04(系统提示我输入 MOK 密钥。在 Ubuntu 安装后重新启动时,我被带到蓝色的 MOK 屏幕,但笔记本电脑死机了,我不得不强制关机。此后,系统没有再次提示我输入 MOK 密钥。)
我可以通过有线连接连接到互联网,但不能通过 WiFi 连接。我读过多篇关于 WiFi 适配器无法被检测到的类似问题的帖子,最终实施了这个帖子。为了做到这一点,我必须通过 BIOS 禁用 Windows SecureBoot。安装后,我得到了以下输出GBE 以太网 LINUX 驱动程序 r8168,适用于内核 5.6 及以上版本司机:
niran90@Niran-Legion-5:~$ lsmod | grep r8168
r8168 540672 0
niran90@Niran-Legion-5:~$ ifconfig -a
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.168 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 2c0f:f4c0:230c:70c:f135:e1ed:b192:3d38 prefixlen 64 scopeid 0x0<global>
inet6 2c0f:f4c0:230c:70c:81f8:7e5e:3447:c391 prefixlen 64 scopeid 0x0<global>
inet6 fe80::9489:28e3:3526:a5ad prefixlen 64 scopeid 0x20<link>
ether 38:f3:ab:fc:7e:79 txqueuelen 1000 (Ethernet)
RX packets 60923 bytes 69487638 (69.4 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 29425 bytes 3926470 (3.9 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 34 base 0x9000
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 2208 bytes 214071 (214.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2208 bytes 214071 (214.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
niran90@Niran-Legion-5:~$ sudo lshw -C network
[sudo] password for niran90:
*-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: eno1
version: 15
serial: 38:f3:ab:fc:7e:79
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix 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 duplex=full ip=192.168.0.168 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:34 ioport:3000(size=256) memory:d1704000-d1704fff memory:d1700000-d1703fff
*-network UNCLAIMED
description: Network controller
product: Realtek Semiconductor Co., Ltd.
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:04:00.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress cap_list
configuration: latency=0
resources: ioport:2000(size=256) memory:d1600000-d16fffff
niran90@Niran-Legion-5:~$ sudo ethtool -i eno1
driver: r8168
version: 8.049.02-NAPI
firmware-version:
expansion-rom-version:
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no
重新启动后,我仍然无法连接到 WiFi,因为找不到 WiFi 适配器:
任何建议/帮助都将不胜感激!
编辑:
根据用户“Jeremy31”的要求,请参见以下输出:
niran90@Niran-Legion-5:~$ lspci -nnk |grep -iA3 net
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
DeviceName: Realtek RTL8111E Ethernet LOM
Subsystem: Lenovo RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [17aa:3900]
Kernel driver in use: r8168
Kernel modules: r8168
04:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8852]
Subsystem: Lenovo Device [17aa:4852]
05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:1638] (rev c5)
Subsystem: Lenovo Device [17aa:3a88]
答案1
为了获得Realtek PCI 适配器使用 Ubuntu,请按照以下步骤操作:
更新软件缓存(存储库列表)并安装所需的依赖项:
sudo apt-get update sudo apt-get install linux-headers-generic build-essential git
下载并安装正确的驱动程序:
git clone https://github.com/lwfinger/rtw89.git -b v5 cd rtw89 && make && sudo make install
重新启动以确认安装:
sudo reboot
加载模块:
sudo modprobe rtw89pci
有时安装不成功。在这种情况下,请参考: https://github.com/lwfinger/rtw89#installation-instruction
如果加载模块时出现错误,很可能是由于安装损坏/失败造成的。尝试重新安装驱动程序并重新启动。
答案2
我的双启动系统电脑也遇到了同样的问题。如果我先启动 Windows,然后重新启动(而不是关闭)系统并转到 ubuntu,则 wifi 会被检测到并连接。另一方面,如果我从 Windows 关闭系统,然后启动它转到 ubuntu,则不会检测到 wifi。看看这个技巧是否对你有用。我无法解决这个问题,但暂时使用这种方法。我已启用安全启动。