You are not logged in.

#1 2022-02-26 07:13:24

HCF
Member
Registered: 2016-04-10
Posts: 29

[SOLVED] Manually Assign Kernel Driver to Single NIC

I have two NICs, one of which is a RTL8125 2.5GbE Controller. It was unable to negotiate the advertised link speed out-of-the-box, which is why I've installed the r8125-dkms package. My hope is/was that this would fix the link speed.

lspci -l yields the following, indicating the NIC is not using the correct driver. If I was to blacklist the r8169 kernel driver to force the use of r8125, the second NIC would get disabled, which I do not want to do.

01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
	Subsystem: ASRock Incorporation Device 8125
	Kernel driver in use: r8169
	Kernel modules: r8169, r8125
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0e)
	Subsystem: ASRock Incorporation Motherboard (one of many)
	Kernel driver in use: r8169
	Kernel modules: r8169

How do I manually assign a kernel driver to a single NIC (r8125), or selectively blacklist a specific kernel driver for a single NIC (r8169)?

Any help would be appreciated smile

Last edited by HCF (2022-03-09 01:02:14)

Offline

#2 2022-02-26 08:12:27

seth
Member
Registered: 2012-09-03
Posts: 51,324

Re: [SOLVED] Manually Assign Kernel Driver to Single NIC

https://wiki.archlinux.org/title/Modali … _come_from?
https://web.archive.org/web/20200112010 … dware.html

Aliasing the relevant pci entry  (vendor/model/glob, see "lspci -nn") "off" might help, https://wiki.archlinux.org/title/Kernel_module#Aliasing

But in you case you'll likely get away w/ loading r8125 ahead (eg. move it to the initramfs or blacklist the r8169 module and only load it explicitly afterwards)

Offline

#3 2022-02-26 08:44:04

HCF
Member
Registered: 2016-04-10
Posts: 29

Re: [SOLVED] Manually Assign Kernel Driver to Single NIC

Moving it to the initramfs did the trick, thank you!

Still not negotiating at the right link speed (10000baseT/Full vs 2500baseT/Full), but at least the correct kernel driver is now loaded.


Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	                        2500baseT/Full
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	                        2500baseT/Full
	Advertised pause frame use: No
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  1000baseT/Full
	                                     10000baseT/Full
	                                     2500baseT/Full
	                                     5000baseT/Full
	Link partner advertised pause frame use: No
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 1000Mb/s
	Duplex: Full
	Auto-negotiation: on
	Port: Twisted Pair
	PHYAD: 0
	Transceiver: internal
	MDI-X: Unknown
	Supports Wake-on: pumbg
	Wake-on: g
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
	Link detected: yes

At the risk of pivoting somewhat off-topic, would you happen to know why this would be the case? I read through https://bbs.archlinux.org/viewtopic.php?id=262075, however running that command completely freezes my system.

Offline

#4 2022-02-26 08:55:54

seth
Member
Registered: 2012-09-03
Posts: 51,324

Re: [SOLVED] Manually Assign Kernel Driver to Single NIC

running that command completely freezes my system

On the r8125 or r8169 module or both?
Because of the autonegotiation not getting up to 2500, is this a cat7 or higher cable?
(cat6 is insufficient and cat6a is an unreliable ISO/IEC vs. EIA/TIA mess; so maybe works - maybe not)

Offline

#5 2022-02-26 09:44:57

HCF
Member
Registered: 2016-04-10
Posts: 29

Re: [SOLVED] Manually Assign Kernel Driver to Single NIC

The same cable previously worked great at 10000Mb/s (CPU died so had to migrate my Arch install over to another box), so that's definitely not it.

This time I managed to see the result--the system froze soon after.

	Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	                        2500baseT/Full
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  2500baseT/Full
	Advertised pause frame use: No
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Speed: Unknown!
	Duplex: Unknown! (255)
	Auto-negotiation: on
	Port: Twisted Pair
	PHYAD: 0
	Transceiver: internal
	MDI-X: Unknown
	Supports Wake-on: pumbg
	Wake-on: g
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
	Link detected: no

Last edited by HCF (2022-02-26 09:45:29)

Offline

#6 2022-02-26 15:50:26

seth
Member
Registered: 2012-09-03
Posts: 51,324

Re: [SOLVED] Manually Assign Kernel Driver to Single NIC

Link detected: no

The carrier breaks away.
Is this on the r8125-dkms or r8169 module?
"network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software" sounds like there's no 2.5Gbps support and according to https://github.com/TallGuy74/r8125 there're some options (check modinfo) that allow to set the speed… up to 1000Mbps  hmm
Did you ever try enforcing the speed on the r8169 module?

Offline

#7 2022-02-26 20:51:57

HCF
Member
Registered: 2016-04-10
Posts: 29

Re: [SOLVED] Manually Assign Kernel Driver to Single NIC

Same result for both r8125 and r8169.

The GitHub readme doesn't sound too promising, seems like 2500m is indeed not supported for now. That's what I get for once not sticking to Intel NICs big_smile

Thanks for your help!

Last edited by HCF (2022-02-26 20:52:20)

Offline

#8 2022-02-27 10:55:23

hkall
Member
Registered: 2019-11-11
Posts: 18

Re: [SOLVED] Manually Assign Kernel Driver to Single NIC

RTL8125 works with r8169 at 2.5Gbps for me (with a GS110MX Multi-Gig switch). Check your dmesg log, there should be a downshift info. Most likely the issue is on the physical side.

Offline

#9 2022-02-27 20:29:04

HCF
Member
Registered: 2016-04-10
Posts: 29

Re: [SOLVED] Manually Assign Kernel Driver to Single NIC

I did some further reading and it sounds like multi-gig requires a switch for link speed negotiation (thanks for pointing me in the right direction hkall). As I am running a point-to-point connection into an Intel X550, multi-gig does not seem to be supported.

Offline

#10 2022-02-27 22:27:10

hkall
Member
Registered: 2019-11-11
Posts: 18

Re: [SOLVED] Manually Assign Kernel Driver to Single NIC

Also back to back connectivity should work as long as both link partners support auto-negotiation. Some people reported that the X550 driver doesn't advertise NBase-T modes per default, and e.g. 2.5Gbps has to be activated manually.
-> https://forums.unraid.net/bug-reports/p … ink-r1587/
However your ethtool output shows that the link partner advertises 2.5Gbps, so this may not be the root cause here.

Offline

#11 2022-02-28 05:32:42

HCF
Member
Registered: 2016-04-10
Posts: 29

Re: [SOLVED] Manually Assign Kernel Driver to Single NIC

I took this as an excuse to finally buy a 10G switch (MikroTik CRS305-1G-4S+IN); will update this thread once it arrives. Fingers crossed!

Offline

#12 2022-02-28 18:18:55

seth
Member
Registered: 2012-09-03
Posts: 51,324

Re: [SOLVED] Manually Assign Kernel Driver to Single NIC

Offline

#13 2022-03-01 04:51:05

HCF
Member
Registered: 2016-04-10
Posts: 29

Re: [SOLVED] Manually Assign Kernel Driver to Single NIC

To clarify, the network itself is working perfectly fine, just not at the link speed I would like.

Offline

#14 2022-03-09 01:03:44

HCF
Member
Registered: 2016-04-10
Posts: 29

Re: [SOLVED] Manually Assign Kernel Driver to Single NIC

Confirming that using a switch fixed the link speed, everything is now working as expected. The r8125 kernel driver was not needed.

Offline

Board footer

Powered by FluxBB