Ubuntu 20.04 LAN 无法工作,但 WLAN 可以

Ubuntu 20.04 LAN 无法工作,但 WLAN 可以

相同的端口和电缆适用于 Windows 10,但不适用于 Ubuntu... DHCP 也不起作用,我尝试手动输入 IP 地址、子网、网关、dns 和默认路由,但它也不起作用。Wlan 正常

   sudo lshw -c network
  *-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:07:00.0
       logical name: enp7s0
       version: 0c
       serial: ...
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.8.0-48-generic duplex=full firmware=rtl8168g-2_0.0.1 02/06/13 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
       resources: irq:18 ioport:d000(size=256) memory:f7300000-f7300fff memory:f2100000-f2103fff
  *-network
       description: Wireless interface
       product: RTL8812AE 802.11ac PCIe Wireless Network Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:08:00.0
       logical name: wlp8s0
       version: 01
       serial: ...
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtl8821ae driverversion=5.8.0-48-generic firmware=N/A ip=192.168.2.129 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:145 ioport:c000(size=256) memory:f7200000-f7203fff
[10529.000296] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10539.007005] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10548.977364] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10558.961521] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10568.951462] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10578.941846] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10588.926051] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10598.907657] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10604.042660] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10614.018144] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10624.004245] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10634.057961] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10643.981796] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10653.964846] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10663.951920] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10673.950594] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10679.063972] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10684.949743] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10694.948815] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10700.058503] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10710.045342] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10720.035895] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10730.018690] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10739.985761] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10749.963196] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10759.928238] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10769.900689] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10775.035686] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10780.907349] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10790.888051] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10795.993191] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[10805.983153] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[11807.179382] r8169 0000:07:00.0 enp7s0: Link is Down
[11807.218877] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[11807.350963] r8169 0000:07:00.0: can't disable ASPM; OS doesn't have ASPM control
[11807.372571] libphy: r8169: probed
[11807.373116] r8169 0000:07:00.0 eth0: RTL8168g/8111g, e0:d5:5e:85:b2:0d, XID 4c0, IRQ 142
[11807.373123] r8169 0000:07:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[11807.385520] r8169 0000:07:00.0 enp7s0: renamed from eth0
[11807.439254] Generic FE-GE Realtek PHY r8169-700:00: attached PHY driver [Generic FE-GE Realtek PHY] (mii_bus:phy_addr=r8169-700:00, irq=IGNORE)
[11807.631285] r8169 0000:07:00.0 enp7s0: Link is Down
[11810.389629] r8169 0000:07:00.0 enp7s0: Link is Up - 1Gbps/Full - flow control rx/tx
[11820.729917] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[11825.844594] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[11830.965112] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[11836.853112] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[11839.923209] r8169 0000:07:00.0 enp7s0: Link is Down
[11839.959440] r8169 0000:07:00.0 enp7s0: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
[11840.105595] r8169 0000:07:00.0: can't disable ASPM; OS doesn't have ASPM control
[11840.130307] libphy: r8169: probed
[11840.130935] r8169 0000:07:00.0 eth0: RTL8168g/8111g, e0:d5:5e:85:b2:0d, XID 4c0, IRQ 142
[11840.130942] r8169 0000:07:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[11840.141913] r8169 0000:07:00.0 enp7s0: renamed from eth0
[11840.215331] Generic FE-GE Realtek PHY r8169-700:00: attached PHY driver [Generic FE-GE Realtek PHY] (mii_bus:phy_addr=r8169-700:00, irq=IGNORE)
[11840.407382] r8169 0000:07:00.0 enp7s0: Link is Down
[11843.042440] r8169 0000:07:00.0 enp7s0: Link is Up - 1Gbps/Full - flow control rx/tx

答案1

Ubuntu 论坛上的这个说明解决了我的问题:

sudo apt-get install build-essential linux-headers-$(uname -r)
sudo sh -c 'echo blacklist r8169 >> /etc/modprobe.d/blacklist.conf'

从以下网址下载最新的 tar.gzhttps://github.com/mtorromeo/r8168/releases

tar xfvz r8168-X.XXX.XX.tar.gz 

(将 XXs 替换为您下载的文件的名称)

cd r8168-8.XXX.XX
sudo ./autorun.sh 

相关内容