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


Recommended Posts

On 12/4/2022 at 10:39 AM, psyc said:

This appeared to work after installing the patch but now it crashes with:

r8152 4-2:1.0 eth0: failed tx_urb -22
xhci_hcd WARN waiting for error on ep to be cleared

I have rtl8156b, can anyone help?

Maybe it is incompatible, maybe there is other issue.

My rtl8156b is working fine, I have no idea what is wrong according to this log.

Link to comment

===RESOLVED=== IT WAS THE FREAKEN BROWSER.. I WAS USING CHROME BUT WHEN I TRIED FIREFOX IT WORKED.

 

Does this patch break VM's??   I can't create a VM on my machine that works.  I am able to run VM's that were already created without any problem..   This is a post I made in a different group.   I'm frustrated and not sure what to do next because I never had a problem. 

 

 

Having the strangest problem trying to add a new VM on a machine I was always able to add VM's until upgrading to 6.9.15.   When I try to start the newly created VM, it just shows the VNC unable to connect screen.  Not sure what I am doing wrong. I tried scrubbing the libvert and rebooted but just not working.  If someone can point me in the correct direction.  The VM's that already existed on here work fine but i have tried on several different SSD's and even leaving it on auto but no luck.   Here is my diagnostics, but you need any other information, i will post that.

Thanks so much.

 

Some other helpful info is when I start - I get "NO VNC" and this is the line that browser goes to for VNC...

http://192.168.0.201/plugins/dynamix.vm.manager/vnc.html?v=1640104829&autoconnect=true&host=192.168.0.201&port=&path=/wsproxy/5701/

 

phantekone-diagnostics-20221215-1753.zip

Edited by GeorgeJetson20
RESOLVED
Link to comment
2 hours ago, GeorgeJetson20 said:

Does this patch break VM's??   I can't create a VM on my machine that works.  I am able to run VM's that were already created without any problem..   This is a post I made in a different group.   I'm frustrated and not sure what to do next because I never had a problem. 

 

 

Having the strangest problem trying to add a new VM on a machine I was always able to add VM's until upgrading to 6.9.15.   When I try to start the newly created VM, it just shows the VNC unable to connect screen.  Not sure what I am doing wrong. I tried scrubbing the libvert and rebooted but just not working.  If someone can point me in the correct direction.  The VM's that already existed on here work fine but i have tried on several different SSD's and even leaving it on auto but no luck.   Here is my diagnostics, but you need any other information, i will post that.

Thanks so much.

 

Some other helpful info is when I start - I get "NO VNC" and this is the line that browser goes to for VNC...

http://192.168.0.201/plugins/dynamix.vm.manager/vnc.html?v=1640104829&autoconnect=true&host=192.168.0.201&port=&path=/wsproxy/5701/

 

phantekone-diagnostics-20221215-1753.zip 121.83 kB · 0 downloads

This is just a network card patch, it cannot impact VM.

I think you issue was caused by upgradation to Unraid 6.11.5. (6.9.15?) The web content might be changed for VNC, you need to clear the cached session or data of browser, especially for the google chrome browser.

Edited by jinlife
Link to comment
On 12/13/2022 at 9:21 AM, emuzi said:

谢谢大佬,请问支持板载的8125网卡吗?谢谢指教!

只看芯片型号,不管在哪。这个RTL8125肯定支持,即使不用补丁,原生的Unraid老驱动也支持的。

RTL8156可能更需要这个补丁些。

Edited by jinlife
  • Like 1
Link to comment
  • 2 weeks later...
  • jinlife changed the title to Unraid 6.11.5 最新的r8125和r8156网卡驱动补丁

感谢大佬的方案,一直用unraid和8125b的pcie网卡,最近突然发现经常会24小时内有一次失联(手动重启unraid后可以解决),排除了软路由和相关设置后发现极有可能是这张8125b网卡的锅,有可能是驱动的bug或者节能模式导致的,大佬和下面的回复我都看了,感谢各位!

Link to comment


image.thumb.png.5d38572cee3b3426d0a2d515e9331d2b.png

 

有个奇怪的问题。

机器上有一个板载2.5G网卡,还有一个USB2.5G网卡。

不装楼主补丁时,USB网卡可直通给群辉,但是不到1天就断网。unraid的setting网络里,看不到usb网卡,所以不能把usb网卡留给unraid做管理口。

