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

 

 

 

Enabling wired Ethernet drops speed from 1Gb/s to 100Mb/s

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

Enabling wired Ethernet drops speed from 1Gb/s to 100Mb/s

#1 Post by jaja »

Hello,
System:
Levovo T500 Laptop
Debian 10.8 (all updates installed)
KDE Desktop

I have a program that requires enabling "Network Manager" support for my wired Ethernet.
Unfortunately, when I enabled "Network Manager" support for my wired Ethernet, and rebooted; the speed on my wired Ethernet dropped from 1Gb/s to 100Mb/s.

Below are the details of what I've tried, so far.

I enabled "Network Manager" support for my wired Ethernet by editing "/etc/networkMnager/NetworkManager.conf", and changed "managed=false" to "managed=true", then rebooted.

Original "/etc/networkMnager/NetworkManager.conf":

Code: Select all

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false
New "/etc/networkMnager/NetworkManager.conf":

Code: Select all

[main]
plugins=ifupdown,keyfile

[ifupdown]
#managed=false
managed=true
Again, rebooting after this change dropped my wired Ethernet speed from 1Gb/s to 100Mb/s.

Also, hotplugging (unplug/plug Ethernet cable) did not reset the speed. It remained at 100Mb/s.

Online research said that my port speed should be configured in "/etc/network/interfaces".
So I tried fixing this problem with the following edits to this file (3 test edits shown below).

Original "/etc/network/interfaces":

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp0s25
iface enp0s25 inet dhcp
Test #1: Completely removing wired Ethernet interface (use system defaults).
Result: After reboot, speed remained at 100Mb/s. After hotplugging, speed remained at 100Mb/s.

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug enp0s25
#iface enp0s25 inet dhcp
Test #2: Forcing 1Gb/s for wired Ethernet interface.
Result: After reboot, speed remained at 100Mb/s. After hotplugging, speed remained at 100Mb/s.

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp0s25
iface enp0s25 inet dhcp
ethernet-autoneg off
link-speed 1000
Test #3: Adding auto-negotiation to wired Ethernet interface.
Result: After reboot, speed returned to 1Gb/s. But after hotplugging, speed dropped to 100Mb/s.

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp0s25
iface enp0s25 inet dhcp
ethernet-autoneg on
* Summary:
  • - All three tests failed after hotplugging; speed remained at 100Mb/s.
    - Tests #1 & #2 failed after reboot; speed remained at 100Mb/s.
    - Test #3 ("ethernet-autoneg on") succeeded after reboot (1Gb/s); but failed after hotplugging, speed dropped back to 100Mb/s.
* Questions:
  • - Test #2 ("link-speed 1000") should have forced the speed to 1Gb/s. Why did the speed remain at 100Mb/s?
    - Why did Test #3 ("ethernet-autoneg on") succeed after reboot (1Gb/s); but fail after hotplugging (100Mb/s)?
    - If the problem was caused by initially enabling support in "Network Manager", shouldn't it be fixed by an option within "/etc/networkMnager/NetworkManager.conf"; not within "/etc/network/interfaces"?
Any help appreciated.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Enabling wired Ethernet drops speed from 1Gb/s to 100Mb/

#2 Post by p.H »

jaja wrote:I enabled "Network Manager" support for my wired Ethernet by editing "/etc/networkMnager/NetworkManager.conf", and changed "managed=false" to "managed=true"
Don't do that. It will cause only trouble.

Network interfaces configured in /etc/network/interfaces are managed by the "networking" service. If you want an interface to be managed by NetworkManager, do not configure it in /etc/network/interfaces.

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

Re: Enabling wired Ethernet drops speed from 1Gb/s to 100Mb/

#3 Post by jaja »

p.H, thank you for the response.
If you want an interface to be managed by NetworkManager, do not configure it in /etc/network/interfaces.
Where should I configure an interface to be managed by NetworkManager?

If you could point me as some documentation to study, I'd appreciate it. (It appears that I've misunderstood what I've been reading, so far.)

Thank you for the help.

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Enabling wired Ethernet drops speed from 1Gb/s to 100Mb/

#4 Post by arzgi »

Debian wiki is a good place to search Debian related subjects.

https://wiki.debian.org/NetworkManager

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Enabling wired Ethernet drops speed from 1Gb/s to 100Mb/

#5 Post by p.H »

NetworkManager automatically manages ethernet and wireless interfaces using DHCP by default. If you need extra manual configuration, you can use nmcli in the command line or the NetworkManager graphic applet which should be available in your desktop environment.

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

Re: Enabling wired Ethernet drops speed from 1Gb/s to 100Mb/

#6 Post by jaja »

Hello "arzgi";
Thank you for your response.

