Vero 4k+ unable to (auto)negotiate 1gbps on 2.5gbps switch

I’m posting this here as a preliminary “is there a known issue”; I have a Vero4k+ connected to a switch (specifically this one) that has other devices connected at both 2.5gbps and 1gbps speeds, but the vero itself tries and fails to auto-negotiate 1gbps. This shows as a (very) delayed boot up, and sluggish networking performance. Installing ethtool confirms this.

Here’s output of sudo dmesg | grep net :

[    0.877657] audit: initializing netlink subsys (disabled)
[    1.048186] meson6-dwmac c9410000.ethernet: Unable to get resource(264)
[    1.048300] meson6-dwmac c9410000.ethernet: no reset control found
[    1.556868] nf_tables: (c) 2007-2009 Patrick McHardy <kaber@trash.net>
[    1.556888] nf_tables_compat: (c) 2012 Pablo Neira Ayuso <pablo@netfilter.org>
[    1.600138] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    9.207455] meson6-dwmac c9410000.ethernet eth0: fail to init PTP.
[   12.354556] meson6-dwmac c9410000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   14.434516] meson6-dwmac c9410000.ethernet eth0: Link is Down
[   16.514565] meson6-dwmac c9410000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   18.594516] meson6-dwmac c9410000.ethernet eth0: Link is Down
[   20.674555] meson6-dwmac c9410000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

performing an iperf3 confirms 100mb speeds.

Executing this command forces 1gbps and it seems fine:

sudo ethtool -s eth0 speed 1000 duplex full autoneg on

Before I dig deeper I wanted to see if this could be a known issue, and what the ‘best practice’ way of forcing this on the nic at boot is (I know this is debian but it’s certainly highly customized)

The only obvious thing I can see is the switch doesn’t support 10mbps speeds in the “Link partner advertised link modes”

Looks like someone running into a similar issue (with the same driver, at least) with no resolution:
https://forum.odroid.com/viewtopic.php?p=305249#p305249

Hi

It would help to see some full logs so we can ascertain what version of OSMC you are on and the full sequence of events.

What class of cable are you using? Can it be reproduced with Cat5E?
Have you tried a different cable?

OSMC is Debian based – but I’d prefer to get this fixed properly for you

I read the thread briefly but didn’t see any reference to them using the same kernel as us or a 2.5G switch, so not sure it’s related.

Cheers

Sam

Hi Sam,
Yes I’ve tried different cables/ports and it’s the same.

 uname -a
Linux osmc 4.9.113-55-osmc #1 SMP PREEMPT Fri Nov 19 14:03:43 UTC 2021 aarch64 GNU/Linux

Ok, this is concerning… I have other Vero4k+ units available (on the same kernel), and I took one and plugged it in with the same cable/port and it immediately came up no issues with full gigabit… could this be an odd hardware issue?

When you use the previous Vero and you force 1gbps did you try with iperf3 if you get 1gbps?

yes, the problematic vero had a succesful iperf3 run at 1gb… I only ran a quick check, though.

Then I wouldn’t expect it to be a hardware issue if you can get the full gigabit speeds.

Are both devices on the same version?

Can we get the logs as requested?

Hi Sam, yes all my Vero devices are on the same version.
I’ve enabled debug logging: https://paste.osmc.tv/otavugejev
and that seems to have kicked it into correctly negotiating a full 1gbps link. Weird.

Ok, I think I’ve gotten to the bottom of this.
Debug log with a ‘bad’ 100mbps link speed: https://paste.osmc.tv/oxasoloquz
If I leave the osmc remote USB dongle plugged in it seems to cause this issue. I’ll keep playing around to verify (I can swap this dongle out with two others as well).

edit: hmm this might be a red herring… it’s just happening at random now?

Won’t be related.

Try power cycle the switch
Can you try another Ethernet cable?

Sam

I tried power cycling the switch, and this time I swapped all devices around, hoping it’d update any potentially weird arp data in the switch… Seems to be working correctly for now…