装了楼主补丁后,unraid的setting网络里可以看到usb网卡,改成eth0后,可以作为unraid管理口,但是也是不到1天就断网。如果像截图一样,直通给群辉,群晖里识别不出这个usb网卡。

 

有没有哪位知道这是什么情况。谢谢。

Link to comment
On 1/9/2023 at 10:48 AM, woodust said:


image.thumb.png.5d38572cee3b3426d0a2d515e9331d2b.png

 

有个奇怪的问题。

机器上有一个板载2.5G网卡,还有一个USB2.5G网卡。

不装楼主补丁时,USB网卡可直通给群辉,但是不到1天就断网。unraid的setting网络里,看不到usb网卡,所以不能把usb网卡留给unraid做管理口。

装了楼主补丁后,unraid的setting网络里可以看到usb网卡,改成eth0后,可以作为unraid管理口,但是也是不到1天就断网。如果像截图一样,直通给群辉,群晖里识别不出这个usb网卡。

 

有没有哪位知道这是什么情况。谢谢。

USB在Unraid里面使用,是用的Unraid带的驱动。直通到群晖里面用,是用的群晖带的驱动,两边的驱动都得靠谱才行。另外你这个断网,估计有好几个方面的原因:

1. 群晖里面的驱动不够新,群晖内USB R8156这网卡的bb-qq的套件,也不是蛮灵,经常要重新启动几次套件才行。最好是编译群晖的loader的时候就把R8156的驱动编译进去。不会编译的话,那建议用巴西人的arpl这个loader。

2. 网卡硬件有问题,有些USB网卡过热就会断网,散热还不好。除了换个品牌的网卡,没什么办法。加风扇都不一定有用,质量问题。

3. 不要热插拔USB网卡,插好就别动了,重启Unraid和群晖才能正常使用。Unraid对热插拔USB网卡的支持不咋地。

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

USB在Unraid里面使用,是用的Unraid带的驱动。直通到群晖里面用,是用的群晖带的驱动,两边的驱动都得靠谱才行。另外你这个断网,估计有好几个方面的原因:

1. 群晖里面的驱动不够新,群晖内USB R8156这网卡的bb-qq的套件,也不是蛮灵,经常要重新启动几次套件才行。最好是编译群晖的loader的时候就把R8156的驱动编译进去。不会编译的话,那建议用巴西人的arpl这个loader。

2. 网卡硬件有问题,有些USB网卡过热就会断网,散热还不好。除了换个品牌的网卡,没什么办法。加风扇都不一定有用,质量问题。

3. 不要热插拔USB网卡,插好就别动了,重启Unraid和群晖才能正常使用。Unraid对热插拔USB网卡的支持不咋地。

感谢。

我也考虑过驱动的问题。就是觉得奇怪。

1、不打楼主补丁,直通给群辉7.1,群辉里没打bb-qq补丁套件,自动识别为2.5G网卡。

2、用了楼主补丁,直通给群辉7.1,首先是群辉里不识别(为什么unraid打个补丁,群辉里对网卡识别情况还有变化),其次是打bb-qq那个补丁套件,总是报错,提示要修复。bb-qq这个补丁在之前另一台黑裙用过,是好使的。

usb网卡过热断网这个就没法说了,确实是个一般牌子的设备,网卡感觉也是挺成熟产品,芯片都是一样的,感觉就是个壳子不同,不同品牌不知还有多少差别。也没有热插拔使用。

总得来说usb的不是很可靠。目前没啥好办法,就放弃usb2.5G了,用pci的千兆网卡直通群辉了。

Link to comment
3 hours ago, jinlife said:

USB在Unraid里面使用,是用的Unraid带的驱动。直通到群晖里面用,是用的群晖带的驱动,两边的驱动都得靠谱才行。另外你这个断网,估计有好几个方面的原因:

1. 群晖里面的驱动不够新,群晖内USB R8156这网卡的bb-qq的套件,也不是蛮灵,经常要重新启动几次套件才行。最好是编译群晖的loader的时候就把R8156的驱动编译进去。不会编译的话,那建议用巴西人的arpl这个loader。

2. 网卡硬件有问题,有些USB网卡过热就会断网,散热还不好。除了换个品牌的网卡,没什么办法。加风扇都不一定有用,质量问题。

