Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Plugin] Realtek R8125 R8126 R8168 and R8152\6\7 drivers

Featured Replies

On 2/29/2024 at 7:38 AM, Fuzzy0101 said:

 

There are many unexplained  stories about Realtek cards and ASPM ... so I made a little investigation:

 

The kernel in-tree r8169 driver is a generic driver for all Realtek network cards, despite its name. It contains lots of workaround for different Realtek chipset. It also has a very strict condition for using ASPM (this condition was removed for a few weeks last year then reverted back...). It enables ASPM only for RTL8125A and RTL8125B chipset and only if a bit in a register is set in the chip  by the system vendor, which signals to the driver that vendor successfully tested ASPM 1.2 on this configuration. (Probably not many motherboard vendor bothers to do this ...). If this condition not met it tries to disable ASPM, if it is denied by BIOS then it uses ASPM whatever the chipset is ...


This behaviour cannot be overridden. That basically means low chance  for having ASPM with the in-tree driver.

 

I also checked the r8125 driver (from Realtek) used by this plugin. It contains CONFIG_ASPM = n in the Makefile but this just sets the default value of ASPM, it is not a real compile time option. After installing this plugin you can easily enable ASMP if you create a file r8125.conf in /boot/config/modprobe.d with the following line:

options r8125 aspm=1

It enables ASPM the correct way. With this my server reaches C10 package state...

 

@jinlife please try to enable firmware load support with ENABLE_USE_FIRMWARE_FILE = y. The firmware files are already in /lib/firmware/rtl_nic/ as the in-tree driver uses them. Probably most of these cards are shipped with outdated firmware, so enabling this option would help.

Correction:  The r8125 source code contains the firmware file in binary form. No need to enable  ENABLE_USE_FIRMWARE_FILE.


The speed issues can be caused by EEE (Energy Efficient Ethernet) which is enabled by default by this driver. You can check the status with

ethtool --show-eee eth0

Or disable it with an extra line in r8125.conf 

options r8125 eee=0 

 

 

You rock.  This enabled it for me!  Still can't get lower than C2 but I'm hopefully headed in the right direction. 

  • Replies 460
  • Views 175.1k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • There are many unexplained  stories about Realtek cards and ASPM ... so I made a little investigation:   The kernel in-tree r8169 driver is a generic driver for all Realtek network cards, de

  • Thanks to ich777 and jinlife compiling the r8127 driver is incredibly easy: Just grab jinlife's repo (GitHub link) and compile it in ich777's unraid_kernel docker (GitHub link). Result: https://githu

  • Thanks for the plugins, looks like they are working fine both for the 8152 and 8125.   FYI, if with the 8152 you don't get 2.5GbE advertised link speed try adding to the go file:   e

Posted Images

I wonder if that EEE is why my Ethernet Adapter disconnects my server after a time when I have the driver installed.

Oof. Spent a ton of time trying to figure out why I am getting asymmetric speeds with this -- I have the WISDPI 5GBe USB adapter connected to a Lincstation N1, 4x 4TB NVMEs in a stripe / ZFS. Plugged into a 10GBe switch that supports 5GB. My PC is using a 10GBe card, plugged into the same switch.

 

Transferring data FROM the Lincstation/Unraid I am getting a bit over 400 MB/s, transferring from my PC to the Lincstation, I am seeing barely over 100 MB/s. There's no parity to worry about, etc. It's weird.

 

Transfers to my other NAS hard (QNAP + Synology) both see speeds in excess of 500 MB/s.

 

Any advice? Iperf3 stats for the Lincstation with the 5Gbe adapter below:

 

