Linux disables ethernet auto-negotiation on plugging-in the cable?

fal*_*ats 9 linux ethernet networkmanager network-interface

I recently noticed I am only getting 100Mbit/s of througput on my gigabit home network.

When looking into it with ethtool I found my ArchLinux Box was using 100baseT/Half as link speed instead of 1000baseT/Full which its NIC and the switch connected to it support.I am not sure why but the NIC seems to not be advertising its link-modes according to ethtool:

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

When enabling auto-negotioation explicitly by running ethtool --change enp0s31f6 autoneg on it seems to advertise all its modes to the switch and uses 1000baseT/Full.

That only works most of the time and for a while though. When I unplug the cable and pluggin it back in switches autoneg off most of the time, but not always. Also, sometimes setting autoneg to on immediately disables it again. Rebooting also disables it again.

Note that auto-negotiation does not get disabled when unplugging but when replugging. dsmeg logs this when autoneg was enabled and I plug in a cable:

[153692.029252] e1000e: enp0s31f6 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[153699.577779] e1000e: enp0s31f6 NIC Link is Up 100 Mbps Half Duplex, Flow Control: None
[153699.577782] e1000e 0000:00:1f.6 enp0s31f6: 10/100 speed: disabling TSO
Run Code Online (Sandbox Code Playgroud)

I am using the intel NIC of my asrock motherboard (from ~2015) and an unmanaged switch (Netgear GS208).

fal*_*ats 12

经过数小时的搜索,我在最明显的地方找到了解决方案:

NetworkManager 似乎以某种方式在我的以太网端口的设置中禁用了自动协商:

连接 - KDE 系统设置

奇怪的是,即使在知道 NetworkManager 可以更改以太网链接模式后,我什至找不到在线详细说明该功能的单一来源。根据我找到的谷歌搜索结果,唯一的方法是通过ethtool.