r8168 在 18.04 中未协商千兆速度

r8168 在 18.04 中未协商千兆速度

我刚刚将我的主要台式机从 16.04 升级到 18.04。我有一张 r8168 网卡。我在 16.04 中获得了千兆速度,现在在 18.04 中只能获得 100Mbps。我尝试了 r8169 和 r8168-dkms 驱动程序。升级后,我交换了网线和交换机以确保这不是硬件问题。

该 NIC 是 MSI x370 Gaming Plus 主板的板载 NIC。

不幸的是,我没有来自 16.04 的调试信息;以下是升级到 18.04 之后的调试信息。

$ 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:1e:00.0
       logical name: eth0
       version: 15
       serial: 30:9c:23:0c:9a:94
       size: 100Mbit/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.045.08-NAPI duplex=full ip=192.168.1.2 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
       resources: irq:46 ioport:f000(size=256) memory:fd604000-fd604fff memory:fd600000-fd603fff
$ sudo ethtool eth0
Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 100Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
        Link detected: yes
$ lsmod | grep r816
r8168                 524288  0
$ dmesg | egrep '(eth0)|(r816)'
[    1.036881] r8168: loading out-of-tree module taints kernel.
[    1.037195] r8168: module verification failed: signature and/or required key missing - tainting kernel
[    1.037822] r8168 Gigabit Ethernet driver 8.045.08-NAPI loaded
[    1.052489] r8168: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[    1.052496] r8168  Copyright (C) 2017  Realtek NIC software team <[email protected]> 
[   42.034465] eth0: 0xffffa7790007d000, 30:9c:23:0c:9a:94, IRQ 46
[   42.087610] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   47.210737] r8168: eth0: link up
[   47.210752] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
# note: did ethtool -r eth0 here
[  180.421766] r8168: eth0: link down
[  185.588203] r8168: eth0: link up

答案1

刚刚经历了完全一样的事情。一切都没有用,直到我开始摆弄 ethtool 并注意到我可以在那里将其设置为 1000。查看网络管理器,它被设置为 100/一半。我将其更改为自动协商,现在它运行正常。

答案2

我也遇到过这种情况。我怀疑这可能是由 Ubuntu 有时默认加载的不良 NIC 驱动程序引起的,这会将硬件困在无法自行摆脱的状态。根据此故障排除论坛对你的电脑进行冷重启(拔掉交流电电缆 5 分钟,然后重新打开)可以清除网卡可能存在的不良状态,并可以解决此问题。

请记住,如果驱动程序有故障,此问题可能会随机再次发生,或永远发生。您应该始终使用最适合您的 NIC 的驱动程序。就您而言,正如你的主板制造商所说,您使用的是 Realtek® 8111H 芯片,因此请从Realtek 网站并且使用它们似乎值得一试。

相关内容