Unraid 6.12.9 最新的r8125和r8156网卡驱动补丁


Recommended Posts

On 10/7/2022 at 6:53 PM, yulu_2000 said:

6.11.1版r8125和r8152网卡驱动补丁貌似有问题,我覆盖原文件后重启unRaid阵列无法启动了,原文件重新覆盖回去后一切正常!之前几个版本的补丁我一直都用的很好,就最新的这个不行,麻烦楼主检查一下吧。

额,官方貌似加了什么限制,不好随便换文件了。这个得花时间调查了。。。等有空吧。要么继续用老的,新的也没啥新功能。

还有个妥协的办法就是先在原始文件里面将阵列启动好,生成阵列配置文件之后,再替换补丁重启看看,貌似补丁不支持新阵列配置的创建,官方有某些检查md版本的限制?

可以试试。一般硬盘阵列配置也不会常换的。

 

Edited by jinlife
Link to comment

反馈下,B460m迫击炮 板载RTL8125+PCIk扩展乐扩4口8125b网卡 

系统版本6.11.1,未替换前,PCI扩展网卡跟板载网卡在一个IOMMU组,要直通的话会跟板载网卡同时直通出去,管理口都没了还玩个GG;

使用补丁后,扩展网卡能分别在不同IOMMU分组,直通给openwrt目前体验良好;感谢大佬的无私奉献!!

image.thumb.png.d1ff5f21f3b6144eb403847ae6a92d30.png

 

Edited by xgxxl89
  • Haha 1
Link to comment
13 hours ago, xgxxl89 said:

反馈下,B460m迫击炮 板载RTL8125+PCIk扩展乐扩4口8125b网卡 

系统版本6.11.1,未替换前,PCI扩展网卡跟板载网卡在一个IOMMU组,要直通的话会跟板载网卡同时直通出去,管理口都没了还玩个GG;

使用补丁后,扩展网卡能分别在不同IOMMU分组,直通给openwrt目前体验良好;感谢大佬的无私奉献!!

image.thumb.png.d1ff5f21f3b6144eb403847ae6a92d30.png

 

大佬您好,我和您一样用的B460M迫机炮,目前板载第二根M.2固态和PCIE x1是分在同一个IOMMU分组下的,我看您这个补丁安装后好像可以拆分出来?

Link to comment
On 10/9/2022 at 1:06 PM, jinlife said:

额,官方貌似加了什么限制,不好随便换文件了。这个得花时间调查了。。。等有空吧。要么继续用老的,新的也没啥新功能。

还有个妥协的办法就是先在原始文件里面将阵列启动好,生成阵列配置文件之后,再替换补丁重启看看,貌似补丁不支持新阵列配置的创建,官方有某些检查md版本的限制?

可以试试。一般硬盘阵列配置也不会常换的。

 

果然如此,按楼主的方法阵列成功启动了。感谢!

Link to comment
17 hours ago, ukiyoec said:

🥲不好意思说错了。。是x4……也就是第二根全长pcie的位置,和m.2_2共用的x4好像,应该都是被分在PCH里同一个分组。。

估计悬,这两硬件上就是共享的,如果补丁分不开那就是不支持了。迫击炮这个共享带宽的设计挺坑,建议用华擎或华硕的主板组NAS。

迫击炮可以插第一个插槽,用VM的DownStream模式,也可以网卡分组。

Link to comment
3 hours ago, jinlife said:

估计悬,这两硬件上就是共享的,如果补丁分不开那就是不支持了。迫击炮这个共享带宽的设计挺坑,建议用华擎或华硕的主板组NAS。

迫击炮可以插第一个插槽,用VM的DownStream模式,也可以网卡分组。

6.10.3以前使用蓝冰大佬的IOMMU是可以拆分出来使用的,现在6.11的话还没出,不过目前试了下6.11好几个插件存在兼容性的问题,已经回退回6.10.3继续使用了……感谢大佬回复

Link to comment
  • 2 weeks later...
  • jinlife changed the title to Unraid 6.11.4 最新的r8125和r8152网卡驱动补丁
On 8/2/2022 at 5:26 PM, benwwchen said:

 

 

先谢谢楼主提供的驱动和这位发现桥接影响速度的老哥,虽然查了一下原因不明,但是关掉之后确实好了。

 

另外跟各位补充一下,关掉桥接之后虚拟机还是有办法直接桥接到物理网络的,可以通过 macvtap 的方法配置,具体方法如下:

1. 先在 SETTINGS - VM Manager 里把 Default network source: 改为 virbr0,这个是用于虚拟机和宿主机(Unraid)之间通信的网络,因为 macvtap 桥接方式下虚拟机和宿主机不能直接通信

 

2.在虚拟机编辑界面右上角打开XML VIEW,找到网卡的位置,改成使用两个卡:

    <interface type='direct'>
      <mac address='xx:xx:xx:xx:xx:x1'/>
      <source dev='bond0' mode='vepa'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <interface type='bridge'>
      <mac address='xx:xx:xx:xx:xx:x2'/>
      <source bridge='virbr0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </interface>

