使用有线连接时 Ubuntu 20.04 的下载速度非常慢

使用有线连接时 Ubuntu 20.04 的下载速度非常慢

我在 1 Gbps 连接上遇到了极慢的下载速度(~25 Mbps)。在 Windows 上,在同一台机器上,我的下载速度约为 960 Mbps。上传速度完全没有问题。

对于 WiFi,这个答案对我来说效果非常好。有线连接也有类似或具体的解决方案吗?

编辑 我包括一些基于的硬件配置马蒂戈对我的问题的评论。

输出sudo lspci

00:00.0 Host bridge: Intel Corporation Device 9a14 (rev 01)
00:02.0 VGA compatible controller: Intel Corporation Device 9a49 (rev 01)
00:04.0 Signal processing controller: Intel Corporation Device 9a03 (rev 01)
00:06.0 PCI bridge: Intel Corporation Device 9a09 (rev 01)
00:07.0 PCI bridge: Intel Corporation Device 9a23 (rev 01)
00:0a.0 Signal processing controller: Intel Corporation Device 9a0d (rev 01)
00:0d.0 USB controller: Intel Corporation Device 9a13 (rev 01)
00:0d.2 USB controller: Intel Corporation Device 9a1b (rev 01)
00:14.0 USB controller: Intel Corporation Device a0ed (rev 20)
00:14.2 RAM memory: Intel Corporation Device a0ef (rev 20)
00:14.3 Network controller: Intel Corporation Device a0f0 (rev 20)
00:15.0 Serial bus controller [0c80]: Intel Corporation Device a0e8 (rev 20)
00:15.2 Serial bus controller [0c80]: Intel Corporation Device a0ea (rev 20)
00:16.0 Communication controller: Intel Corporation Device a0e0 (rev 20)
00:1c.0 PCI bridge: Intel Corporation Device a0b8 (rev 20)
00:1c.2 PCI bridge: Intel Corporation Device a0ba (rev 20)
00:1f.0 ISA bridge: Intel Corporation Device a082 (rev 20)
00:1f.3 Multimedia audio controller: Intel Corporation Device a0c8 (rev 20)
00:1f.4 SMBus: Intel Corporation Device a0a3 (rev 20)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Device a0a4 (rev 20)
02:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a80a
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)

输出sudo lshw -C network

  *-network                 
       description: Wireless interface
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 14.3
       bus info: pci@0000:00:14.3
       logical name: wlp0s20f3
       version: 20
       serial: 54:14:f3:dd:16:70
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=5.13.0-30-generic firmware=63.c04f3485.0 QuZ-a0-hr-b0-63.u ip=192.168.1.35 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: iomemory:600-5ff irq:16 memory:601d18c000-601d18ffff
  *-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:04:00.0
       logical name: enp4s0
       version: 15
       serial: 90:2e:16:9a:42:a8
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix 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.13.0-30-generic firmware=rtl8168h-2_0.0.2 02/26/15 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:18 ioport:3000(size=256) memory:8e204000-8e204fff memory:8e200000-8e203fff

答案1

查看 的输出lshw,您可能安装了次优驱动程序。 最常见的投诉之一是r8169吞吐量降低。 解决方案通常是安装r8168-dkms软件包并将原始软件包列入黑名单。

操作方法如下:

  1. 打开终端(如果尚未打开)
  2. 更新apt并安装dkms驱动程序:
    sudo apt update
    sudo apt install r8168-dkms 
    
  3. 阻止系统r8169继续使用:
    sudo echo "blacklist r8169"  > /etc/modprobe.d/blacklist-r8169.conf
    
  4. 重启

现在,当您运行时,sudo lshw -C network您应该会看到driver=r8168倒数第二行。您应该看到与 Windows 类似的速度。

相关内容