Accepted connection from 192.168.10.24, port 38842
[  5] local 192.168.11.66 port 5201 connected to 192.168.10.24 port 38844
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  76.6 MBytes   640 Mbits/sec
[  5]   1.00-2.01   sec  91.6 MBytes   764 Mbits/sec
[  5]   2.01-3.01   sec  74.8 MBytes   624 Mbits/sec
[  5]   3.01-4.01   sec  55.0 MBytes   466 Mbits/sec
[  5]   4.01-5.01   sec  60.1 MBytes   501 Mbits/sec
[  5]   5.01-6.00   sec  53.8 MBytes   455 Mbits/sec
[  5]   6.00-7.01   sec  57.6 MBytes   480 Mbits/sec
[  5]   7.01-8.02   sec   109 MBytes   908 Mbits/sec
[  5]   8.02-9.01   sec  98.5 MBytes   833 Mbits/sec
[  5]   9.01-10.00  sec  83.8 MBytes   707 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.00  sec   761 MBytes   638 Mbits/sec      sender
-----------------------------------------------------------
Server listening on 5201 (test #2)
-----------------------------------------------------------
Accepted connection from 192.168.11.65, port 37528
[  5] local 192.168.11.66 port 5201 connected to 192.168.11.65 port 37544
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   440 MBytes  3.68 Gbits/sec
[  5]   1.00-2.01   sec   451 MBytes  3.76 Gbits/sec
[  5]   2.01-3.00   sec   452 MBytes  3.82 Gbits/sec
[  5]   3.00-4.01   sec   469 MBytes  3.90 Gbits/sec
[  5]   4.01-5.00   sec   460 MBytes  3.89 Gbits/sec
[  5]   5.00-6.01   sec   471 MBytes  3.92 Gbits/sec
[  5]   6.01-7.00   sec   460 MBytes  3.89 Gbits/sec
[  5]   7.00-8.01   sec   473 MBytes  3.94 Gbits/sec
[  5]   8.01-9.00   sec   456 MBytes  3.85 Gbits/sec
[  5]   9.00-10.00  sec   464 MBytes  3.90 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.00  sec  4.49 GBytes  3.85 Gbits/sec   receiver

 

So glad I found this thread, new UD user here with a Gigabyte z790 motherboard using RTL8125. This driver has completely resolved all of the speed / crashing issues I was experiencing. 

My network card is a Realtek RTL8111G, and I am experiencing network issues on Unraid version 6.12.13. After installing the 'RTL8168(B)/RTL8111(B) PCI Drivers,' SMB file transfers are limited to just 12 MB/s.

I’d appreciate any advice or solutions to improve network performance or compatibility with this setup.

Edited by karto

1 hour ago, karto said:

MB file transfers are limited to just 12 MB/s.

Which direction? Have you tried with a different client?

7 minutes ago, trurl said:

Which direction? Have you tried with a different client?

both downloading and uploading.
I'm under windows 11, I also tried from windows 10 from another pc. In the end I tried to replace the lan cable thinking it was the culprit.

What do you mean by client?

Thank you for providing this plugin! I've been using it with a Realtek RTL8125 card since Unraid 6.12.10 and have found that the following settings in /etc/modprobe.d/r8125.conf give me 2.5 Gbit/s transfer speeds while achieving power states up to C6:
 

options r8125 aspm=1
options r8125 eee_enable=0

 

Unraid 6.12 was still using Linux kernel 6.1 and the last plugin version I see in my list is from 2024.04.04. The changelog for this date says "Bump version to 9.013.02" (which matches the text on GitHub).

 

I updated to Unraid 7 (Kernel 6.6.68) and according to "System Drivers" it loaded driver r8125 (9.014.01-NAPI-RSS) with state "Custom". This matches r8125.ko.xz, located in /lib/modules/6.6.68-Unraid/kernel/drivers/net/ethernet/realtek. This is the same file as in https://github.com/jinlife/unraid-r8125-r8152-driver/releases/tag/6.6.68-Unraid. Hence, Unraid is using the correct version for Kernel 6.6.68.

 

However, I'm a bit confused that the plugin hasn't been updated since 2024.04.04. Is the plugin version unrelated to the used driver version?  // EDIT: My bad, this was already answered here: 

 

Edited by Churro

  • 1 month later...

i installed this plugin , and tried all PCIe ACS override methods, but still they are in the same immo group

i just upgraded to unraid 7.0 

iShot_2025-02-20_10.55.25.png

iShot_2025-02-20_10.55.59.png

iShot_2025-02-20_11.01.44.png

On 2/19/2025 at 10:03 PM, allenchou1994 said:

tried all PCIe ACS override methods, but still they are in the same immo group

Some motherboard models won't allow the groups to be changed. Small chance BIOS upgrade or changes may help. If not, different model motherboard may be required.

I have a RTL8125 card, and it's showing that it's capable of 2500, but that the link partner isn't. However, I have the exact same card, plugged into the exact same switch with Proxmox and it shows that there's a link at 2500. I'm on Unraid 7.0.0.

 

root@JackSparrow:~# ethtool eth2
Settings for eth2:
        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: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Half 1000baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        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: on
        Supports Wake-on: pumbg
        Wake-on: d
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
        Link detected: yes

 

 

EDIT: So, I had the 2.5G card plugged into my 1G switch, and my 2.5G switch plugged into the onboard 1G iDRAC port. Oops.. All's working now lol.

 

root@JackSparrow:~# ethtool eth2
Settings for eth2:
        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: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
                                             2500baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 2500Mb/s
        Duplex: Full
        Auto-negotiation: on
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        MDI-X: on
        Supports Wake-on: pumbg
        Wake-on: d
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
        Link detected: yes

jacksparrow-diagnostics-20250224-0900.zip

Edited by pcamp96
I made a dumb

On 1/18/2025 at 12:05 PM, Churro said:

Thank you for providing this plugin! I've been using it with a Realtek RTL8125 card since Unraid 6.12.10 and have found that the following settings in /etc/modprobe.d/r8125.conf give me 2.5 Gbit/s transfer speeds while achieving power states up to C6:
 

options r8125 aspm=1
options r8125 eee_enable=0

 

Unraid 6.12 was still using Linux kernel 6.1 and the last plugin version I see in my list is from 2024.04.04. The changelog for this date says "Bump version to 9.013.02" (which matches the text on GitHub).

 

I updated to Unraid 7 (Kernel 6.6.68) and according to "System Drivers" it loaded driver r8125 (9.014.01-NAPI-RSS) with state "Custom". This matches r8125.ko.xz, located in /lib/modules/6.6.68-Unraid/kernel/drivers/net/ethernet/realtek. This is the same file as in https://github.com/jinlife/unraid-r8125-r8152-driver/releases/tag/6.6.68-Unraid. Hence, Unraid is using the correct version for Kernel 6.6.68.

 

However, I'm a bit confused that the plugin hasn't been updated since 2024.04.04. Is the plugin version unrelated to the used driver version?  // EDIT: My bad, this was already answered here: 

 

Hi Guys,

I´m starting with Unraid and I have build a new server.  I add "options r8125 eee_enabled=0" to the r8125.conf which is fond in flash drive /config/modprobe.d/ , on first restart it works, but then the added line is deleted. Can you help me to make this line persistent?

 

I've been getting lots of queue timeouts and subsequent crashes and NIC restarts with this driver when torturing it with iperf3 (at just Gigabit speeds). Played with EEE, Flow Control and Offload settings and it didn't make a difference.

Using one of the popular 11$ red-heatsinked Aliexpress RT8125B PCIe NICs which are also sold on Amazon.

 

Kernel driver r8169 seems to not exhibit this behaviour at all. Will be checking with 2.5gbit speeds once my switch arrives.

 

Edited by xploder270

I have this motherboard:  ASUS PRIME Z890M-PLUS WIFI Z890 LGA 1851 mATX motherboard, Intel® Core™ Ultra Series 2 Ready, Advanced AI PC-ready, 10+1+2+1 80A power stages, DDR5, PCIe® 5.0, USB Type-C®, 3x M.2, Wi-Fi 7, 2.5Gb LAN

 

And this processor: Intel Core Ultra 7 265K - Core Ultra 7 (Series 2) Arrow Lake 20-Core (8P+12E), LGA 1851, 125W Desktop Processor - BX80768265K

 

trying to run my fresh flash drive for 7.0.0, because i needed to start completely over from learning everything i have over the last 5 years. 

 

I'll put in new flash drive and it and it will go through its loading up and i noticed as it kinda pauses that Eth0 not found, then eventually gets to the point where i can login, but above that says i have no ipv4 or ipv6 address.

I have tried to put in the plugins manually and the .txz file to manually install package for from what i have been told is r8125 drivers that i need. each time i install package the reboot fails or let it run with .plg file in plugins folder it also fails. Can someone please help with this problem? I have been running Unraid non-stop for all these years with no hiccups. ....Until now.... I have no logs or diagnostics to provide now....and hardware just bought recently.

 

Edited by Digitalkiller

I solved my problem. Anyone ever run into this issue. message me and I will tell you how to do it extremely easy.

 

On 2/26/2025 at 8:20 PM, Digitalkiller said:

I have this motherboard:  ASUS PRIME Z890M-PLUS WIFI Z890 LGA 1851 mATX motherboard, Intel® Core™ Ultra Series 2 Ready, Advanced AI PC-ready, 10+1+2+1 80A power stages, DDR5, PCIe® 5.0, USB Type-C®, 3x M.2, Wi-Fi 7, 2.5Gb LAN

 

...Can someone please help with this problem? I have been running Unraid non-stop for all these years with no hiccups. ....Until now.... I have no logs or diagnostics to provide now....and hardware just bought recently.

 

You have the newer 8125D revision.  6.13 kernel has driver built in and supports ASPM.

 

8125E (may be just 8125D rev b) is coming soon.

When I use this driver, my log partition fills up within a few hours.  The log is full of the attached message sequence repeating itself.  After a few days, the driver seems to crash/freeze and the ethernet controller stops working until I reboot the box (idk if that issue related to this log message, but I assume it is).  I do not have such issues using the built in driver, but I would like to figure out the issues I'm having with this driver since it performs much better when it's working.  I have the RTL8125 but not sure which revision.  It's the cheap Cudy brand PCIe card purchased recently from Amazon.  The motherboard is a Gigabyte Aorus Gaming 7 Z370.  Thanks in advance for any advice!

TImaGYs.png

Hello :)
I tried to find a solution reading through this large topic, but ultimately i am stuck with my problem.

