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
  • 1
    Let's start with your real network card model. Post the output of lspci -knn | grep Eth -A3 command. – Pilot6 Jun 07 '18 at 18:40
  • or even better, post the output of the wireless info script. https://askubuntu.com/a/425205/669014 – AlexOnLinux Jun 07 '18 at 20:33
  • lspci -knn | grep Eth -A3 01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller [10ec:8136] (rev 07) Subsystem: Dell RTL810xE PCI Express Fast Ethernet controller [1028:0769] Kernel driver in use: r8169 Kernel modules: r8169 02:00.0 Network controller [0280]: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter [168c:0042] (rev 31) – Jon Jun 08 '18 at 16:38
  • 1
    @K7AAY Sorry about that. I put my updates above :). Please let me know if this doesn't meet the standard. I want my documentation to be clear. – Jon Jun 13 '18 at 03:57
  • That's excellent, Jon! – K7AAY Jun 13 '18 at 18:50

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,426
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
  • 465
  • Thanks, I'll try the r8168-dkms driver above first and see what happens :). – Jon Jun 08 '18 at 16:36
  • Ok, I actually added the dependencies and tried this solution first. The driver loaded but still connects at 100 MBits. I know the cable is good, btw, because another system connects at 1 Gigabit using the same cable. – Jon Jun 08 '18 at 16:51
  • Always put @heynnema in your comments, or I'll miss them. Try a different cable. – heynnema Jun 08 '18 at 18:40
  • @heynnema I tried 2 cat6 cables, from different manufacturers, that connect at Gigabit on another system running ubuntu 16.04. – Jon Jun 08 '18 at 21:25
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
  • 70,711
  • Thanks, I know the ethernet cable is good since it is Cat 6 and provides gigabit connection on a desktop that has a gigabit card running Ubuntu 16.04. I'll try the r8168-dkms and let you know :). – Jon Jun 08 '18 at 16:35
  • @Jon try plugging the cat6 cable directly from the computer into your cable/DSL router and see if you get gigabit speeds. – heynnema Jun 09 '18 at 02:09
  • I tried that and I still get 100Mbits. I also tried using sudo ethtool -s enp1s0 speed 1000 duplex full and received the error: Cannot set new settings: Invalid argument not setting speed not setting duplex @heynnema – Jon Jun 09 '18 at 05:48
  • @Jon I'm at a loss. Sorry I couldn't help more. – heynnema Jun 09 '18 at 14:00
0

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

sudo apt install r8168-dkms
reboot
16851556
  • 561
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
  • 229
  • 1
  • 7
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review – pbhj Dec 16 '22 at 13:17
  • nearly a week try to fix this, and then was the problem bcs of copper (the hardware side) believe or not – Zaman Oof Dec 16 '22 at 13:35
  • It's great that you noted what the problem was for you. But an answer provides a quite full solution, it tells us how to fix the problem. If your problem was the actual cable, how did you recognise it, what exactly did you change, how did you know it was fixed? Do you mean 'change the cable between the adapter and router'? – pbhj Dec 18 '22 at 21:01
  • @pbhj try to change to windows if the same them most likely bcs of hardware (mostly copper) – Zaman Oof Dec 24 '22 at 16:22