3. 不要热插拔USB网卡,插好就别动了,重启Unraid和群晖才能正常使用。Unraid对热插拔USB网卡的支持不咋地。

等有时间研究下自己编译。之前看过一点。

Link to comment
  • 3 weeks later...
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/

 

Hi, I know I'm an idiot 对不起我傻逼, but I'm trying to follow these instructions but I'm assuming the mac address details and the pci address details are to be filled in by the end-user according to his / her device config, right? So let's say my eth0 mac address is 70:88:6B:8A:17:69 then I should fill the following in:

  

    <interface type='direct'>
      <mac address='70:88:6B:8A:17:69'/>
      <source dev='eth0' mode='vepa'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <interface type='bridge'>
      <mac address='ANYRANDOMMAC?'/>
      <source bridge='virbr0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </interface>

 

Correct? So the direct one points to the actual mac address since source dev='eth0' while the bridge virbr0 I can just fill in any random mac address. Am I right so far? Sorry for being a total noob.

 

After doing that, what about the pci address entries? I don't know how to fill that out. I left it at the code you gave but it says slot has to be >=1.

 

Also, does this part "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." mean that VMs are on a different subnet?

Link to comment
14 hours ago, hoeman said:

 

Hi, I know I'm an idiot 对不起我傻逼, but I'm trying to follow these instructions but I'm assuming the mac address details and the pci address details are to be filled in by the end-user according to his / her device config, right? So let's say my eth0 mac address is 70:88:6B:8A:17:69 then I should fill the following in:

  

    <interface type='direct'>
      <mac address='70:88:6B:8A:17:69'/>
      <source dev='eth0' mode='vepa'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <interface type='bridge'>
      <mac address='ANYRANDOMMAC?'/>
      <source bridge='virbr0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </interface>

 

Correct? So the direct one points to the actual mac address since source dev='eth0' while the bridge virbr0 I can just fill in any random mac address. Am I right so far? Sorry for being a total noob.

 

After doing that, what about the pci address entries? I don't know how to fill that out. I left it at the code you gave but it says slot has to be >=1.

 

Also, does this part "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." mean that VMs are on a different subnet?

I'm not expert so here is just my experiences, maybe wrong. Most of your expectations are correct.

1. The MAC for direct interface is the current VM's mac to the outer world. Your router will allocate local network IP to this MAC, such as 192.168.1.105. But please aware Unraid or other VMs cannot access this IP if they share the interface eth0.

2. Unless you pass through a physical interface eth1 to another VM, then this VM can access 192.168.1.105 directly. Other independent devices can access this IP as well, even from the DDNS.

3. The MAC for bridge interface is the VM's mac to inner world, this network is only exist in virbr0 which is used between the Unraid and all other VM who is sharing eth0, the IP could be 192.168.122.5. So if you created a Synology VM, and want to add its share in Unraid, you need to use IP 192.168.122.5 or Synology network name.  The MAC can be any one since it only exist in virbr0, it is a super small local subnet. You can use virsh to control it.

4. PCI is just virtual configuration to VM, if the slot is occupied, then you can just use any other available number.

So the Synology VM will have two network interfaces, one is direct and another is bridge, it has two IPs, 192.168.1.105 and 192.168.122.5. They have different scope and purpose.

Hope it answers your question.

 

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

I'm not expert so here is just my experiences, maybe wrong. Most of your expectations are correct.

1. The MAC for direct interface is the current VM's mac to the outer world. Your router will allocate local network IP to this MAC, such as 192.168.1.105. But please aware Unraid or other VMs cannot access this IP if they share the interface eth0.

2. Unless you pass through a physical interface eth1 to another VM, then this VM can access 192.168.1.105 directly. Other independent devices can access this IP as well, even from the DDNS.

3. The MAC for bridge interface is the VM's mac to inner world, this network is only exist in virbr0 which is used between the Unraid and all other VM who is sharing eth0, the IP could be 192.168.122.5. So if you created a Synology VM, and want to add its share in Unraid, you need to use IP 192.168.122.5 or Synology network name.  The MAC can be any one since it only exist in virbr0, it is a super small local subnet. You can use virsh to control it.

4. PCI is just virtual configuration to VM, if the slot is occupied, then you can just use any other available number.