其中,

第一个 interface 是用 macvtap 的方式通过 bond0 网卡来跟物理网络连接(如果没有打开 bonding 的话这里 bond0 应该可以对应修改为 eth0 等物理网卡),

第二个 interface 是用默认的 NAT 网络 virbr0 来跟宿主机(Unraid)连接(会有单独的子网),如果只是需要虚拟机和宿主机互联用默认的 virbr0 应该就够了,但也可以参考官方文档[1]和示例配置步骤[3]来定制,配置文件目录在 /etc/libvirt/qemu/networks 里,但是不能直接编辑,要用 virsh 命令来编辑。

 

不过 Unraid 的表格编辑不支持 direct 这种配置,所以如果在 FORM VIEW 下修改了配置,网卡会被强制改回 bridge,所以每次在表格模式改完别的配置之后要再进 XML VIEW 手动修改网卡的部分。

 

这样配置物理网络、虚拟机、Unraid两两之间都能跑满速,暂时没发现有什么问题。

 

English Version:

If you need VMs to still connected to physical network after disabling bridging for full speed, you could follow the following steps to connect VMs to the physical network via macvtap [1]:

 

1. In SETTINGS - VM Manager, change "Default network source:" to virbr0 for connections between VMs and the Unraid host because macvtap doesn't allow communication betweeen VM guests and the host,

 

2. In the VM's edit page, change to XML VIEW by toggling the switch in the top-right corner of the page. Then edit the network cards section as below:

    <interface type='direct'>
      <mac address='xx:xx:xx:xx:xx:x1'/>
      <source dev='bond0' mode='vepa'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <interface type='bridge'>
      <mac address='xx:xx:xx:xx:xx:x2'/>
      <source bridge='virbr0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </interface>

What the above config does is,

a. the first interface is connected using macvtap via bond0 to the physical network, so if bonding is disabled, you may need to change "bond0" to physical interfaces like "eth0";

b. the second interface uses the default NAT based virbr0 to connect the Unraid host with an independent subnet. For advanced customizations, you can refer to the libvirt docs[1] and this example guide[3]. Note that the configs are located in /etc/libvirt/qemu/networks but you must use the virsh command to edit them in the command line.

 

Also note that the FORM VIEW of the VM edit page in the Unraid GUI doesn't support "direct" type interface, so you will need to manually edit the network interfaces section every time you change other settings in FORM VIEW.

 

With the above configuration, machines on the physical networks, VMs, and Unraid should be able to all connected to each other at full speed now.

 

参考资料(References):

[1] https://libvirt.org/formatnetwork.html#using-a-macvtap-direct-connection

[2] https://notes.wadeism.net/post/kvm-network-setup/

[3] https://fabianlee.org/2019/06/05/kvm-creating-a-guest-vm-on-a-network-in-routed-mode/

刚买正版序列号得新unraider表示:上面方法有点太复杂了,有没有可能下一版升级可以原生解决不能同时满速的情况:我现在插调试口往nas里面拷贝可以到240+,但下载只能300m,插直通网卡口,拷贝只能40m左右,但下载可以940m满速。。。

是否先按需插网口忍几个月,看后续更新有无可能解决r8125顽疾?

Link to comment
  • jinlife changed the title to Unraid 6.11.5 最新的r8125和r8152网卡驱动补丁

 

UPDATE: End up ordering an Intel 225 card which seems like it will work

 

(Now that I translated the Chinese to English I understand how to do this now) at first it didn't register

 

Is there a network card that can be purchased on Amazon that is 2.5gb (or better but supports 2.5gb and will work)  that will work with Unraid?   I would get that if someone can recommend one that will because it's so hard finding something that will work.  My Pluggable USB 2.5gb (Realtek) worked until I upgraded to 6.11.5 (from 6.9.2) and now I am using my motherboard ethernet but it's only 1g and I read thru the outdated hardware list for unraid but it doesn't really help anymore to select a working one.  I read thru here on this thread but i don't think i am good enough on the linux side to understand how to make this work.   

Edited by GeorgeJetson20
Link to comment
7 hours ago, GeorgeJetson20 said:

 

UPDATE: End up ordering an Intel 225 card which seems like it will work

 

(Now that I translated the Chinese to English I understand how to do this now) at first it didn't register

 

Is there a network card that can be purchased on Amazon that is 2.5gb (or better but supports 2.5gb and will work)  that will work with Unraid?   I would get that if someone can recommend one that will because it's so hard finding something that will work.  My Pluggable USB 2.5gb (Realtek) worked until I upgraded to 6.11.5 (from 6.9.2) and now I am using my motherboard ethernet but it's only 1g and I read thru the outdated hardware list for unraid but it doesn't really help anymore to select a working one.  I read thru here on this thread but i don't think i am good enough on the linux side to understand how to make this work.   

