r8168/r8169 - which one should I use?
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.
Related videos on Youtube
Pavel V.
I'm a beginning expert on computer applications in archaeology - especially GIS (ArcGIS, QGIS) and databases (PostgreSQL, MySQL), but I also dabble in making websites (html/css and I learn php and JavaScript). He on SO, I'm sort of a "noob pioneer", asking stupid questions that other noobs wanted to know but are afraid to ask themselves. I hope I'll be able to share information about my native language here on SE.
Updated on September 18, 2022Comments
-
Pavel V. over 1 year
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:
- how can I find the right driver for any specific Ubuntu kernel?
- what is the key difference between r8168 and r8169 than makes them stable only with some kernels?
- 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. over 3 yearsSo 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.
-
chili555 over 3 yearsAs 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.
-
Pilot6 over 3 years@chili555 It is not only about IDs. In some cases
r8169
works poorly with some revisions. -
chili555 over 3 years@Pilot6 Yes, indeed, and for reasons that are not at all clear.
-
Pilot6 over 3 years@chili555 The reasons are clear enough. Realtek release new hardware revisions that are not really supported by kernel. They provide Linux drivers at their site, that are
r8168
. Later kernel developers add support of new revisions. So it is clear to me. -
Pavel V. over 3 yearsThe point of my question is how to be (almost) sure if the cause for generic problems if I have only r8169 is in it (and I need r8168) or somewhere else. A list of the revisions with which r8169 works poorly would help a lot - if it exists.
-
Pilot6 over 3 yearsThis is a moving target. If a new hardware revision works poorly with a specific kernel, it makes sense to try the latest
r8168
. As simple as that. -
funicorn about 3 yearsIt'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.