So the Synology VM will have two network interfaces, one is direct and another is bridge, it has two IPs, 192.168.1.105 and 192.168.122.5. They have different scope and purpose.

Hope it answers your question.

 

Hmmm.. how would it work if my router is a VM in unraid? My current setup has pfSense as a VM in unraid.

 

• Unraid set to static IP 192.168.50.3 on eth0

• pfSense VM set to 192.168.50.1 on br0 (bridging enabled on eth0)

• my managed switch set to 192.168.50.2

• all other devices connected to the managed switch including wireless AP and they all exist on 192.168.50.0/24

 

How do I translate this to the virbr0 model described above where there are 2 networks 192.168.1.x and 192.168.122.x?

Edited by hoeman
Link to comment
12 hours ago, hoeman said:

Hmmm.. how would it work if my router is a VM in unraid? My current setup has pfSense as a VM in unraid.

 

• Unraid set to static IP 192.168.50.3 on eth0

• pfSense VM set to 192.168.50.1 on br0 (bridging enabled on eth0)

• my managed switch set to 192.168.50.2

• all other devices connected to the managed switch including wireless AP and they all exist on 192.168.50.0/24

 

How do I translate this to the virbr0 model described above where there are 2 networks 192.168.1.x and 192.168.122.x?

192.168.1.x is just an example, it should be your 192.168.50.0/24 which is outside network.

pfSense and unraid should be connected with real network cable and they cannot share interface eth0. Like my point 1 and 2 said, you will need an eth1.

Maybe you can add a RTL8156 USB network card, then assign it to Unraid, or passthrough to pfSense.

Edited by jinlife
Link to comment
  • 2 weeks later...
13 hours ago, hoeman said:

@jinlife It looks like @ich777 has created a plugin in the app store for RTL8152/3/4/6 USB Drivers! It was just added today!

Awesome, it is a good news. He is a reliable maintainer and I can relax.

But frankly speaking, the network driver should be unraid official responsibility since it is a paid software, it should not be ours.

Edited by jinlife
Link to comment

@ich777 Thanks for providing the plugin. This is awesome!

 

Unfortunattely my network is not working. I've installed the plugin and followed the instructions, like adding...

Quote

ethtool -s eth0 autoneg on advertise 0x80000000002f

 

System shows:

Bus 004 Device 002 Port 4-1		ID 0bda:8156 Realtek Semiconductor Corp. USB 10/100/1G/2.5G LAN

 

I've also reboot more then twice.

 

My eth0 shows:

Settings for eth0:
	Supported ports: [ MII ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	                        2500baseT/Full
	Supported pause frame use: No
	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:  100baseT/Full
	                                     1000baseT/Half 1000baseT/Full
	                                     2500baseT/Full
	Link partner advertised pause frame use: No
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 2500Mb/s
	Duplex: Full
	Auto-negotiation: on
	Port: MII
	PHYAD: 32
	Transceiver: internal
	Supports Wake-on: pumbg
	Wake-on: g
        Current message level: 0x00007fff (32767)
                               drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol
	Link detected: yes

 

I get RX on ent0, but no TX.

 

   eth0 since 02/10/2023

          rx:  864.70 KiB      tx:  0 B      total:  864.70 KiB

   monthly
                     rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
       Feb '23    864.70 KiB |         0 B |  864.70 KiB |          1 B/s
     ------------------------+-------------+-------------+---------------
     estimated       --      |     --      |     --      |

   daily
                     rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
         today    864.70 KiB |         0 B |  864.70 KiB |         11 B/s
     ------------------------+-------------+-------------+---------------
     estimated       --      |     --      |     --      |

 

I'm using the latest Unraid. Any help on this?

 

Link to comment
  • 2 weeks later...
  • 3 weeks later...
On 5/20/2022 at 6:03 PM, jinlife said:

呃,这个要想办法去掉R8169的驱动。需要重新改配置build。等我有空弄弄。我自己在用6.9.1版本没啥问题。

可以这样屏蔽试试,命令行跑一次,会存到U盘,重启看看。

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

 

How do I revert this blacklist? Anyone? I'm asking because I'd like to upgrade to 6.12 rc1 but when I upgrade from my current setup, it doesn't detect the r8125 built-in NIC of my motherboard.

Link to comment
  • jinlife changed the title to Unraid 6.12.10 最新的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.