Wired Gigabit Ethernet only delivering 100Mb/sec

New to Debian (Or Linux in general)? Ask your questions here!

Wired Gigabit Ethernet only delivering 100Mb/sec

Postby jaja » 2019-10-01 19:00

Hello,
On my Levovo T500 Laptop, my wired Gigabit Ethernet is only delivering 100Mb/sec (Megabit), not 1000Mb/sec (Gigabit).
I'm running Debian 10.1.

What I've tried:
    1) I replaced the CAT6 cable with a new cable. Still 100Mb/sec.
    2) I swapped router hardware connections with another computer. The other computer achieved 1000Mb/sec (Gigabit) on the same router port.
    3) I booted from an MX-Linux live CD, and achieved 1000Mb/sec (Gigabit).
So the CAT6 cable is OK, the router port is OK, and computer can achieve 1000Mb/sec (Gigabit) with a different OS.

I'd appreciate any suggestions on how to get Gigabit speed when using Debian 10.1 on this computer.

Below is the Ethernet information from my computer with Debian 10.1 installed.

Code: Select all
* lspci | grep -i ethernet
00:19.0 Ethernet controller: Intel Corporation 82567LM Gigabit Network Connection (rev 03)


Code: Select all
* ip link show | grep "state UP"
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000


Code: Select all
* ethtool enp0s25
Settings for enp0s25:
   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:  Not reported
   Advertised pause frame use: No
   Advertised auto-negotiation: No
   Advertised FEC modes: Not reported
   Speed: 100Mb/s
   Duplex: Half
   Port: Twisted Pair
   PHYAD: 2
   Transceiver: internal
   Auto-negotiation: off
   MDI-X: off (auto)
   Supports Wake-on: pumbg
   Wake-on: g
   Current message level: 0x00000007 (7)
                drv probe link
   Link detected: yes


Code: Select all
* ethtool -i enp0s25
driver: e1000e
version: 3.2.6-k
firmware-version: 1.8-3
expansion-rom-version:
bus-info: 0000:00:19.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no


Thanks for the help.
jaja
 
Posts: 39
Joined: 2016-01-25 00:20

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

Postby v&n » 2019-10-02 01:44

jaja wrote:
Code: Select all
* ethtool enp0s25
....<snip>....
   Advertised auto-negotiation: No

Have you also tried the 'ethtool ..... autoneg=off' trick following some online tips? Autonegotiation is necessary for gigabit speed.

Please try -
Code: Select all
ethtool -s enp0s25 autoneg on

Then post back the output of 'ethtool enp0s25' if the problem persists.
v&n
 
Posts: 621
Joined: 2015-02-04 02:57

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

Postby jaja » 2019-10-02 04:56

"sudo ethtool -s enp0s25 autoneg on" worked, giving 1000 Mb/sec.
Thank you, v&n!

But the speed reverts back to 100 Mb/sec on the next reboot.

Where are the initial settings located for the Ethernet hardware?
I'd like to correct this "autoneg off" problem at the source, rather than patch down-stream.

As you suggested, I searched online: debian|ubuntu ethtool autoneg off trick|fix
There were many temporary fixes, and a few permanent fixes suggested.
Unfortunately, all of the permanent fixes I tried failed.
They were "out of date", or applied to the wrong version of Linux.
(I tried modifying some "out of date" ones, but failed.)

Below is the information you requested:

Code: Select all
* ethtool enp0s25
Settings for enp0s25:
   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: 1000Mb/s
   Duplex: Full
   Port: Twisted Pair
   PHYAD: 2
   Transceiver: internal
   Auto-negotiation: on
   MDI-X: on (auto)
   Supports Wake-on: pumbg
   Wake-on: g
   Current message level: 0x00000007 (7)
                drv probe link
   Link detected: yes


Thank you for the help.
jaja
 
Posts: 39
Joined: 2016-01-25 00:20

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

Postby v&n » 2019-10-02 05:23

jaja wrote:Where are the initial settings located for the Ethernet hardware?
I'd like to correct this "autoneg off" problem at the source, rather than patch down-stream.

It should be 'on' by default. I don't know if something is changed in Debian 10 or the kernel module to cause this.

As you suggested, I searched online: debian|ubuntu ethtool autoneg off trick|fix
There were many temporary fixes, and a few permanent fixes suggested.
Unfortunately, all of the permanent fixes I tried failed.

Wasn't a suggestion. It was a suspicion that you trying something like that (blindly following online suggestions) could have caused it to turn 'off'.

Regarding the 'fix', it would help, sometimes is necessary, to state exactly what all you have tried. One of the old workarounds used to be adding the command to the /etc/rc.local file. But that file no longer exists in systemd based distros, so newer workarounds maybe needed, like perhaps running the command as a cronjob on reboots. Someone more familiar with systemd may offer a more elegant solution.

But if you have or can get a live iso of same debian version, I'b be curious to know if autonegotiation remains off in the live session as well. Of course I'm suspecting some unwanted configuration issue here. Don't know if it is some recent known bug.
v&n
 
Posts: 621
Joined: 2015-02-04 02:57

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

