[Plugin] Realtek R8125 R8168 and R8152\6 drivers


Recommended Posts

17 hours ago, Graxo said:

EDIT: I have removed the plugin(s) and its working again. But the pci adapter doesnt work in my OPNSense vm. I can passthrough the adapter to the VM, but it doenst get recionized as valid adapters.

IOMMU group 20:[10ec:8125] 06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)

IOMMU group 21:[10ec:8125] 09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)

----

Hi,

 

I installed this driver for my unraid installation, but now none of my nic's work anymore..

eth0 was my managment nic for the unraid GUI. The ethernet port on the motherboard.

I am also using a 2.5 gig pci network adapter, i installed the driver to use these because they dont seem to work in my OPNSense vm.

 

How do i uninstall these drivers again? or how to make eth0 to work again?

 

Kind regrads,

Graxo

The drivers in unraid and in VM are not related. You should make sure OPNSense has the correct R8125 driver as well.

Such as if you have a Windows VM, you need to install r8125 windows driver which is not a linux one.

The passthrough network card needs to be driven in the VM.

Edited by jinlife
Link to comment
On 7/9/2023 at 5:26 AM, ParHelia said:

For the sake of info, the rtl8156 plugin "revived" my Sabrent USB 2.5gbit NIC.

By "revived", I mean that I had stopped using it due to the fact that it was not being recognized by Unraid any longer.

 

I did configure an MTU of 9000 but the transfers were fine at the default setting already.

 

Screenshot_20230708_231757.png

Thanks for the info.

Link to comment
On 7/10/2023 at 12:22 PM, jinlife said:

The drivers in unraid and in VM are not related. You should make sure OPNSense has the correct R8125 driver as well.

Such as if you have a Windows VM, you need to install r8125 windows driver which is not a linux one.

The passthrough network card needs to be driven in the VM.

I replaced it with a 4x 2.5gb intel nic after i found out that freebsd doenst like Realtek. No more issues.

Link to comment

I have an r8125 card arriving tomorrow, so I installed the r8125 in preparation. After rebooting, it killed my networking, I could only fix it by removing the plugin in GUI mode. 

 

I was planning on using both my mobo's NIC and the r8125 card. Will this not be possible?  

Link to comment
9 hours ago, vmunich said:

I was planning on using both my mobo's NIC and the r8125 card. Will this not be possible?  

 

It probably depends on what driver the mobo's onboard NIC uses, if you upload your diagnostics.zip with the plugin uninstalled someone can take a look.

 

9 hours ago, vmunich said:

I have an r8125 card arriving tomorrow

 

TBH if you are buying a new card I would go for Intel rather than Realtek. Intel cards work out of the box with Linux

  • Like 1
Link to comment
46 minutes ago, ljm42 said:

TBH if you are buying a new card I would go for Intel rather than Realtek. Intel cards work out of the box with Linux

 

That's good to know, thank you. I'm gonna return the r8125 and get an Intel I225 today.

 

Edit: Got this for $23.99 prime day price.

Edited by vmunich
  • Like 1
Link to comment
3 hours ago, s890214 said:

你好,6.12.2版本,主板自带  r8125和r8111各一个网口,装上插件以后 r8111 不能使用了,请问怎么处理呢,

还有一个问题是,装上r8125插件后 网络协商带宽还是 100M,实际传输也是11M/S,也就是 100M的带宽

本人完全是一个小白...特来求助,谢谢

 

接口.png

接口2.png

song-vm-diagnostics-20230713-1343.zip 84.82 kB · 0 downloads

100MB 的速度一般是网线不行。你最好找根更好的超五类或六类网线。2.5G需要两边端口都支持,网线也得支持。

目前R8125的驱动只能驱动8125, R8111只能用原来的R8169驱动,建议卸载R8125的驱动,用回Unraid自带的驱动。

Link to comment
17 minutes ago, jinlife said:

