In a NetworkManager profile, you can set the ethernet.{auto-negotiate,duplex,speed} settings.
If you leave them all unset (the default), NetworkManager won't touch the settings of the device when activating the profile. Otherwise, it will set them.
When deactivating the profile, NetworkManager currently does not restore the previous settings. It must.
That is especially a problem, because if your interface has the wrong speed settings, then it won't get carrier. And you won't be able to activate a profile on a device that has no carrier (at least not if the profile uses DHCP or other IP addressing methods that require carrier).
Example:
- have a profile that sets speed settings (e.g. by disabling autoneg)
- activate profile.
- unplug cable (connection goes down, the ethtool settings are left at the previous speed settings)
- plug cable into another port, where the other side does not support the set ethtool settings.
The result is that the link won't get carrier, and you won't be able to activate the profile to set different speed settings.
TODO:
1) during disconnect, by default the previous settings (if NM changed them) must be restored. Usually, that means to restore autoneg because that's the default.
2) we should have a per-device configuration, that instead tells NetworkManager to always restore an explicit other setting (and not the one that was found before activating the profile).
Upstream bug: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/356#note_407786
3) possibly there should be a D-Bus API to set the ethtool settings of a device. Because even with 1) and 2), you still can get into a situation where you just won't be able to activate a profile.
the problem is, how would anybody know how to use this API. E.g. if a user (or worse: some application) runs into this issue, how could it possibly know that changing the ethtool settings is the right way to fix it?
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (NetworkManager bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:4499
In a NetworkManager profile, you can set the ethernet.{auto-negotiate,duplex,speed} settings. If you leave them all unset (the default), NetworkManager won't touch the settings of the device when activating the profile. Otherwise, it will set them. When deactivating the profile, NetworkManager currently does not restore the previous settings. It must. That is especially a problem, because if your interface has the wrong speed settings, then it won't get carrier. And you won't be able to activate a profile on a device that has no carrier (at least not if the profile uses DHCP or other IP addressing methods that require carrier). Example: - have a profile that sets speed settings (e.g. by disabling autoneg) - activate profile. - unplug cable (connection goes down, the ethtool settings are left at the previous speed settings) - plug cable into another port, where the other side does not support the set ethtool settings. The result is that the link won't get carrier, and you won't be able to activate the profile to set different speed settings. TODO: 1) during disconnect, by default the previous settings (if NM changed them) must be restored. Usually, that means to restore autoneg because that's the default. 2) we should have a per-device configuration, that instead tells NetworkManager to always restore an explicit other setting (and not the one that was found before activating the profile). Upstream bug: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/356#note_407786