I am using this USB network adapter https://www.amazon.fr/dp/B0DM5GGT25
I change it to be eth0, changed the MTU to 9000 and, it is working somehow because I have access to the server and I see it in the System devices : Bus 004 Device 002 Port 4-2 ID 0bda:8156 Realtek Semiconductor Corp. USB 10/100/1G/2.5G LAN

 

I see that he can achieve 2500 using ethtool :

image.thumb.png.7fba23d136b28978909f1d5c5f64b19b.png

 

Yet i am stuck with 100Mbps speeds ...
image.png.3b6c5e4b1050b3cdd783096b77bca268.png

 

Can anyone have a look, please assume i am a not an expert ^^

thank you very much. 

tower-diagnostics-20250305-2055.zip

Just an head-up.

I had installed RTL8168 Drivers and everything was fine until upgrade of Unraid to 7.0.1.
Since then, i discovered my upload speed (and only the upload speed) was scaled down by about 25%.

I did various tests, then i tried uninstalling the drivers.
Done that, everything went back to normal.

C.

I'm in a similar boat.  I'm using a quad port 8125BG . Without the plugin, the r8169 module is loaded, with the plugin the r8125 module is loaded.

 

In both instances the ethernet ports constantly go up and down in a merry go round...

 

The errors with r8169 module:

