0

I just got a Dell Inspiron 5565. It has a realtek r8169 gigabit network card which connects at 100 Mbps (instead of 1000 Mbps) with my install of Ubuntu 18.04 LTS. I tried to download the driver from realtek, and followed the directions. Here is the link to the driver, the readme file has the directions :). Realtek r8169 Driver

I installed make using sudo apt-get install make WHen I try to sudo make clean modules I get the error:

make -C src/ clean
make[1]: Entering directory '/home/username/Documents/r8169-6.025.03/src'
make -C /lib/modules/4.15.0-22-generic/build SUBDIRS=/home/username/Documents/r8169-6.025.03/src clean
make[2]: Entering directory '/usr/src/linux-headers-4.15.0-22-generic'
  CLEAN   /home/username/Documents/r8169-6.025.03/src/.tmp_versions
make[2]: Leaving directory '/usr/src/linux-headers-4.15.0-22-generic'
make[1]: Leaving directory '/home/username/Documents/r8169-6.025.03/src'
make -C src/ modules
make[1]: Entering directory '/home/username/Documents/r8169-6.025.03/src'
make -C /lib/modules/4.15.0-22-generic/build SUBDIRS=/home/username/Documents/r8169-6.025.03/src modules
make[2]: Entering directory '/usr/src/linux-headers-4.15.0-22-generic'
arch/x86/Makefile:156: CONFIG_X86_X32 enabled but no binutils support
./scripts/gcc-version.sh: line 26: gcc: command not found
./scripts/gcc-version.sh: line 27: gcc: command not found
make[2]: gcc: Command not found
Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
  CC [M]  /home/username/Documents/r8169-6.025.03/src/r8169_n.o
/bin/sh: 1: gcc: not found
scripts/Makefile.build:332: recipe for target '/home/username/Documents/r8169-6.025.03/src/r8169_n.o' failed
make[3]: *** [/home/username/Documents/r8169-6.025.03/src/r8169_n.o] Error 127
Makefile:1552: recipe for target '_module_/home/username/Documents/r8169-6.025.03/src' failed
make[2]: *** [_module_/home/username/Documents/r8169-6.025.03/src] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.15.0-22-generic'
Makefile:61: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/home/username/Documents/r8169-6.025.03/src'
Makefile:41: recipe for target 'modules' failed
make: *** [modules] Error 2

If I move ahead to sudo make install I get the error:

make -C src/ install
make[1]: Entering directory '/home/username/Documents/r8169-6.025.03/src'
make -C /lib/modules/4.15.0-22-generic/build SUBDIRS=/home/username/Documents/r8169-6.025.03/src INSTALL_MOD_DIR=kernel/drivers/net/ethernet/realtek modules_install
make[2]: Entering directory '/usr/src/linux-headers-4.15.0-22-generic'
arch/x86/Makefile:156: CONFIG_X86_X32 enabled but no binutils support
Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
  DEPMOD  4.15.0-22-generic
make[2]: Leaving directory '/usr/src/linux-headers-4.15.0-22-generic'
make[1]: Leaving directory '/home/username/Documents/r8169-6.025.03/src'

So my questions are, why doesn't the built in kernel module support gigabit connections? Also, What should I do? A debian forum suggests that you have to load the realtek firmware to get Gigabit performance. Thanks in advance :).

Update: 6/12/2018 At this point I installed the missing dependencies and tried the realtek r8169 drivers and the r8168dkms drivers with the same result. I tried to Known Good (KG) cat 6 cables that connect at gigabit on another Ubuntu 16.04 system. I tested them in my Netgear Nighthawk R7000 Router which is running firmware version V1.0.9.26_10.2.31. I even connected directly to the cable modem. I tried forcing Gigabit with sudo ethtool -s enp1s0 speed 1000 duplex full I went into the router settings too and made my machine the highest priority. The result was the same. 100 MBits.

Jon
  • 59
  • 1
  • 7

5 Answers5

1

I had the same issue with 18.04 built-in r8169 driver not being able to negotiate gigabit speed. Then I found this in kernel log (dmesg | grep r8169):

[    3.484886] r8169 0000:01:00.0 eth0: RTL8168g/8111g at 0x        (ptrval), 84:39:be:65:a4:1c, XID 0c000800 IRQ 119
[    3.484891] r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]

It seems to me the driver struggled at finding the address/port number (?) of the NIC. Fortunately re-trying initialization again made the issue go away. Maybe it's a timing issue?

What I did was to add several lines into rc.local to force reloading the r8169 kernel module:

rmmod r8169
sleep 2
modprobe r8169

Then the kernel log changes to this:

[   24.366692] r8169 0000:01:00.0 eth0: RTL8168g/8111g at 0x00000000955f6cfd, 84:39:be:65:a4:1c, XID 0c000880 IRQ 119
[   24.366700] r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]

From this point on, it works on gigabit speed without any more issues.
Hope this helps.

zx485
  • 2,865
0

It looks like you currently have a couple errors that are preventing you from compiling and installing the driver (but there may be others, I can't tell from the given information).

  1. ./scripts/gcc-version.sh: line 26: gcc: command not found. It appears as though you do not have gcc installed. Run apt install gcc.

  2. "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" Looks like you needs to install these packages as well.

  3. CONFIG_X86_X32 enabled but no binutils support. You may not have binutils package installed, or it might need the binutils-dev package.

crass
  • 495
0

The driver that you're trying to install only is for kernels up to 4.7.

The Ubuntu supplied r8169 driver (has been) known to be flawed with ethernet disconnects for some time.

You've either got the wrong ethernet cable, or plugged into a non-gigabit network switch/hub/router.

Or you need to install r8168-dkms to solve your problem.

heynnema
  • 73,649
0

When i had no internet on Realtek 8168/8169, this worked to fix it:

sudo apt install r8168-dkms
reboot
16851556
  • 677
0

after a ~ week of investigation for me was because of copper RJ45 pass-through!!yes not cable,driver,kernel or network config,it's a copper Believe or not, please try to change it first
the situation:
normally: just running on 100mb or less (not more)
I try(not work):

  • force it by negation (for each side)
  • force it to 1GB (directly) (for each side)

copper RJ45 pass-through

Zaman Oof
  • 227
  • 1
  • 7