Intel 225 is a good choice for PCI card although the driver is not stable enough too.

If you want to use the USB 2.5GB(Realtek) which could be R8156 chip, then it should only work with the patch in this first post. Just download the patch, extract and overwrite the files in the Unraid USB flash disk, reboot Unraid. It seems Unraid has dropped support for the R8156 for the new version although 6.9.2 already support it.

Edited by jinlife
Link to comment

This thread is gold and huge thanks to the OP for providing the drivers. I have IOCREST 2-port 2.5Gbit/s card with 8125B chip and r8169 is pure crap. It was easy to install dkms version with proxmox, but unraid has proven to be more difficult so I was exploring how to compile the driver myself, and even opened a bug report asking the developers to include this driver and someone suggested this thread.

 

Quote

Intel 225 is a good choice for PCI card although the driver is not stable enough too.

 

I would recommend to stay away from i225-v completely. Intel had 3 revisions of this chip because there was (and possibly is) a hardware issue with it. There are multiple reports of people with this chip stopping working completely over time, not passing through traffic, or working very slowly. Intel has confirmed hardware defects.

 

Some people still say that even B3 stepping has issues.

Link to comment
7 hours ago, Jojo1965 said:

I am a total Noob with Unraid, can someone please explain how to patch the system step by step? 

THANK YOU!!!

Just download the patch, extract and overwrite the files in the Unraid USB flash disk, reboot Unraid.

If you don't like the patch, then overwriting these files again with official ones will recover it, after another reboot.

Edited by jinlife
  • Like 1
Link to comment
18 hours ago, Jojo1965 said:

THX, but how do i write to the flash drive?

Two ways:

1. Insert Unraid flash drive to Windows PC, then copy the files, just like any other USB disk.

2. Change flash shared permission to public in Unraid Web, then you can navigate to the shared folder: \\unraid_IP\flash, copy the files.

But hey, please make sure you need this patch. There is known issue 2 in the first post. You can translate it by google. Thanks.

Edited by jinlife
  • Like 1
Link to comment
On 5/18/2022 at 7:03 AM, jinlife said:

Unraid貌似用了r8169这个驱动来驱r8125,比较老。r8152也是很老的1.12版本。

 

以下补丁基于6.11.5定制,加了最新的V9.010.01的r8125 2.5G PCI网卡驱动和V2.16.3的r8152(r8156) 2.5G USB 网卡驱动。解压后把所有文件覆盖到U盘根目录重启即可。覆盖前记得备份原始文件。 

 

加回了r8169的驱动,支持板载网卡r8169和USB网卡r8152共存的情况。

如果不需要r8169,需要r8125 PCI网卡的驱动,可以靠如下blacklist屏蔽掉。命令行跑一次,会存到U盘,重启看看。 

echo "blacklist r8169" > /boot/config/modprobe.d/r8169.conf

 

如果需要r8169和r8125共存,这个比较麻烦,建议换个网卡吧。这个改动需要改bzfirmware文件。bzfirmware里面东西太多,不好改,有需要可以自行去bzfirmware内删掉r8169内置的r8125固件,重新打包(未测试,只是建议可以尝试下)。

 

只是供测试,如果感觉不稳定,用原始文件覆盖回来,重启就能恢复原状了。

 

下载链接在:

链接: https://pan.baidu.com/s/1987agT_JHTv6QT3ds1olqg?pwd=zapu

 

Mirror (Google Drive):

https://drive.google.com/drive/folders/1wA9UNejVllZfBTjDQ-pquJ-Bx4Tlqluk?usp=sharing

 

里面还有6.11.3, 6.11.1, 6.11.0, 6.10.3, 6.9.2和6.9.1版本的,都是加了最新的驱动。有兴趣也可以使用。

 

已知问题1: Unraid内部似乎加了些版本检查的限制,新版本的补丁无法新建队列配置文件,会出现Stale Configuration的提示。有个妥协的办法就是先在原始文件里面将阵列启动好,生成阵列配置文件之后,再替换补丁重启。除非换硬盘,一般阵列配置也不会重新配置。

 

已知问题2: 某些r8125网卡在Unraid的共享目录拷贝速度跑不满280MB,只有140MB左右,可能跟主板设计或配置或桥接有关。有网友发现关掉Unraid网络配置的br0桥接,使用macvtap,可以跑满速度。推荐使用这种办法,虽然麻烦一些,但是速度确实不受影响了。 例如虚拟群晖,推荐第一个macvtap网卡使用群辉的MAC地址,第二个网卡随意MAC地址,参考本帖第三页  @benwwchen 网友的帖子。

 

Thank you for this, hope they fix it soon.

Link to comment
  • jinlife changed the title to Unraid 6.12.9 最新的r8125和r8156网卡驱动补丁

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.