I have a computer on which I've installed a custom linux system (created using Yocto). On a previous computer using this build, the network interface worked fine, but on this new computer, eth0 doesn't show at all. I know how to bring a network interface online and configure it if it's been recognized by the OS and has a name (eth0), but I don't know how to create that eth0 in the first place if it's not there.

First, I'll note that if I boot Ubuntu, it recognizes it and it works fine, so there's no hardware issue, and linux is definitely capable of working with this hardware.

Second, I can see the NIC with lspci:

root@intel-corei7-64:/etc# lspci -v -s 01:00.0
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
        Subsystem: Mitac Device 0787
        Flags: fast devsel, IRQ 23
        I/O ports at e000 [size=256]
        Memory at 91104000 (64-bit, non-prefetchable) [size=4K]
        Memory at 91100000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Endpoint, MSI 01
        Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Capabilities: [160] Device Serial Number 44-01-00-00-68-4c-e0-00
        Capabilities: [170] Latency Tolerance Reporting
        Capabilities: [178] L1 PM Substates
        Kernel modules: r8169

Third, I believe I have the driver installed:

root@intel-corei7-64:/etc# lsmod | grep r8169
r8169                  77824  0
libphy                 61440  2 r8169,realtek

I'm not sure where to go from here. ip link show doesn't display the interface as an option. I'm not sure why the interface isn't being created automatically, or how to manually create it.

I'll also note that when I plug in my USB -> ethernet connector, eth0 comes online and configures correctly. But the built in NIC isn't working.

Lastly, dmesg shows a line that might be relevant, but I don't really know what it means:

igb: Intel(R) Gigabit Ethernet Network Driver - version 5.6.0-k

Also I have these messages in dmesg:

r8169 0000:01:00.0: enabling device (0000 -> 0003)
r8169: probe of 0000:01:00.0 failed with error -5
r8169: probe of 0000:01:00.0 failed with error -5

Any ideas of how I get this NIC online?

  • Look at ip link. It might not be named eth0 anymore.
    – waltinator
    Sep 9, 2021 at 18:26

3 Answers 3


The r8169 module is a driver for a number of Realtek NICs. Many of those require a firmware package to initialize the NIC successfully.

Check your dmesg listing (e.g. dmesg | grep firmware): you might find a message like Unable to load firmware <name of firmware file>. That would mean you'll have to supply that firmware file.

Since you have a custom system, it might be easiest for you to download that file from the linux-firmware Git repository and place it into /lib/firmware/rtl_nic/ directory on your system.

In Ubuntu, the Realtek NIC firmware files are available as package firmware-realtek, and the installer is probably smart enough to add it automatically during the OS installation process if it detects you'll need it.

Once you have the firmware file in place, unload & reload the r8169 module:

modprobe -r r8169
modprobe r8169

Now that the module can find the firmware file and feed it to the NIC hardware, the card should be able to initialize correctly.

It is possible that some hardware devices might need multiple firmware files, so if the NIC still does not become available, check the end of the dmesg listing again for new messages.

  • Thank you so much for the great reply! This seemed like a rock solid theory, but it's not working out. I don't see any error messages about firmware in dmesg. And I have 26 files in /lib/firmware/rtl_nic, which look about the same as the repo you posted. I do have the following messages in dmesg, though: r8169 0000:01:00.0: enabling device (0000 -> 0003) r8169: probe of 0000:01:00.0 failed with error -5 r8169: probe of 0000:01:00.0 failed with error -5
    – Dave
    Sep 9, 2021 at 20:10
  • I went ahead and replaced all the rtl_nic firmware files with the ones from the repo, but no luck.
    – Dave
    Sep 9, 2021 at 20:21
  • Would I be able to learn anything useful from the Ubuntu system which does work properly?
    – Dave
    Sep 9, 2021 at 20:24
  • 1
    error -5 seems to be an I/O error, so the driver is trying to initialize the NIC but failing. You could use sudo ethtool -i eth0 (change the interface name if necessary) on the Ubuntu system to verify the name and version of the driver used for the NIC there. There are some Realtek NICs which may require a newer kernel, or even a different driver module.
    – telcoM
    Sep 9, 2021 at 20:55

An error -EIO means that something on a lower level than network driver fails. You could check the following report: https://bugzilla.kernel.org/show_bug.cgi?id=203025 Alternatively do some printf debugging to see where exactly something fails. Going in detail through the dmesg log may also provide a hint. The igb-related message has no relevance here. Maybe you miss some basic config option for PCI(e) support.


I upgraded to the latest version of yocto, which includes the 5.10 linux kernel. I don't know exactly what fixed it, but it's working now. Not a satisfying fix, but it works.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .