Device in question: lsusb tells me ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
This is a Monoprice branded USB-A 3 adapter.
Running Ubuntu 20.04.6 LTS
In network manager, the connection says Speed: 1 GB/s
When I plug this USB-Ethernet device into a gig switch, that works fine.
But I frequently plug into devices that only support 100 Mbit. When I do, I get:
# mii-tool enx00e04c680835
enx00e04c680835: 10 Mbit, full duplex, no link
If I force it, it will eventually get a dhcp address and stay on the network at 100 Mbit, but if I only run mii-tool --force=100baseTx-FD enx00e04c680835
once, it'll momentarily say enx00e04c680835: 100 Mbit, full duplex, no link
but then revert to 10...no link
Sometimes I get lucky and it'll work first time, but usually it takes several tries before it flips to "link ok". i.e. if I run mii-tool every second:
enx00e04c680835: 10 Mbit, full duplex, no link
enx00e04c680835: 10 Mbit, full duplex, no link
enx00e04c680835: 100 Mbit, full duplex, no link
enx00e04c680835: 100 Mbit, full duplex, no link
enx00e04c680835: 100 Mbit, full duplex, no link
enx00e04c680835: 10 Mbit, full duplex, no link
enx00e04c680835: 10 Mbit, full duplex, no link
enx00e04c680835: 10 Mbit, full duplex, no link
enx00e04c680835: 100 Mbit, full duplex, no link
enx00e04c680835: 100 Mbit, full duplex, no link
enx00e04c680835: 100 Mbit, full duplex, link ok
enx00e04c680835: 100 Mbit, full duplex, link ok
Repeatability: I have two of these dongles, and the bad behaviour is consistent across both of them, so it's a software issue, not a hardware one. I also tried an Apple-branded USB-A to 100 Mbit dongle, and that works. I also tried a "USB-A 3 hub with ethernet" from Monoprice, and that works without need for mii-tool either.
This started happening a few months ago; it used to work just fine. Did something change in the driver? in Network Manager? I'm stumped what is messing with my device.