Mar 14 13:30:28 Tower kernel: r8169 0000:0d:00.0 eth5: NETDEV WATCHDOG: CPU: 23: transmit queue 0 timed out 6135 ms
Mar 14 13:30:32 Tower kernel: r8169 0000:0a:00.0 eth2: NETDEV WATCHDOG: CPU: 23: transmit queue 0 timed out 5605 ms
Mar 14 13:30:32 Tower kernel: r8169 0000:0b:00.0 eth4: NETDEV WATCHDOG: CPU: 23: transmit queue 0 timed out 5614 ms
Mar 14 13:30:32 Tower kernel: r8169 0000:0b:00.0 eth4: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
Mar 14 13:30:34 Tower kernel: r8169 0000:0c:00.0 eth3: NETDEV WATCHDOG: CPU: 23: transmit queue 0 timed out 5084 ms
Mar 14 13:30:34 Tower kernel: r8169 0000:0c:00.0 eth3: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).
Mar 14 13:30:37 Tower kernel: r8169 0000:0b:00.0 eth4: NETDEV WATCHDOG: CPU: 23: transmit queue 0 timed out 5093 ms
Mar 14 13:30:37 Tower kernel: r8169 0000:0a:00.0 eth2: NETDEV WATCHDOG: CPU: 23: transmit queue 0 timed out 5111 ms
Mar 14 13:30:37 Tower kernel: r8169 0000:0b:00.0 eth4: rtl_rxtx_empty_cond == 0 (loop: 42, delay: 100).

 

 

