Score:1

Ubuntu 22.04 force ethernet to 100Mbit/s

pw flag

Since upgrade from 20.04 to 22.04 my NIC tries to connect with 1Gbit/s, but due to cable issues max 100Mbit/s works stable.

How to force NIC to 100Mbit/s permanently the proper way, meaning by not changing entire Ubuntu system?

ethtool would read like ethtool -s enp1s0f0 speed 100 duplex full autoneg off, but this gets lost during reboot.

I found those hints how to configure static IP with netplan, i.e. copy the default one into 02-static-ip.yaml and make your changes. But those examples only showed how to change information, that are provided by the DHCP mainly,but nothing about how to change to fixed link speed.

Pilot6 avatar
cn flag
Is it a desktop or a sever?
Ulsi avatar
pw flag
This is a Desktop PC.
Score:1
cn flag

You can do it using NM CLI.

Check the name of your connection by

nmcli c show

If your connection is "Wired Connection 1", run:

nmcli c edit "Wired connection 1"
goto ethernet
set auto-negotiate no
set speed 100
set duplex full
back
save persistent
quit

Disconnect and connect the interface. You are done!

Pilot6 avatar
cn flag
It looks like they removed it from Gnome :-(
Ulsi avatar
pw flag
Yes, already under 20.04.
Pilot6 avatar
cn flag
I checked it. Now it really works. Duplex needs to be set.
Ulsi avatar
pw flag
Went back to Ubuntu to try out above solution, and while running nmcli and failed with missing parameters, the link came upwith 1Gbit/s. Took photo of provided solution, in case i will have issue back during next reboot. For the moment i can't neither confirm nor disagree that above provided solution works for. Still one question open: Is there a config file in which i can configure the link?
Pilot6 avatar
cn flag
What do you mean by "failed with missing parameters"?
Ulsi avatar
pw flag
"failed with missing parameters"; when running nmcli first, i didn't have the connection name, as Gnome didn't show anything in the profile name. I was directed to "man nmcli", found "nmcli general", and ran this twice. As non-rootit showed "connectivity no", and right afterwrads, as root, this changed to "full". Will check this several times during next days to see, if 1Gbit/s is now stable and comes up fast. In Windows, forcing to 100Mbit/s improved situation very much, as it connects drectly w/ 100Mbit/s )not a big of a loss, when only internet router w/ 50Mbit/s is connected.)
Pilot6 avatar
cn flag
You an get the name by `nmcli c show`
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.