You are not logged in.

#1 2021-02-06 20:05:50

piedro
Member
Registered: 2013-04-11
Posts: 218

[Solved] - How to permanently set the speed of my ethernet device?

Hello!

Since some time (sorry I can't pinpoint exactly wht changed) my onboard intel chip network device only uses 100 Mb/s for connection speed. Before it has been 1000 Mb/s with full duplex.

So I used

ethtool -s enp0s25 speed 1000
ethtool -s enp0s25 duplex full
ethtool -s enp0s25 autoneg on

to fix it.

So that's fine now. But I have no clue how to make that change sticky so the network interface starts up again on full speed like it used to do.

I'd really appreciate some help.

What exactly controls the network device settings on startup? 
What do I have to change there to make it start up with full speed again?

Thanks!

Last edited by piedro (2021-02-17 06:55:49)

Offline

#2 2021-02-07 07:33:36

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] - How to permanently set the speed of my ethernet device?

You'll have to use a script in yoru network managing service or a udev rule or a systemd service.
What's the output of ethtool before you change the parameters?
Which NIC model is thatin particular (check "lspci -k")?

Offline

#3 2021-02-07 17:30:34

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: [Solved] - How to permanently set the speed of my ethernet device?

Hmm, thanks...
Well, here is the output of ethtool:

> 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: Full
        Auto-negotiation: off
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        MDI-X: off (auto)
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes

...and the information on the chip:

> lspci -k

...
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection (2) I218-V
        Subsystem: ASRock Incorporation Device 15a1
        Kernel driver in use: e1000e
        Kernel modules: e1000e
...

This must have been messed up by some recent update... I am very sure that the 1000Mb/s full duplex has been turned on during startup before. Maybe it's enough to set the "autonegotiation on" again?

Thanks for having a look at this!

Cheers, p.

Offline

#4 2021-02-07 17:45:29

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: [Solved] - How to permanently set the speed of my ethernet device?

I never experienced (or hear of) NICs that offer GigaLAN mode boot into a slower state.  What are you using to manage your network?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2021-02-07 17:49:07

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [Solved] - How to permanently set the speed of my ethernet device?

Auto-negotiation should always be on by default as far as I know.
If you use network manager, check that its configuration does not disable it.

Last edited by progandy (2021-02-07 17:51:16)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

#6 2021-02-07 21:31:35

tbg
Member
Registered: 2017-06-22
Posts: 72

Re: [Solved] - How to permanently set the speed of my ethernet device?

I seem to recall this issue happening with some Intel adapters recently. If I recall correctly, switching to the LTS kernel worked around the issue. Worth a try if you don't mind using the LTS kernel, if not then I guess you'll need to write a service (or other alternate method).

Offline

#7 2021-02-07 22:35:10

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: [Solved] - How to permanently set the speed of my ethernet device?

Yes - this is an onboard Intel chip. But nothing exotic at all! 

But since I use KDE with a nvidia graphics adapter, I'd rather do not want to switch to the LTS kernel.
(though I will test this with the next reboot...)

So: How do I force "autonegotiation on" at boot?

It's an arch default setup - I haven't changed any network managers as far as I know...

Any suggestions?

thx a lot, p.

Offline

#8 2021-02-07 22:39:32

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: [Solved] - How to permanently set the speed of my ethernet device?

Right but which networkmanager are you using?  If possible, try a simple systemd-network config assuming you're using some graphical client.  Same problem?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2021-02-08 07:34:43

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] - How to permanently set the speed of my ethernet device?

Just don't forget to install nvidia-lts.
Do you use a parallel windows installation? (See the 3rd link in my signature - if you don't disable autonegotiation, maybe a dormant windows does…)

There's no "default" setup, you're using the NIC-controlling service you selected the way you configured it.
Since you don't seen to know which that is, the typical answer is "many, tripping over each other".
Please post the output of "sudo journalctl -b"

Offline

#10 2021-02-12 07:42:16

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: [Solved] - How to permanently set the speed of my ethernet device?

Hello @seth

Thank you for your hints!

After checking the journalctl -b I decided that this is a bit too long to post here.

Also I felt a bit insecure about publishing this whole file... ignorance breeds fear!

But I checked the Arch Wiki for network managers and after trying to start every single one mentioned, it turns out

Systemd-networkd is installed but disabled. But KDE seems to use NetworkManager. So Ichecked into the Settings of KDE and found the configuration GUI for the network interface.

Here the autonegotiation has been turned off!

So I tested this: If I turn "autonegotiation on" for the enp0s25 network device the device speed immediatly switches to full speed duplex with 1000Mb/s !

So thanks for your patience and help!

Solved!

Cheers!
p

Offline

#11 2021-02-12 08:14:49

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] - How to permanently set the speed of my ethernet device?

After checking the journalctl -b I decided that this is a bit too long to post here.

See the very first link in my signature ;-)

Also I felt a bit insecure about publishing this whole file

The journal is not supposed to contain private data - might be some embarrassing stuff, though smile
(Hostname, SSID, username, maybe audits when you tried something like

$ give me porn
zsh: command not found: give
$ sudo give me porn # https://xkcd.com/149/

If I turn "autonegotiation on" for the enp0s25 network device the device speed immediatly switches to full speed duplex with 1000Mb/s !

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB