20.04 有线连接问题

20.04 有线连接问题

我从 Gnome 切换到 KDE Plasma 并转回后,有线网络停止工作。我之前在 Gnome 上可以正常工作,然后切换到 KDE,有一段时间没有使用有线网络,今天我切换回 Gnome,它就不能正常工作了。

$ sudo ethtool wlp2s0 
Settings for wlp2s0:
    Link detected: yes

$ sudo lshw -c net
  *-network UNCLAIMED       
       description: Ethernet controller
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:01:00.0
       version: 10
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd cap_list
       configuration: latency=0
       resources: ioport:5000(size=256) memory:a4104000-a4104fff memory:a4100000-a4103fff
  *-network
       description: Wireless interface
       product: RTL8821AE 802.11ac PCIe Wireless Network Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlp2s0
       version: 00
       serial: c8:3d:d4:3b:e9:71
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtl8821ae driverversion=5.15.0-57-generic firmware=N/A ip=192.168.1.129 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:128 ioport:4000(size=256) memory:a4000000-a4003fff
# apt list --installed | grep -E '^linux'

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

linux-base/focal-updates,focal-updates,now 4.5ubuntu3.7 all [installed,automatic]
linux-firmware/focal-updates,focal-updates,now 1.187.35 all [installed,automatic]
linux-generic-hwe-20.04/focal-updates,focal-security,now 5.15.0.58.64~20.04.24 amd64 [installed]
linux-headers-5.15.0-57-generic/focal-updates,focal-security,now 5.15.0-57.63~20.04.1 amd64 [installed]
linux-headers-5.15.0-58-generic/focal-updates,focal-security,now 5.15.0-58.64~20.04.1 amd64 [installed,automatic]
linux-headers-5.4.0-137-generic/focal-updates,focal-security,now 5.4.0-137.154 amd64 [installed,automatic]
linux-headers-5.4.0-137/focal-updates,focal-updates,focal-security,focal-security,now 5.4.0-137.154 all [installed,automatic]
linux-headers-generic-hwe-20.04/focal-updates,focal-security,now 5.15.0.58.64~20.04.24 amd64 [installed,automatic]
linux-headers-generic/focal-updates,focal-security,now 5.4.0.137.135 amd64 [installed]
linux-hwe-5.15-headers-5.15.0-57/focal-updates,focal-updates,focal-security,focal-security,now 5.15.0-57.63~20.04.1 all [installed,automatic]
linux-hwe-5.15-headers-5.15.0-58/focal-updates,focal-updates,focal-security,focal-security,now 5.15.0-58.64~20.04.1 all [installed,automatic]
linux-image-5.15.0-57-generic/focal-updates,focal-security,now 5.15.0-57.63~20.04.1 amd64 [installed]
linux-image-5.15.0-58-generic/focal-updates,focal-security,now 5.15.0-58.64~20.04.1 amd64 [installed,automatic]
linux-image-generic-hwe-20.04/focal-updates,focal-security,now 5.15.0.58.64~20.04.24 amd64 [installed,automatic]
linux-libc-dev/focal-updates,focal-security,now 5.4.0-137.154 amd64 [installed,automatic]
linux-modules-5.15.0-57-generic/focal-updates,focal-security,now 5.15.0-57.63~20.04.1 amd64 [installed]
linux-modules-5.15.0-58-generic/focal-updates,focal-security,now 5.15.0-58.64~20.04.1 amd64 [installed,automatic]
linux-modules-extra-5.15.0-57-generic/focal-updates,focal-security,now 5.15.0-57.63~20.04.1 amd64 [installed]
linux-modules-extra-5.15.0-58-generic/focal-updates,focal-security,now 5.15.0-58.64~20.04.1 amd64 [installed,automatic]
linux-sound-base/focal,focal,now 1.0.25+dfsg-0ubuntu5 all [installed,automatic]
# dkms status
nvidia, 525.78.01, 5.15.0-57-generic, x86_64: installed
nvidia, 525.78.01, 5.15.0-58-generic, x86_64: installed
nvidia, 525.78.01, 5.4.0-137-generic, x86_64: installed
rtl8821ce, 5.5.2.1, 5.15.0-57-generic, x86_64: installed
rtl8821ce, 5.5.2.1, 5.15.0-58-generic, x86_64: installed
rtl8821ce, 5.5.2.1, 5.4.0-137-generic, x86_64: installed
# grep r8169 /etc/modprobe.d/*
/etc/modprobe.d/r8168-dkms.conf:# map the specific PCI IDs instead of blacklisting the whole r8169 module
/etc/modprobe.d/r8168-dkms.conf:# to blacklist the whole r8169 module
/etc/modprobe.d/r8168-dkms.conf:#blacklist r8169

# dmesg | grep r8169
<no output>

# lspci -knn | grep Eth -A3
01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)
    Subsystem: Lenovo RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [17aa:384c]
    Kernel modules: r8168
02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter [10ec:8821]
    Subsystem: Lenovo RTL8821AE 802.11ac PCIe Wireless Network Adapter [17aa:a814]

答案1

您已将r8169模块列入黑名单。

跑步

sudo apt purge r8168-dkms
sudo rm /etc/modprobe.d/r8168-dkms.conf
sudo modprobe r8169

根据实际安装的内容,运行第一个命令时可能会出现错误,但如果第三个命令正常,网络应该开始工作。

相关内容