How to Install the RTL8125B NIC Driver on the ODROID H2+ for Windows 10 or Linux


The original ODROID-H2 and H2 REV.B carried two 1GbE NIC whose driver is included in both Windows 10 and recent Linux distributions. On the other hand the ODROID-H2+ (a.k.a. REV.B+) is equipped with two 2.5GbE NIC based on the Realtek 8125B chipset. This chipset is rather recent and its support in stock Windows 10 is kind of lackluster and even non-existing in many recent Linux distributions.

For Linux, see the discussion here: https://www.spinics.net/lists/netdev/msg658594.html

So as of this writing (June 2020) and in both cases, Windows 10 and Linux, you have to manually install the Realtek 8125B driver after you have installed the operating system. There is no doubt that the driver will end up in the upstream OSes at some point, but for now you have to install the driver yourself. It’s a rather simple affair anyway.

1. This page assumes that you have an Internet connection via WiFi or phone hotspot. In both cases, temporarily plug in a USB WiFi adapter such as the ODROID 300Mbps is needed.

  • For Linux it is a good idea to plug in the wireless thumb at OS install time so that you can connect to the wireless network while installing and then update the installation before installing the driver.

2. If you do not have a wireless network or a wireless thumb at hand, you can still reach the Internet via phone USB tethering. If you are going to use phone USB tethering, follow the instructions at the bottom of this page and then come back here.

If you have a phone hotspot or phone USB tethering, check section Connecting to Internet if you are not sure about how to connect with your phone.

If you cannot connect your ODROID-H2+ to the Internet via wireless, hotspot or tethering, you can download the necessary driver files on another PC, copy them to a USB drive and then plug that USB key into the H2+. See section Installing without Internet at the bottom of this page (Linux). For Windows, just copy the installer and run it as described below.

Once you have installed Windows 10 as well as updated it with all the current patches, go to the Realtek driver download page at: https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software

Note that the default RTL8125B driver in the Windows 10 is much slower than the Realtek's driver.

Download Win10 Auto Installation Program (Sid:1152921505689747939):

Unzip the archive, run the installer following the instructions. Once the installation is completed, you can check for the presence of the two NICs in Settings looking for View Network Connections. If they do not appear, reboot and go back to Settings afterwards. If you want to let the connection(s) use DHCP, you have nothing more to do. You’re done.

If you want to use fixed IP addresses and other options, you know what to do.

There are at least three ways you can install the Realtek 8125B driver:

1. Installing the package from the PPA (Personal Package Archives) provided by Hardkernel. This works for distributions based on Debian and using apt repositories, e.g. Ubuntu. For other Linux distributions (non-Debian or non-apt) use one of the next two solutions.

2. Download the .deb package Hardkernel prepare for you and install it. This is GUI-based and perfect for users not confident enough with the console. This method only works for Debian-based Linux distributions. If you are not using a Debian-based Linux distribution, you have to manually install the driver. We are not as of this writing providing the package in other formats, i.e. RPM file.

3. Download the driver source code, build it and install it. For users used to do such manual builds, it is quite easy.

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

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

Download the package file from there: https://github.com/awesometic/realtek-r8125-dkms/releases/download/9.004.01-1/realtek-r8125-dkms_9.004.01-1_amd64.deb

Wait for the download to complete and then go to your Downloads folder. If you are using a Debian-based distribution that includes the GUI for installing packages, like Ubuntu 20.04 for instance, double-click on the downloaded package and click Install Package in the package window that just opened.

You are done.

Using the GUI-based connection settings window, click Add Connection (or equivalent) and configure the NIC(s) at your convenience. If Add connection does not show any Wired Connections, reboot and try again. If the connections still do not show up go to the Troubleshooting section.

In order to be able to build and install the driver from source, you need a minimal set of development tools installed. To do so:

...$ sudo apt install build-essential dkms

In a console window:

...$ cd ~/Downloads
...$ wget https://github.com/awesometic/realtek-r8125-dkms/archive/master.zip -O realtek-8125-dkms.zip
...$ unzip realtek-r8125-dkms-master.zip
...$ cd realtek-r8125-dkms-master/
...$ sudo ./autorun.sh

If you do not want to use wget use whatever command your prefer (e.g. git clone).

After executing these commands, you should have the two NICs available for configuration using the Network Manager or equivalent.

If you want to know what the autorun.sh does before executing it, just open it in your favorite text editor (vim, pluma, etc).

You can also find inside the folder the file REALTEK_README.txt which provides additional information.

This section provides tips and tricks for troubleshooting your Linux configuration.

This one is for users owning both H2 and H2+ and installing in the middle night without food or coffee :-) The two models have essentially the same looking board. A good trick is to put a sticker somewhere, i.e. on the top of a RJ45 plug to distinguish them. Otherwise a quick way to find out which is which when they are already running it is to use lspci to make the distinction:

On H2+:

...$ lspci | grep -i realtek
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 04)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 04)

On H2:

...$ lspci | grep -i realtek
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)

You can use ip a:

...$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 00:e0:4c:68:00:09 brd ff:ff:ff:ff:ff:ff
    inet brd scope global dynamic noprefixroute enp2s0
       valid_lft 86370sec preferred_lft 86370sec
    inet6 fe80::39fe:8b36:f3ec:fe24/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 00:e0:4c:68:00:0a brd ff:ff:ff:ff:ff:ff