And same errors with the 8125 plugin driver.

[   95.899187] r8125 Ethernet controller driver 9.014.01-NAPI-RSS loaded

...

 

[  155.929089] r8125 0000:0d:00.0 eth5: NETDEV WATCHDOG: CPU: 0: transmit queue 1 timed out 6008 ms
[  155.929106] r8125 0000:0d:00.0 eth5: Transmit timeout reset Device!
[  155.934102] r8125 0000:0d:00.0 eth5: Device reseting!
[  157.145057] r8125 0000:0a:00.0 eth2: NETDEV WATCHDOG: CPU: 9: transmit queue 1 timed out 6288 ms
[  157.145072] r8125 0000:0a:00.0 eth2: Transmit timeout reset Device!
[  157.150167] r8125 0000:0a:00.0 eth2: Device reseting!
[  158.169098] r8125 0000:0b:00.0 eth3: NETDEV WATCHDOG: CPU: 1: transmit queue 1 timed out 6688 ms
[  158.169121] r8125 0000:0b:00.0 eth3: Transmit timeout reset Device!
[  158.174114] r8125 0000:0b:00.0 eth3: Device reseting!
[  159.705112] r8125 0000:0c:00.0 eth4: NETDEV WATCHDOG: CPU: 0: transmit queue 1 timed out 6352 ms
[  159.705128] r8125 0000:0c:00.0 eth4: Transmit timeout reset Device!
[  159.710118] r8125 0000:0c:00.0 eth4: Device reseting!
[  160.399734] r8125: eth5: link up
[  162.895873] r8125: eth2: link up
[  163.664075] r8125: eth3: link up
[  165.520075] r8125: eth4: link up

 

so ports go up and down every few seconds.

 

I'm using the following in r8125.conf:
options r8125 aspm=1 eee=0
 

any tips or recommendations?

 

  • 2 weeks later...

I've been trying to get my last remaining ASPM issues under control, and it looks like I might need more help than I initially thought.

 

I have a Gigabyte B560M DS3H V2 (rev. 1.x) with a built-in chip that Unraid identifies as:

 

Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller (rev 16)

 

ethtool -i eth0
driver: r8169
version: 6.12.19-Unraid
firmware-version: rtl8168h-2_0.0.2 02/26/15
expansion-rom-version: 
bus-info: 0000:04:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no

 

This is Unraid 7.1.0-beta.1

 

Naively installing the RTL8168(B)/RTL8111(B) PCI Drivers via community apps simply killed my ethernet, so:

 

What chip do I have (not RTL8168H?) and what drivers I would need?

 

Github showed a build for kernel 6.12.19-Unraid, so I - maybe also naively - assumed this would work with the current beta.

 

Any idea where I went wrong here?

 

EDIT:

 

Forcing ASPM via

 

echo 1 | sudo tee /sys/bus/pci/drivers/r8169/0000:04:00.0/link/l1_aspm >/dev/null

 

completely tanks network speeds on Unraid's default drivers. Reading from Unraid appears surprisingly unaffected, but writing to an Unraid slows down to a crawl. Useless in that form.

 

Now I just have to figure out why these drivers won't work ...

Edited by csb

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.