100MB 的速度一般是网线不行。你最好找根更好的超五类或六类网线。2.5G需要两边端口都支持,网线也得支持。

目前R8125的驱动只能驱动8125, R8111只能用原来的R8169驱动,建议卸载R8125的驱动,用回Unraid自带的驱动。

回头我重新找个网线试试,按道理这个网线再另一台电脑上可以到1000M,因为我的路由是1000M的,

第二个问题是我主板有两个网口,能再搞一个8111的驱动插件吗?您的 8125插件贼好用

Link to comment
34 minutes ago, s890214 said:

回头我重新找个网线试试,按道理这个网线再另一台电脑上可以到1000M,因为我的路由是1000M的,

第二个问题是我主板有两个网口,能再搞一个8111的驱动插件吗?您的 8125插件贼好用

可以看看本贴的二楼 JorgeB 有分享强制设定2.5G速率的命令,也可以用到R8125上面。值得试一下,不过那是只能识别为千兆。百兆可能硬件的影响大点。

关于新做R8111的驱动插件,正在请 @ich777 帮忙。

Link to comment
17 hours ago, vmunich said:

 

That's good to know, thank you. I'm gonna return the r8125 and get an Intel I225 today.

 

Edit: Got this for $23.99 prime day price.

Good choice. 

We are also working on a R8111\8168 plugin. It will support the 1GBE network card later.

  • Like 2
Link to comment
13 hours ago, s890214 said:

回头我重新找个网线试试,按道理这个网线再另一台电脑上可以到1000M,因为我的路由是1000M的,

第二个问题是我主板有两个网口,能再搞一个8111的驱动插件吗?您的 8125插件贼好用

我们在应用市场发布了R8168\R8111的驱动,麻烦帮忙测试一下。

我们没有硬件,代码是直接从Realtek官方网站下载的。

Link to comment
2 hours ago, jinlife said:

我们在应用市场发布了R8168\R8111的驱动,麻烦帮忙测试一下。

我们没有硬件,代码是直接从Realtek官方网站下载的。

刚刚测试了下,正常,不过和设备没在一起,只是看了下驱动可以正常启用,回头插上网线再试下

微信截图_20230714104409.png

Link to comment
  • jinlife changed the title to [Plugin] Realtek R8125 R8168 and R8152 drivers
  • 4 weeks later...

Hi

 

