Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Wired Gigabit Ethernet only delivering 100Mb/sec

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
jaja
Posts: 53
Joined: 2016-01-25 00:20
Has thanked: 1 time

Wired Gigabit Ethernet only delivering 100Mb/sec

#1 Post by jaja »

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.

v&n
Posts: 624
Joined: 2015-02-04 02:57

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

#2 Post by v&n »

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.

jaja
Posts: 53
Joined: 2016-01-25 00:20
Has thanked: 1 time

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

#3 Post by jaja »

"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.

v&n
Posts: 624
Joined: 2015-02-04 02:57

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

#4 Post by v&n »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

#5 Post by Head_on_a_Stick »

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)
deadbang

v&n
Posts: 624
Joined: 2015-02-04 02:57

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

#6 Post by v&n »

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.

jaja
Posts: 53
Joined: 2016-01-25 00:20
Has thanked: 1 time

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

#7 Post by jaja »

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.

v&n
Posts: 624
Joined: 2015-02-04 02:57

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

#8 Post by v&n »

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.

jaja
Posts: 53
Joined: 2016-01-25 00:20
Has thanked: 1 time

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

#9 Post by jaja »


User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: Wired Gigabit Ethernet only delivering 100Mb/sec

#10 Post by sunrat »

jaja wrote:A better solution is posted here: http://forums.debian.net/viewtopic.php? ... 0&p=735631
I hope you realise now that opening two threads for the same issue means it takes twice as long to find a solution. :mrgreen:
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply