2.5Gb NIC not detecting in 12.0-U4 RTL8125

Hyacin

Cadet
Joined
Oct 21, 2021
Messages
6
Alright, I made some good progress this evening backporting the 13.0 module (which is when it will be officially supported) to 12.2 -

Code:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  2.06 GBytes  1.77 Gbits/sec  209             sender
[  5]   0.00-10.00  sec  2.06 GBytes  1.77 Gbits/sec                  receiver

iperf Done.
root@rtl_test:/boot/modules # ifconfig ue0
ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=60009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 5c:85:7e:31:42:8b
        inet 10.50.10.11 netmask 0xffffff00 broadcast 10.50.10.255
        media: Ethernet Other <full-duplex> (2500Base-X <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
root@rtl_test:/boot/modules # uname -a
FreeBSD rtl_test 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC  amd64
root@rtl_test:/boot/modules #


That's on my test box ... I'll try it on my PR4100 tomorrow I think, I'm zonked.

I wish I could outline exactly how I did it as sharing a binary kernel module is sketchy af ...

I think the gist of it was -

* check out the the commit with the most recent change to if_ure.c or if_urereg.h
* copy those two files, plus usbdevs and usb.h out of the tree
* check out tags/release/12.2.0
* copy those files back in
* go to sys/dev/modules/usb/ure (or whatever it is) and `make`
* kldload the resulting kernel module

Oh, wait, no, I forgot, I also had to handpatch in the ether_is_zero function from here - https://forums.freebsd.org/threads/rtl8153-usb-nic-help.66172/

That took a lot of fighting and figuring to accomplish, so I'm glad it appears to have worked.
 

Hyacin

Cadet
Joined
Oct 21, 2021
Messages
6
Yeah, that wasn't too long that I couldn't resist trying it out, lol ...


Code:
root@freenas[/boot/modules]# ifconfig -l
re0 re1 lo0 pflog0 lagg0 bridge0 vnet0.2
root@freenas[/boot/modules]# kldunload if_ure.ko
root@freenas[/boot/modules]# kldload if_ure_new.ko
root@freenas[/boot/modules]# ifconfig -l
re0 re1 lo0 pflog0 lagg0 bridge0 vnet0.2 ue0
root@freenas[/boot/modules]#


Code:
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.00  sec  1.60 GBytes  1.37 Gbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
^Ciperf3: interrupt - the server has terminated
root@freenas[/mnt/raid-z/plots]# ifconfig ue0
ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=60009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 5c:85:7e:31:42:8b
        inet 10.55.10.10 netmask 0xffffff00 broadcast 10.55.10.255
        media: Ethernet Other <full-duplex> (2500Base-X <full-duplex>)
        status: active
        nd6 options=1<PERFORMNUD>
root@freenas[/mnt/raid-z/plots]# uname -a
FreeBSD freenas.local 12.2-RELEASE-p10 FreeBSD 12.2-RELEASE-p10 b26f74b5984(HEAD) TRUENAS  amd64
root@freenas[/mnt/raid-z/plots]#


Not quite as fast as I'd like, but a hell of a lot better than the ~450 Mbps I was getting in my initial tests.
 

CrazyRam

Cadet
Joined
Sep 15, 2021
Messages
6
I have onboard NIC working

Tried USB which is detected but sadly I haven't been able to get an IP for it.

Output of: usbconfig -d ugen0.3 dump_device_desc is the same as yours above apart from the iSerialNumber.
 

Hyacin

Cadet
Joined
Oct 21, 2021
Messages
6
I have onboard NIC working

Tried USB which is detected but sadly I haven't been able to get an IP for it.

Output of: usbconfig -d ugen0.3 dump_device_desc is the same as yours above apart from the iSerialNumber.

If it's the same RTL8156 there won't be an official module for it until FreeBSD 13.0. You can go through the process I outlined to build one, or if you'd like I can upload the one I made for 12.2 AMD64 somewhere - though downloading and loading kernel modules from random internet strangers is generally a bad idea ;-)
 

CrazyRam

Cadet
Joined
Sep 15, 2021
Messages
6
Sorry have been a way for the weekend. My system has a working RTL8125 Onboard NIC working. I was just testing the USB to Ethernet adaptor but couldn't get it to work.
 

damonizer

Dabbler
Joined
Jul 29, 2021
Messages
12
@sretalla I see.

For everyone else who hasn't heard of Tunables before you can add them in Menu - System - Tunables

Here's a screenshot of the first variable:

View attachment 47520
Thank you for the first variable..however how is the second one supposed to be configured?
 

Attachments

  • Second variable.png
    Second variable.png
    40.3 KB · Views: 479

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I can see both NIC's however both are showing as 1000baseT weird
What cables are you using and what switch are you connected to?
 

Randy...

Cadet
Joined
Dec 30, 2020
Messages
9
Very cool - This worked for me as well.

As @acidwap indicated - the tuneable "type" needs to be "loader" for both. Worked like a charm - the pics are always appreciated over here.

I'm using a pair of cheaper RTL8125 2.5GbE PCIe 3.0 cards (one in the TrueNAS, one in my Desktop) and a cheap TP-Link 2.5GbE switch. It's saturating over 250-260MB/s with most files - and still bests the 1GB connection for the smaller/random transfers. I was even able to saturate the 2.5GbE connection to my desktop while also saturating the on-board Gig-E NIC to another system!

I'm liking TrueNAS more and more - and the support here is fantastic. Thanks all.
RV
 

futureUser

Cadet
Joined
Nov 23, 2021
Messages
2
Hello, I'm trying to get TrueNAS Core running with a Realtek RTL8125B-CG, but since there is no other nic (or PCIe slot) on the computer, I can't use a different controller to make the necessary edits via Tunables on the Web GUI. How can I activate the module in this situation?

Thanks a lot
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
How can I activate the module in this situation?
Simple answer: use the API.

something like midclt call tunable.create ...

I don't really have the time to work out the exact syntax for you right now, but that's where you need to go. I might have a look at it another day if you're unable to do it yourself or are stuck and need help. If you do work it out, please post back here to help others.
 

futureUser

Cadet
Joined
Nov 23, 2021
Messages
2
Simple answer: use the API.

something like midclt call tunable.create ...

I don't really have the time to work out the exact syntax for you right now, but that's where you need to go. I might have a look at it another day if you're unable to do it yourself or are stuck and need help. If you do work it out, please post back here to help others.
Thanks, it worked with '{"var": "if_re_load", "value": "YES", "type": "LOADER", "enabled": true}'
 

anowosad

Dabbler
Joined
Jan 2, 2022
Messages
20
I had the same problem with TrueNAS Core.
It is very wired TruNAS is not loading that driver during startup.
Hey, TrueNAS developers can you correct that issue? As you can see more and more people have that issue on this forum.
 

Ralphshep

Dabbler
Joined
Apr 28, 2020
Messages
45
I followed this guide (CLICK HERE) on TrueNAS v12.0-U8 and was able to at least get the network card to show up. But I was only able to configure it as a 1G connection instead of 2.5G. It’s a Realtek® RTL8125B-CG 2.5G LAN Controller. Any suggestions?

Thanks
 

hervon

Patron
Joined
Apr 23, 2012
Messages
353
I followed this guide (CLICK HERE) on TrueNAS v12.0-U8 and was able to at least get the network card to show up. But I was only able to configure it as a 1G connection instead of 2.5G. It’s a Realtek® RTL8125B-CG 2.5G LAN Controller. Any suggestions?

Thanks
Take the time to read this current thread. Worked for me. Post #35 seems to wrap up what you need to know.
 

anowosad

Dabbler
Joined
Jan 2, 2022
Messages
20
I followed this guide (CLICK HERE) on TrueNAS v12.0-U8 and was able to at least get the network card to show up. But I was only able to configure it as a 1G connection instead of 2.5G. It’s a Realtek® RTL8125B-CG 2.5G LAN Controller. Any suggestions?

Thanks
Try TrueNAS Scale it is Debian Linux based and has plenty of drivers.
 
Top