How to Install the Ethernet Driver on ODROID-H3/H3+

If you experience speeds from 2.25 to 2.35 Gb/sec, all is fine you have nothing to do.

If you witness sub-1GbE speeds (e.g. ~700-900 Mb/sec) on a 2.5GbE sub-net, installing the current driver from the Realtek Web site will solve the speed issue.

Please visit this Realtek download page.

Click on the download icon for the driver highlighted in the screenshot shown above. Once the download is completed, extract the archive and run the installer.

You're done.

  • We have confirmed this on Ubuntu 22.04 LTS.

There is an r8169 driver for the RTL8125B series in the Linux kernel 5.9 and above, but the stock driver in the Linux kernel tree has 15~30% lower performance than the vendor's custom driver (Realtek r8125) on a 2.5GbE subnet.
You can leave the r8169 driver as it is if you do not want to bother and leverage the better performance. See Performance test results

  • You still need to build the driver if you install the new kernel via apt package manager.
    • To avoid that bothering thing, you can install the r8125 driver as a DKMS module that follows this below.

To enable this chipset on your Linux system, you have to download the r8125 driver from Realtek websites.

Please visit this Realtek download page.

Then you can see the Linux driver as the below screenshot showed.

Check the red box on the screenshot, the driver that we can use is 2.5 Ethernet LINUX driver r8125 for kernel up to.

Download that file and extract that, then you can see these files.

tree r8125-9.009.02
├── autorun.sh
├── Makefile
└── src
    ├── Makefile
    ├── Makefile_linux24x
    ├── r8125_dash.h
    ├── r8125_firmware.c
    ├── r8125_firmware.h
    ├── r8125.h
    ├── r8125_n.c
    ├── r8125_ptp.c
    ├── r8125_ptp.h
    ├── r8125_realwow.h
    ├── r8125_rss.c
    ├── r8125_rss.h
    ├── rtl_eeprom.c
    ├── rtl_eeprom.h
    ├── rtltool.c
    └── rtltool.h

1 directory, 19 files

Before installing the new module, you have to install build tools.

sudo apt install build-essential

Fortunately, only one thing we're going to use is autorun.sh file. Open a terminal and move to the extracted directory, then enter the following command.

sudo ./autorun.sh

Then all of the module installation processes are performed automatically.

odroidh3@odroidh3:~/r8125/r8125-9.009.02$ sudo ./autorun.sh
Check old driver and unload it.
rmmod r8169
rmmod r8125
Build the module and install
Skipping BTF generation for /home/odroidh3/r8125/r8125-9.009.02/src/r8125.ko due to unavailability of vmlinux
arch/x86/Makefile:142: CONFIG_X86_X32 enabled but no binutils support
At main.c:160:
- SSL error:FFFFFFFF80000002:system library::No such file or directory: ../crypto/bio/bss_file.c:67
- SSL error:10000080:BIO routines::no such file: ../crypto/bio/bss_file.c:75
sign-file: certs/signing_key.pem: No such file or directory
Warning: modules_install: missing 'System.map' file. Skipping depmod.
Backup r8169.ko
rename r8169.ko to r8169.bak
DEPMOD 5.15.0-46-generic
load module r8125
Updating initramfs. Please wait.
update-initramfs: Generating /boot/initrd.img-5.15.0-46-generic

After finishing the installation process, you can promptly use the internet with the onboard Ethernet ports.

The screenshot above is the network setting appearance if all 2 ports are connected as 2.5 Gbits modes.

You can add Hardkernel's PPA simply on the console with several command lines.

Before adding the repository, make sure that the tool for adding a repository is installed.

...$ sudo apt install software-properties-common

Then add Hardkernel's PPA.

...$ sudo add-apt-repository ppa:hardkernel/ppa

Then the OS runs apt update automatically if you're using Ubuntu 18.04 or up. If not, you should do that on yourself.

...$ sudo apt update

Now you can simply install the r8125 DKMS package with its dependencies.

...$ sudo apt install realtek-r8125-dkms

If you have modules r8169 and r8125 loaded at the same time, you should be added r8169 to the blacklist.
From the next boot on, will be loaded r8125 module only.

...$ lsmod | grep r8
r8125                 221184  0
r8169                 102400  0
...$ echo "blacklist r8169" | sudo tee /etc/modprobe.d/blacklist-odroidh3.conf
blacklist r8169
...$ sudo update-initramfs -u
...$ sudo reboot

You're done. If the new update delivered, you can keep the driver version to the latest via apt tool.

You can get the approximate speed as in the below table. Performed with iperf3 tool.

  • Test environment
    • iperf3 server and client are all H3
    • Ubuntu 22.04 LTS, kernel 5.15.0-46, Realtek r8125 driver 9.009.02
    • All speeds in Mbits/sec

2.5 Gbits

kernel module r8125 r8169
Send 2340 1630
Receive 2340 1630

1 Gbits

kernel module r8125 r8169
Send 942 942
Receive 940 939
  • odroid-h3/hardware/install_ethernet_driver_on_h3plus.txt
  • Last modified: 2022/10/27 02:55
  • by dominique