In the listing above, the first NIC appears as enp2s0, its links is up and it is configured with a static IP. The second NIC is not currently connected.

  • Depending on the distribution you use, the two NIC may appear with a different name.

Check whether or not the r8125 module is loaded using lsmod:

...$ lsmod | grep r8
r8125                 147456  0
r8169                  90112  0

If the line r8125 does not show up, try to load it with modprobe:

...$ modprobe r8125

If no error is reported, the module should be loaded, call lsmod | grep r8 again to double check. In theory, you only have to do so once.

If errors are reported then it all depends on the nature of the errors and if you are stuck, your best bet is Google or Bing, and then if you are still stuck your next step is the Odroid forums or any good Linux forums.

You can use the Settings / Network or Connections GUI window. You can also use the console ncurses-based nmtui (google or bing for “nmtui howto”).

One way it to use ethtool:

...$ sudo apt install ethtool
...$ ethtool enp2s0
Settings for enp2s0:
	Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/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 
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Speed: 2500Mb/s
	Duplex: Full
	Port: Twisted Pair
	Transceiver: internal
	Auto-negotiation: on
	MDI-X: Unknown
Cannot get wake-on-lan settings: Operation not permitted
	Current message level: 0x00000033 (51)
			       drv probe ifdown ifup
	Link detected: yes
  • We recommend using Smartphone USB tethering in view of the convenience of setting it up. With USB tethering, your H2+ seamlessly recognizes the connection as a regular wired connection so that you do not have to configure anything.

If you have a smartphone, you can share your smartphone Internet connection with your H2+. To do so:

- Connect your smartphone and H2+ with the phone USB cable. - Enable USB tethering in your phone settings.

Since we can't use the Internet with the new Ubuntu installed H2 Plus, you should use a USB WiFi module on it.

If we look at Hardkernel products, these 2 products can be used without installing any additional drivers.

Or you can use an Ethernet adapter connected using USB ports.

Most of them support Linux but you should check the compatibility before purchasing one.

You can manually install the realtek-r8125 DKMS, which includes the mentioned one above, without an Internet connection at the time of installation. Follow these steps right after the OS has been installed.

Since there's no Internet after installing the OS, you can't fetch the remote repositories. But you can use the contents of the installation media as a package repository so that you can install the necessary packages. Once you insert again the USB installation media, it will mount that under /media/$USER directory. You need to unmount that and mount again to the /media/cdrom directory.

...$ umount /media/$USER/Ubuntu*
...$ sudo mkdir /media/cdrom

The installation media is not recognized to the specific device node every time. So to mount the proper block device where your installation media, enter the following command.

...$ sudo mount $(sudo fdisk -l | grep "0 Empty" | awk '{ print $1 }') /media/cdrom
  • If you are stuck here, you can check where the USB drive located by yourself.
    • Check the storage size, model name, etc to know which disk drive is the Ubuntu installation USB media. In the case of the Sandisk Ultra USB 3.0 16GB model with Ubuntu installer flashed, it looks like the below.
...$ sudo fdisk -l
Disk /dev/sdb: 14.33 GiB, 15376000000 bytes, 30031250 sectors
Disk model: Ultra USB 3.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x56f48570
Device     Boot   Start      End  Sectors  Size Id Type
/dev/sdb1  *          0  5439487  5439488  2.6G  0 Empty
/dev/sdb2       5017392  5025327     7936  3.9M ef EFI (FAT-12/16/32)
/dev/sdb3       5439488 30031249 24591762 11.7G 83 Linux
  • In this case, you can mount /dev/sdb1 to /media/cdrom directory.
...$ sudo mount /dev/sdb1 /media/cdrom

Check if the correct partition mounted.

...$ df -Th | grep cdrom
/dev/sdd1      iso9660   2.6G  2.6G     0 100% /media/cdrom

Check that iso9660 string exists.

Then set the mounted partition as an apt repository.

...$ sudo apt-cdrom add -d /media/cdrom -m
Using CD-ROM mount point /media/cdrom/
Identifying... [262d29a6a66e8f1bebc790a773ce80ec-2]
Scanning disc for index files...
Found 4 package indexes, 0 source indexes, 0 translation indexes and 1 signatures
This disc is called: 
'Ubuntu 20.04 LTS _Focal Fossa_ - Release amd64 (20200423)'
Copying package lists...gpgv: Signature made ---- -- -- (-) 
gpgv:                using RSA key D94AA3F0EFE21092
gpgv: Good signature from "Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>"
Reading Package Indexes... Done
Writing new source list
Source list entries for this disc are:
deb cdrom:[Ubuntu 20.04 LTS _Focal Fossa_ - Release amd64 (20200423)]/ focal main restricted
Repeat this process for the rest of the CDs in your set.

Finally, you can install the downloaded the realtek-r8125-dkms debian package. Enter the following command to install.

...$ sudo apt install ./realtek-r8125-dkms*.deb

Although if you got something unexpected error, you still can install it further by fixing the broken packages.

...$ sudo apt install --fix-missing
  • odroid-h2/application_note/install_ethernet_driver_on_h2plus.txt
  • Last modified: 2020/12/08 10:08
  • by odroid