8

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 sub-questions:

  1. How can I find the right driver for any specific Ubuntu kernel?
  2. What is the key difference between r8168 and r8169 that makes them stable only with some kernels?
  3. (Later 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.

Pavel V.
  • 266

1 Answers1

10

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.

Pilot6
  • 92,041