LM20 ethernet download speed < 20Mbps

Questions about cabled networking
Forum rules
Before you post please read how to get help
Post Reply
lcb123
Level 2
Level 2
Posts: 70
Joined: Thu Jul 30, 2015 10:34 am

LM20 ethernet download speed < 20Mbps

Post by lcb123 »

Updated from 19.3 to LM20 on desktop HP Envy, because my wireless was not working (couldn't initiate) as well as the download speed slow (<20Mbps). I saw a similar post in the "other networking topics" (viewtopic.php?p=1860642#p1860642), but realized this is likely the proper place to ask.
After updating to LM20, wireless now works (> 50Mbps download) but wired is still slow (<20Mbps). Same result when booting from liveUSB.

Also - I have a laptop running mint 18.3 wired ethernet speed is fine, same router. So I swapped network cables with the desktop machine to rule out cable/router. No change.

Info:

Code: Select all

sudo inxi -Fxms :
System:    Host: bigun Kernel: 5.4.0-45-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 4.6.7 
           Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal 
Machine:   Type: Desktop System: HP product: HP ENVY All-in-One 32-a0xxx v: N/A serial: 8CC0164TZL 
           Mobo: HP model: 86C6 v: 0010 serial: PJEBD0A8JDM06D UEFI: AMI v: F.10 date: 11/23/2019 
Memory:    RAM: total: 15.44 GiB used: 1.87 GiB (12.1%) 
           Array-1: capacity: 32 GiB slots: 2 EC: None max module size: 16 GiB note: est. 
           Device-1: DIMM0 size: 8 GiB speed: 2666 MT/s type: DDR4 
           Device-2: DIMM1 size: 8 GiB speed: 2666 MT/s type: DDR4 
CPU:       Topology: 6-Core model: Intel Core i5-9400 bits: 64 type: MCP arch: Kaby Lake rev: A L2 cache: 9216 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 34798 
           Speed: 800 MHz min/max: 800/4100 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 
Graphics:  Device-1: Intel UHD Graphics 630 vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0 
           Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: Hewlett-Packard driver: nvidia 
           v: 440.100 bus ID: 01:00.0 
           Display: server: X.Org 1.20.8 driver: modesetting,nvidia unloaded: fbdev,nouveau,vesa 
           resolution: 3840x2160~60Hz 
           OpenGL: renderer: GeForce GTX 1650/PCIe/SSE2 v: 4.6.0 NVIDIA 440.100 direct render: Yes 
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: Hewlett-Packard driver: snd_hda_intel v: kernel 
           bus ID: 00:1f.3 
           Sound Server: ALSA v: k5.4.0-45-generic 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Hewlett-Packard driver: r8169 
           v: kernel port: 4000 bus ID: 3b:00.0 
           IF: enp59s0 state: up speed: 1000 Mbps duplex: full mac: b0:5c:da:26:13:27 
           Device-2: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter vendor: Hewlett-Packard driver: rtw_pci 
           v: N/A port: 3000 bus ID: 3c:00.0 
           IF: wlp60s0 state: down mac: 4c:eb:bd:81:4e:1d 
Drives:    Local Storage: total: 953.87 GiB used: 26.76 GiB (2.8%) 
           ID-1: /dev/nvme0n1 model: KBG40ZNV1T02 KIOXIA size: 953.87 GiB 
Partition: ID-1: / size: 914.76 GiB used: 26.57 GiB (2.9%) fs: ext4 dev: /dev/dm-1 
           ID-2: /boot size: 704.5 MiB used: 191.2 MiB (27.1%) fs: ext4 dev: /dev/nvme0n1p2 
           ID-3: swap-1 size: 976.0 MiB used: 0 KiB (0.0%) fs: swap dev: /dev/dm-2 
Sensors:   System Temperatures: cpu: 52.0 C mobo: N/A gpu: nvidia temp: 43 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 243 Uptime: 18m Init: systemd runlevel: 5 Compilers: gcc: 9.3.0 Shell: bash v: 5.0.17 
           inxi: 3.0.38 

Code: Select all

ifconfig
enp59s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.143  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::b25c:daff:fe26:1327  prefixlen 64  scopeid 0x20<link>
        ether b0:5c:da:26:13:27  txqueuelen 1000  (Ethernet)
        RX packets 9633  bytes 3765726 (3.7 MB)
        RX errors 0  dropped 229  overruns 0  frame 0
        TX packets 6780  bytes 867162 (867.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Code: Select all

sudo lshw -class 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:3b:00.0
       logical name: enp59s0
       version: 15
       serial: b0:5c:da:26:13:27
       size: 1Gbit/s
       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 duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.0.143 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
       resources: irq:16 ioport:4000(size=256) memory:84404000-84404fff memory:84400000-84403fff
  *-network DISABLED
       description: Wireless interface
       product: RTL8822CE 802.11ac PCIe Wireless Network Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:3c:00.0
       logical name: wlp60s0
       version: 00
       serial: 4c:eb:bd:81:4e:1d
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=rtw_pci driverversion=5.4.0-45-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11
       resources: irq:159 ioport:3000(size=256) memory:84300000-8430ffff

Code: Select all

ethtool enp59s0 | grep -i speed
	Speed: 1000Mb/s
Thanks in advance for any suggestions.
User avatar
antikythera
Level 8
Level 8
Posts: 2201
Joined: Thu Jul 02, 2020 12:52 pm

Re: LM20 ethernet download speed < 20Mbps

Post by antikythera »

Try the PCIe GBE driver from the realtek website instead of r8169. It includes and install script that will automatically change you over to it from r8169.

Take a Timeshift snapshot first in case you want to go back to r8169.

To run the script:

Code: Select all

sudo ./autorun.sh
Enter your user password, press enter and let it do it's thing.

https://www.realtek.com/en/component/zo ... s-software
Last edited by antikythera on Mon Oct 19, 2020 3:41 am, edited 1 time in total.
Don't take life so seriously, nobody gets out alive anyway!
AMSTRAD CPC6128 - 128KB RAM, 3" Hitachi Floppy Diskette Drive, External Sony Cassette Recorder, Locomotive BASIC 1.1, CTM-644 Monitor
lcb123
Level 2
Level 2
Posts: 70
Joined: Thu Jul 30, 2015 10:34 am

Re: LM20 ethernet download speed < 20Mbps

Post by lcb123 »

Hi @antikythera, thanks for the suggestion.

I downloaded the GBE package from the link, which is labeled
GBE Ethernet LINUX driver r8168 for kernel up to 5.6
.
Not sure I have the right one though (note the kernel supported in README). Also this archive doesn't have a "install.sh" script, but rather an "autorun.sh" script.
Since I made a timeshift backup, decided to try it.

Here's the README :
<Linux device driver for Realtek Ethernet controllers>

This is the Linux device driver released for RealTek RTL8168B/8111B, RTL8168C/8111C, RTL8168CP/8111CP, RTL8168D/8111D, RTL8168DP/8111DP, and RTL8168E/8111E Gigabit Ethernet controllers with PCI-Express interface.

<Requirements>

- Kernel source tree (supported Linux kernel 2.6.x and 2.4.x)
- For linux kernel 2.4.x, this driver supports 2.4.20 and latter.
- Compiler/binutils for kernel compilation
...
Running the "sudo autorun.sh" script failed:

Code: Select all

Check old driver and unload it.
rmmod r8169
Build the module and install
At main.c:160:
- SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:69
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:76
sign-file: certs/signing_key.pem: No such file or directory
Warning: modules_install: missing 'System.map' file. Skipping depmod.
Backup r8169.ko
rename r8169.ko to r8169.bak
DEPMOD 5.4.0-45-generic
load module r8168
modprobe: ERROR: could not insert 'r8168': Operation not permitted
Updating initramfs. Please wait.
update-initramfs: Generating /boot/initrd.img-5.4.0-45-generic
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/mint--vg-swap_1)
I: Set the RESUME variable to override this.
Completed.
There was a log.txt file created:

Code: Select all

-------------------------------
Sun 06 Sep 2020 08:26:58 AM MDT
make -C src/ clean
make[1]: Entering directory '/home/lcb/Downloads/r8168-8.048.03/src'
make -C /lib/modules/5.4.0-45-generic/build M=/home/lcb/Downloads/r8168-8.048.03/src clean
make[2]: Entering directory '/usr/src/linux-headers-5.4.0-45-generic'
make[2]: Leaving directory '/usr/src/linux-headers-5.4.0-45-generic'
make[1]: Leaving directory '/home/lcb/Downloads/r8168-8.048.03/src'
make -C src/ modules
make[1]: Entering directory '/home/lcb/Downloads/r8168-8.048.03/src'
make -C /lib/modules/5.4.0-45-generic/build M=/home/lcb/Downloads/r8168-8.048.03/src modules
make[2]: Entering directory '/usr/src/linux-headers-5.4.0-45-generic'
  CC [M]  /home/lcb/Downloads/r8168-8.048.03/src/r8168_n.o
  CC [M]  /home/lcb/Downloads/r8168-8.048.03/src/r8168_asf.o
  CC [M]  /home/lcb/Downloads/r8168-8.048.03/src/rtl_eeprom.o
  CC [M]  /home/lcb/Downloads/r8168-8.048.03/src/rtltool.o
  LD [M]  /home/lcb/Downloads/r8168-8.048.03/src/r8168.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC [M]  /home/lcb/Downloads/r8168-8.048.03/src/r8168.mod.o
  LD [M]  /home/lcb/Downloads/r8168-8.048.03/src/r8168.ko
make[2]: Leaving directory '/usr/src/linux-headers-5.4.0-45-generic'
make[1]: Leaving directory '/home/lcb/Downloads/r8168-8.048.03/src'
make -C src/ install
make[1]: Entering directory '/home/lcb/Downloads/r8168-8.048.03/src'
make -C /lib/modules/5.4.0-45-generic/build M=/home/lcb/Downloads/r8168-8.048.03/src INSTALL_MOD_DIR=kernel/drivers/net/ethernet/realtek modules_install
make[2]: Entering directory '/usr/src/linux-headers-5.4.0-45-generic'
  INSTALL /home/lcb/Downloads/r8168-8.048.03/src/r8168.ko
  DEPMOD  5.4.0-45-generic
make[2]: Leaving directory '/usr/src/linux-headers-5.4.0-45-generic'
make[1]: Leaving directory '/home/lcb/Downloads/r8168-8.048.03/src'
And now there is no wired ethernet due to the failure.

Any ideas, I'm game; thanks in advance. Think it is the missing SSL part? That's my guess.
User avatar
Prsman
Level 4
Level 4
Posts: 318
Joined: Tue Nov 17, 2015 3:15 pm

Re: LM20 ethernet download speed < 20Mbps

Post by Prsman »

I dont mean to hi-jack this post, but I have the same problem as the OP. When i download an ISO the speed is 1.3 Mps, but using speedtest the download speed is over 300Mps. My network card and driver is:

Code: Select all

Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK 
           driver: r8169 v: kernel port: 3000 bus ID: 03:00.0 chip ID: 10ec:8168 
           IF: eno2 state: up speed: 1000 Mbps duplex: full mac: <filter> 
I downloaded the driver and extracted it. But have not installed it as the OP had a problem. I am not looking to re-do the OP problem with updating the driver.
If I chose to live dangerously, do i have to change the permission of the file first (chmod +x autorun.sh) then (sudo ./autorun.sh),or just :

Code: Select all

sudo ./autorun.sh
Thanks
User avatar
antikythera
Level 8
Level 8
Posts: 2201
Joined: Thu Jul 02, 2020 12:52 pm

Re: LM20 ethernet download speed < 20Mbps

Post by antikythera »

Indeed it's autorun.sh and no you do not have to change permissions on it before running it.

@lcb123 - rename r8169.bak to r8169.ko again and then restart the PC.

you should find it in /lib/modules/5.4.0.45-amd64/kernel/drivers/net/ethernet/realtek
Don't take life so seriously, nobody gets out alive anyway!
AMSTRAD CPC6128 - 128KB RAM, 3" Hitachi Floppy Diskette Drive, External Sony Cassette Recorder, Locomotive BASIC 1.1, CTM-644 Monitor
User avatar
Prsman
Level 4
Level 4
Posts: 318
Joined: Tue Nov 17, 2015 3:15 pm

Re: LM20 ethernet download speed < 20Mbps

Post by Prsman »

Success, I opened a terminal in the directory where the file is and entered sudo ./autorun.sh. Script installed new driver with no error. The interface came back up from the script. I dont have any help to offer the OP, but found this : https://tuxbyte.com/how-to-get-your-rea ... ted-guide/
It says to blacklist the old driver which I did not do. Corrupt file?

(EDIT) I compared my log.txt file to one posted by the OP. They are the same except for the kernel in use. The OP failed: modprobe, permission denied. Something with sudo?

Code: Select all

modprobe: ERROR: could not insert 'r8168': Operation not permitted
User avatar
antikythera
Level 8
Level 8
Posts: 2201
Joined: Thu Jul 02, 2020 12:52 pm

Re: LM20 ethernet download speed < 20Mbps

Post by antikythera »

Not sure, they mention using sudo so maybe there's a sudo rights issue on their machine.
Don't take life so seriously, nobody gets out alive anyway!
AMSTRAD CPC6128 - 128KB RAM, 3" Hitachi Floppy Diskette Drive, External Sony Cassette Recorder, Locomotive BASIC 1.1, CTM-644 Monitor
Post Reply

Return to “Ethernet”