Unfortunately, before posting here, I started with the Debian WIKI page you are suggesting.

According to this Debian wiki: https://wiki.debian.org/NetworkManager# ... _Unmanaged
Wired Networks are Unmanaged
As of Debian 6.0 "Squeeze", NetworkManager does not manage any interface defined in /etc/network/interfaces by default.
So, I tried removing the wired Ethernet from "/etc/network/interfaces"; but that failed to enable wired Ethernet with "Network Manager" (a variation of Test #1).

Further information from this Debian wiki: https://wiki.debian.org/NetworkManager# ... Management
Enabling Interface Management
If you want NetworkManager to handle interfaces that are enabled in /etc/network/interfaces:
Set managed=true in /etc/NetworkManager/NetworkManager.conf.
So, as instructed by this WIKI, I enabled the wired Ethernet by "managed=true" in "/etc/NetworkManager/NetworkManager.conf"; (which is where my original post begins).

Further web searches led me to instructions on how to configure "/etc/network/interfaces", which all had issues.
So I distilled all of my tests down to 3 test examples, and posted them here for help.

Thanks for taking a shot.

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

Re: Enabling wired Ethernet drops speed from 1Gb/s to 100Mb/

#7 Post by jaja »

I believe that I've found a fix which only uses modifications within "Network Manager".
This fix does *NOT* require modifying "/etc/network/interfaces".

This fix enables control of the wired Ethernet within the "Network Manager" ("/etc/networkMnager/NetworkManager.conf"), and creates a "Network Manager Dispatcher Script" to detect and reset the speed to 1 Gb/s after an unplug/plug event.
(See: "DISPATCHER SCRIPTS" in "man 8 networkmanager" or "https://manpages.debian.org/stretch/net ... .8.en.html".)

Remove prior modifications:
  • Restore "/etc/network/interfaces" to its original state.
    Restore "/etc/networkMnager/NetworkManager.conf" to its original state.
Enable wired Ethernet within "Network Manager":
  • sudo vi "/etc/networkMnager/NetworkManager.conf"

Code: Select all

[main]
plugins=ifupdown,keyfile

[ifupdown]
#managed=false
managed=true
Create "Network Manager Dispatcher Script" named "FIX" to detect unplug/plug events and reset speed to 1 Gb/s:
  • sudo vi /etc/NetworkManager/dispatcher.d/pre-up.d/FIX

Code: Select all

/bin/sh
if [ "$1" = "enp0s25" ] && [ "$2" = "pre-up" ]; then
 ethtool -s "$1" speed 1000 duplex full
fi
  • sudo chmod 0755 /etc/NetworkManager/dispatcher.d/pre-up.d/FIX
    sudo reboot
So far, this fix has passed all of my tests.
I hope this info helps someone else.

Everyone, thanks for the help!
Last edited by jaja on 2021-03-15 11:10, edited 1 time in total.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Enabling wired Ethernet drops speed from 1Gb/s to 100Mb/

#8 Post by p.H »

jaja wrote:managed=true
I repeat : this is not needed if the interface is not defined in /etc/network/interfaces or any sourced file.

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

Re: Enabling wired Ethernet drops speed from 1Gb/s to 100Mb/

#9 Post by jaja »

p.H wrote:
jaja wrote:managed=true
I repeat : this is not needed if the interface is not defined in /etc/network/interfaces or any sourced file.
p.H, thank you for reminding me.
When using "Network Manager", it's probably "best practice" to disable all references to the wired Ethernet within "/etc/network/interfaces" (as recommended by "p.H"), thus placing the configuration under the control of "Network Manager", not partially under something else.

So, instead of editing: "/etc/networkManager/NetworkManager.conf", and changing "managed=false" to "managed=true";
I should be editing: "/etc/network/interfaces", and disabling all references to the wired Ethernet ("enp0s25"):
ORIGINAL "/etc/network/interfaces":

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp0s25
iface enp0s25 inet dhcp
DISABLED wired Ethernet in "/etc/network/interfaces":

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

## The primary network interface
#allow-hotplug enp0s25
#iface enp0s25 inet dhcp
Also, be sure to check on sourced files ("/etc/network/interfaces.d/*").

I was curious how often references to the wire Ethernet were contained in "/etc/network/interfaces". So I checked several of my computers. The wired Ethernet interface WAS DEFINED in "/etc/network/interfaces" on all of the fully configured ones. I also checked a fresh minimal KDE install, and found that the wired Ethernet interface was *NOT* DEFINED in "/etc/network/interfaces" on it. So the location of the configuration for the wired Ethernet interface can vary by installation. That means that when using "Network Manager", you should be sure to disable all references to the wired Ethernet within "/etc/network/interfaces" (as recommended by "p.H").

Thanks everyone for the help.

Post Reply