I'm trying out Unraid and have a USB NIC which did not show up. So I installed the drivers and rebooted and it showed up. Then I changed it to be eth0 and rebooted again. The onboard NIC is set up as a fall back. When I have the 2.5G nic plugged in I can't acces the server, but when I unplug it I can acces it. (I still can't acces it if I have the onboard NIC unplugged)

 

I'll attach my diagnostics

test-server-diagnostics-20230808-1045.zip

Link to comment
On 8/8/2023 at 4:56 PM, socioeconomic-forecast2975 said:

Hi

 

I'm trying out Unraid and have a USB NIC which did not show up. So I installed the drivers and rebooted and it showed up. Then I changed it to be eth0 and rebooted again. The onboard NIC is set up as a fall back. When I have the 2.5G nic plugged in I can't acces the server, but when I unplug it I can acces it. (I still can't acces it if I have the onboard NIC unplugged)

 

I'll attach my diagnostics

test-server-diagnostics-20230808-1045.zip 103.7 kB · 0 downloads

It looks like both nic were driven properly, but it seems you are using bonding for eth0 and eth1. The unraid network bonding for multiple ports is not easy to use. It is not working like a router or switch.

You can disable the bonding at first, separate those nic, and then see whether it works.

If you want to share network between different nics, you'd better create a virtual router such as openwrt. Passthrough the nic and manage them in openwrt VM. Or passthrough one of the nic to any VM and connect them with a real hardware switch.

Edited by jinlife
Link to comment
3 hours ago, jinlife said:

It looks like both nic were driven properly, but it seems you are using bonding for eth0 and eth1. The unraid network bonding for multiple ports is not easy to use. It is not working like a router or switch.

You can disable the bonding at first, separate those nic, and then see whether it works.

If you want to share network between different nics, you'd better create a virtual router such as openwrt. Passthrough the nic and manage them in openwrt VM. Or passthrough one of the nic to any VM and connect them with a real hardware switch.

Thank you!
This was the issue.

Though I had the bond as an active backup.

Edited by socioeconomic-forecast2975
Link to comment
  • 4 weeks later...
On 9/5/2023 at 3:02 AM, jw_ruleless said:

Hey there, I have a 2.5g adapter from dell called aw1022 it’s using 8152 chips but not in the driver list. I wonder if you can help me add Realtek Alienware AW1022 2.5GbE AdapterUSB\VID_413C&PID_B097

to the driver? Like this guy did https://answers.launchpad.net/ubuntu/+source/r8125/+question/705159

I guess you can try the Realtek RTL8156 plugin.  Hope it works.

I have no idea where to find the official source code of the Alienware driver so may not able to help you. 

Link to comment
On 9/8/2023 at 9:17 PM, jinlife said:

I guess you can try the Realtek RTL8156 plugin.  Hope it works.

I have no idea where to find the official source code of the Alienware driver so may not able to help you. 

It’s no need for special Alienware drivers, just like the links says , add few line in the driver file. Something like this

 

 /* Dell */
        { USB_DEVICE(0x413c, 0xb097) },

 

 

if so, what do I need to execute in the following so the kernel will be notified about this change? Or shouldn't I touch the file "/usr/src/linux-headers-5.19.0-31/include/linux/usb/r8152.h" at all and instead ....

*** EDIT ***

I made a successful progress, however I need assistance from a pro to verify if this is the correct way to go. My goal was to add the identifier 413c:b097 to the kernel module r8152. Unfortunately I had no source file r8152.c on my filesystem. I ran "apt install linux-headers-5.19.0-31 && updatedb && locate r8152.c" but still no "r8152.c" found under /usr/src/* where I would have expected it. I also tried "apt install linux-source" but still no success. At the end I downloaded the file from <https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/plain/drivers/net/usb/r8152.c> and saved it under "/usr/src/linux-headers-5.19.0-31/drivers/net/usb".

$ modprobe -r r8152
$ ls /usr/src/linux-headers-5.19.0-31/drivers/net/usb
Kconfig Makefile r8152.c

At the end of file "r8152.c"

 

Link to comment
5 hours ago, jw_ruleless said:

It’s no need for special Alienware drivers, just like the links says , add few line in the driver file. Something like this

 

 /* Dell */
        { USB_DEVICE(0x413c, 0xb097) },

 

 

if so, what do I need to execute in the following so the kernel will be notified about this change? Or shouldn't I touch the file "/usr/src/linux-headers-5.19.0-31/include/linux/usb/r8152.h" at all and instead ....

*** EDIT ***

I made a successful progress, however I need assistance from a pro to verify if this is the correct way to go. My goal was to add the identifier 413c:b097 to the kernel module r8152. Unfortunately I had no source file r8152.c on my filesystem. I ran "apt install linux-headers-5.19.0-31 && updatedb && locate r8152.c" but still no "r8152.c" found under /usr/src/* where I would have expected it. I also tried "apt install linux-source" but still no success. At the end I downloaded the file from <https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/plain/drivers/net/usb/r8152.c> and saved it under "/usr/src/linux-headers-5.19.0-31/drivers/net/usb".

$ modprobe -r r8152
$ ls /usr/src/linux-headers-5.19.0-31/drivers/net/usb
Kconfig Makefile r8152.c

At the end of file "r8152.c"

 

If you are capable to change code and build it by yourself. Please try and download the source code from https://github.com/jinlife/unraid-r8125-r8152-driver

It has the latest r8152 code, our plugin was built from it.

Link to comment
  • jinlife changed the title to [Plugin] Realtek R8125 R8168 and R8152\6 drivers

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.