Networking

RTL8111/8168/8411 wifi 卡在 Ubuntu 18.04 上不起作用

  • October 30, 2020

我有一台安裝了 Ubuntu 18.04 的新筆記型電腦。筆記型電腦有一個 Realtek RTL8111/8168/8411 乙太網/wifi 卡。我無法檢測或連接到任何 wifi 網路。我已經插入了一個單獨的 USB wifi 設備,並且工作正常。

我嘗試安裝最新的驅動程序 ( sudo apt-get install r8168-dkms),但沒有成功。

網路介面顯示為關閉,我無法啟動它。

$ lshw -C network

WARNING: you should run this program as super-user.
 *-network UNCLAIMED       
      description: Network controller
      product: Intel Corporation
      vendor: Intel Corporation
      physical id: 0
      bus info: pci@0000:07:00.0
      version: 1a
      width: 64 bits
      clock: 33MHz
      capabilities: cap_list
      configuration: latency=0
      resources: memory:a4300000-a4303fff
 *-network
      description: Ethernet interface
      product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
      vendor: Realtek Semiconductor Co., Ltd.
      physical id: 0.1
      bus info: pci@0000:08:00.1
      logical name: enp8s0f1
      version: 12
      serial: 80:fa:5b:69:e3:c6
      size: 10Mbit/s
      capacity: 1Gbit/s
      width: 64 bits
      clock: 33MHz
      capabilities: 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.045.08-NAPI duplex=half latency=0 link=no multicast=yes port=twisted pair speed=10Mbit/s
      resources: irq:129 ioport:3000(size=256) memory:a4204000-a4204fff memory:a4200000-a4203fff
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
   link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
   inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
   inet6 ::1/128 scope host 
      valid_lft forever preferred_lft forever
2: enp8s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
   link/ether 80:fa:5b:69:e3:c6 brd ff:ff:ff:ff:ff:ff

這是我的預設網路介面

cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

我嘗試添加介面並重新啟動網路管理器。

cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto enp8s0f1
iface enp8s0f1 inet dhcp

但是筆記型電腦網路管理器在此配置中無法重新啟動。

下面是驅動安裝:

$ sudo apt-get install r8168-dkms 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed
 r8168-dkms
0 to upgrade, 1 to newly install, 0 to remove and 4 not to upgrade.
Need to get 0 B/94.9 kB of archives.
After this operation, 1,224 kB of additional disk space will be used.
Selecting previously unselected package r8168-dkms.
(Reading database ... 149279 files and directories currently installed.)
Preparing to unpack .../r8168-dkms_8.045.08-2_all.deb ...
Unpacking r8168-dkms (8.045.08-2) ...
Setting up r8168-dkms (8.045.08-2) ...
Loading new r8168-8.045.08 DKMS files...
Building for 4.15.0-65-generic
Building initial module for 4.15.0-65-generic
Secure Boot not enabled on this system.
Done.

r8168:
Running module version sanity check.
- Original module
  - No original module exists within this kernel
- Installation
  - Installing to /lib/modules/4.15.0-65-generic/updates/dkms/

depmod...

Backing up initrd.img-4.15.0-65-generic to /boot/initrd.img-4.15.0-65-generic.old-dkms
Making new initrd.img-4.15.0-65-generic
(If next boot fails, revert to initrd.img-4.15.0-65-generic.old-dkms image)
update-initramfs.....

DKMS: install completed.

任何想法或幫助表示讚賞。

更新:我也剛剛嘗試從原始碼 https://github.com/mtorromeo/r8168建構最新的驅動程序

它安裝正常,但沒有變化

$ sudo ethtool -i enp8s0f1
driver: r8168
version: 8.047.04-NAPI
firmware-version: 
expansion-rom-version: 
bus-info: 0000:08:00.1
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no
$ lspci -knn | grep Net -A3
07:00.0 Network controller [0280]: Intel Corporation Device [8086:2723] (rev 1a)
   Subsystem: Intel Corporation Device [8086:0084]
08:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411B PCI Express Card Reader [10ec:5287] (rev 01)
   Subsystem: CLEVO/KAPOK Computer RTL8411B PCI Express Card Reader [1558:8552]
$uname -a
Linux XXX-NH50-70RH 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

您的 wifi 卡是 Intel Wi-Fi 6 AX200 。您需要將核心升級到 5.1。

對英特爾® 無線適配器的無線維基核心Linux* 支持

支持以下設備(從核心版本開始):

Wi-Fi 6 產品

   Intel® Wi-Fi 6 AX200 (5.1)

要升級核心,您可以使用該ukuu工具:

sudo add-apt-repository ppa:teejee2008/ppa
sudo apt install ukuu

用於ukuu --list列出可用核心,請參閱ukuu --help.

由於其他驅動程序(可能是 Nvidia)與核心 5.x 不兼容,我在升級核心時遇到了一些問題。最後我發現英特爾發布了一個與我目前核心兼容的反向埠驅動程序。

sudo add-apt-repository ppa:canonical-hwe-team/pc-oem-dkms
sudo apt-get update
sudo apt-get install backport-iwlwifi-dkms
reboot

引用自:https://unix.stackexchange.com/questions/547224