1

I found a lot of answers like "you need r8168" or "you need r8169", but no explanation. I understood that it depends on the linux kernel, but I didn't find any list of kernels preferring one or the other in the first two pages of Google. So my subquestions:

  1. how can I find the right driver for any specific Ubuntu kernel?
  2. what is the key difference between r8168 and r8169 than makes them stable only with some kernels?
  3. EDIT: if there is no clear list, are there any rules behind "if there are problems and you don't have r8168, you probably need it" and "if there are problems and you already have r8168, you probably need to purge it"?

I have 16.04 with kernel 4.15.0-118-generic, but I'm more interested in the general principles than in what I should use now.

4

r8169 is an in-tree kernel driver that supports a few Ethernet adapters including R8168.

r8168 module built from source provided by Realtek.

In some cases new adapters don't get good support by Linux kernel immediately after they are released. In that case using r8168 makes sense as a temporary solution till Linux driver is fixed.

So if your Ethernet adapter works well, then there is no need to install r8168. People get problems if they install r8169-dkms and forget about it. Later they get a kernel upgrade to another major version and the driver doesn't build.

If you run apt show r8168-dkms, you'll see

This driver should only be used for devices not yet supported by the in-kernel driver r8169. Please see the README.Debian for instructions how to report bugs against r8169 that made it necessary to use r8168-dkms. . Installation of the r8168-dkms package will disable the in-kernel r8169 module. To re-enable r8169, the r8168-dkms package must be purged. . This package provides the dkms source code for the r8168 kernel modules. Kernel source or headers are required to compile these modules.

8
  • So it depends more on the exact ethernet adapter? However, I'm still not sure whether I understand the guidelines of installing or purging r8168-dkms - see my editted subquestion.
    – Pavel V.
    Oct 3 '20 at 14:01
  • As the README says, r8168 is only to add new devices. If your ethernet is working with the default r8169, there is no need whatsoever to add new device IDs. In other words, if the default driver covers devices 001, 002 and 003 and your device is 002 and works as expected with r8169, you needn't install r8168 which only covers newer devices 004 and 005.
    – chili555
    Oct 3 '20 at 15:25
  • @chili555 It is not only about IDs. In some cases r8169 works poorly with some revisions.
    – Pilot6
    Oct 3 '20 at 17:49
  • @Pilot6 Yes, indeed, and for reasons that are not at all clear.
    – chili555
    Oct 3 '20 at 19:10
  • 1
    It's not that simple. In my case r8169 fails to work or slow down the network after reboot occasionally. It's never an honest term saying 'a device is supported' in linux distros.
    – funicorn
    Apr 15 at 2:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.