Postby Head_on_a_Stick » 2019-10-02 17:06

v&n wrote:One of the old workarounds used to be adding the command to the /etc/rc.local file. But that file no longer exists in systemd based distros, so newer workarounds maybe needed, like perhaps running the command as a cronjob on reboots. Someone more familiar with systemd may offer a more elegant solution.

Debian buster now includes systemd-rc-local-generator(8), this will run anything listed in /etc/rc.local automatically if the file exists and is executable.

EDIT: but a udev rule is probably the way to go, for example:
Code: Select all
# /etc/udev/rules.d/10-autoneg.rules
ACTION=="add", SUBSYSTEM=="net", KERNEL=="enp0s25", RUN+="/sbin/ethtool -s enp0s25 autoneg on"

(Untested)
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10599
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

Postby v&n » 2019-10-03 02:17

Head_on_a_Stick wrote:EDIT: but a udev rule is probably the way to go, for example:
Code: Select all
# /etc/udev/rules.d/10-autoneg.rules
ACTION=="add", SUBSYSTEM=="net", KERNEL=="enp0s25", RUN+="/sbin/ethtool -s enp0s25 autoneg on"

(Untested)

The /etc/rc.local method has always appealed to me as the less scary way, but can the udev method handle the 'power-save' mode situations (the EEE feature in newer cards/modules, perhaps including this one we are dealing with here)? I'm not sure, maybe syslog could give a clue. But if so, then udev should definitely be the preferred way to go.
v&n
 
Posts: 621
Joined: 2015-02-04 02:57

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

Postby jaja » 2019-10-03 21:39

Hello,
I found the modification that triggered the problem,
and how to permanently work-around it;
but not how to fix the problem at its source.
I'm posting this information for others.

Several months ago, I enabled control of the wired Ethernet connections by the "Network Manager".
(see: wiki.debian.org/NetworkManager#Wired_Networks_are_Unmanaged).
This modification gave me a popup window (among other notifications) whenever the wired Ethernet was connected/disconnected.

I applied this modification to three computers.
It did NOT effect the speed of the first two computers (both remained at Gigabit).
But on the third computer, the speed dropped from Gigabit to 100 Mb/sec (which I didn't discover until recently).

Last night, when I found the trigger for the speed drop, I also found a permanent work-around.
(see in Debian 10.1: /usr/share/doc/ethtool/README.Debian)

Below is the "Network Manager" modification which triggered the speed drop, and a permanent work-around:
* Enable control of wired Ethernet connections by "Network Manager" (triggers speed drop):
(see: wiki.debian.org/NetworkManager#Wired_Networks_are_Unmanaged).
Code: Select all
  sudo vi /etc/NetworkManager/NetworkManager.conf
  . Change "managed=false" to "managed=true"


* Permanent work-around (only needed by one computer):
(see in Debian 10.1: /usr/share/doc/ethtool/README.Debian)
Code: Select all
  sudo vi /etc/network/interfaces
  . After the line "iface enp0s25 inet dhcp", add: "ethernet-autoneg on"


I still don't know why only one computer slows down, while the other two computers maintain Gigabit.
I'm guessing it's due to the difference in hardware:
    Computer #1 (Gigabit): Realtek Gigabit controller
    Computer #2 (Gigabit): Realtek Gigabit controller
    Computer #3 (100 Mb/sec): Intel 82567LM Gigabit controller
The two Realtek controllers maintain their top speeds (Gigabit). But the Intel controller reduces its speed (100 Mb/sec).

My chosen solution is to remove the modification to the "Network Manager".
I want applications that work cleanly on ALL my computers (no "band-aids" or "work-arounds").

If you have any ideas on how to trace the problem to its source and fix it there (?fix the driver?), please let me know.

Everyone, thank you for the help. I appreciate your efforts.
jaja
 
Posts: 39
Joined: 2016-01-25 00:20

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

Postby v&n » 2019-10-04 01:40

I don't think Network Manager can be the culprit here. Because any connection management tool is not supposed to interfere with connection speed unless you explicitly tell it to (like the workaround you used). What you found is NM's capability to force a command/parameter, just like the three other suggested workarounds (cron, rc.local and udev). But if you are right and it was indeed caused by NM, then it is a bug in NM.

Negotiating and establishing the optimal 'Shake-Hand' speed is the role of driver, and if it is failing to do so, it should be considered a bug in the driver itself unless it is caused by some external factor. There are several customizable parameters available in the e1000e module, and the failure to seek the optimal connection speed may be due to the 'Default value' of any of them (I suspect the 'EEE=1' the most). See the "Command Line Parameters" section in e1000e readme file for detailed description of these parameters (can be read online here : https://gist.github.com/pklaus/319367)

But turning autonegotiation off should still be considered a bug (in whatever is causing it), again - unless it is caused by some external customization done in past that is still effective. It should remain 'on' by default even if the 'optimal' speed is not achieved during shake-hand.

The possibility of it being a bug can be confirmed if you could do the testing on a clean live session of the same version.
v&n
 
Posts: 621
Joined: 2015-02-04 02:57


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable