- Disable rootfs protection and activate apt/dpkg for dkms driver package install
sudo /usr/local/libexec/disable-rootfs-protection- Blacklist of r8169 realtek driver, because its loading wrong
sudo echo "blacklist r8169" > /etc/modprobe.d/blacklist-r8169.conf- Download latest debian dkms realtek driver package from github:
Example: https://github.com/awesometic/realtek-r8125-dkms/releases
- Update Packages List - because TrueNAS Scale Appliance Image doesnt have it:
sudo apt-get update- Because of maybe "sudo: argv[2] mismatch" - you have to enable diable sudo intercept_verify:
sudo visudoAdd:
Defaults !intercept_verifyPlease remove this sudo setting after driver is build - installed and working!
- Installing dkms driver package + other dependencies (I got network up and running over USB-LAN Adapter)
sudo dpkg -i realtek-r8125-dkms_9.016.01-1_amd64.deb- If errors happen, maybe fix broken
sudo apt install --fix-broken- Also required - because of the blacklist r8169 driver - initramfs update!
sudo update-initramfs -uand Just reboot!
Thats all - the cheap internal realtek card is finally working, also with 2,5GBIT:
root@truenas[~]# ethtool enp6s0
Settings for enp6s0:
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
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: yesThis needs to be done after each TrueNAS Scale Upgrade! I provide soon a prehook script, which should be useful to do manual tasks after upgrades!
Have Fun with TrueNAS!
This provides Realtek r8125 driver in DKMS way so that you can keep the latest driver even after the kernel upgrade.
This DKMS package is for Realtek RTL8125 (r8125 in module name) Ethernet, which is designed for the PCI interface.
If you are searching for the Realtek 2.5 Gbits USB Ethernet, which may use RTL8156 (r8152 in module name), you are in the wrong place. Please refer to another DKMS project for that Realtek driver.
There are 3 ways to install this DKMS module. Choose one as your tastes.
Those are not interfering with each other. So you can do all 3 methods but absolutely you don't need to.
Installation using the Debian package is recommended for the sake of getting the newer driver.
Download the latest Debian package from the Release tab on the Github repository.
Then enter the following command.
sudo dpkg -i realtek-r8125-dkms*.debIf multiple files selected by the wild card, you should type the specific version of the file.
sudo dpkg -i realtek-r8125-dkms_9.016.01-1_amd64.deb
If dependency error occurs, try to fix that with apt command.
sudo apt install --fix-brokenAdd the Launchpad PPA.
sudo add-apt-repository ppa:awesometic/ppaThen install the package using apt tool.
sudo apt install realtek-r8125-dkmsUsing the autorun.sh script that Realtek provides on their original driver package. This is not installed as a DKMS, only efforts to the current kernel.
Download or clone this repository and move to the extracted directory, then run the script.
sudo ./autorun.shThis script is from aircrack-ng team. You can install the DKMS module by a simple command.
Download or clone this repository and move to the extracted directory, then run the script.
sudo ./dkms-install.shAfter installing the DKMS package, you may not be able to use the new r8125 module on the fly. This because the existing r8169 module will be loaded priority to r8125 so that it prevents working of the r8125 module.
Check if the r8169 module loaded currently.
lsmod | grep -i r8169If there is a result, maybe the r8125 module wasn't loaded properly. You can check out modules currently in use via lspci -k or dmesg too.
To use the r8125 module explicitly you can add the r8169 module to not be loaded by adding it to a blacklist file.
Enter the following command to configure the blacklist.
sudo tee -a /etc/modprobe.d/blacklist-r8169.conf > /dev/null <<EOT
# To use r8125 driver explicitly
blacklist r8169
EOTTo apply the new blacklist to your kernel, update your initramfs via
sudo update-initramfs -uFinally, reboot to take effect.
- If you need to load both r8169 and r8125, maybe removing r8125 firmware could make it work. Please enter
sudo rm -f /lib/firmware/rtl_nic/rtl8125*to remove all the r8125 firmwares on the system. But it is just a workaround, you should have to do this every time installing the new kernel version or new Linux firmware.- In the case of the Debian package, I will update the scripts to make it do this during the installation.
You can build yourself this after installing some dependencies including dkms.
sudo apt install devscripts debmake debhelper build-essential dkms dh-dkmsdpkg-buildpackage -b -rfakeroot -us -ucGPL-2 on Realtek driver and the debian packaing.