Realtek 8169 Gigabit ethernet adapter only 100Mbps in Dell Inspiron 5565, driver install did not solve

7,193

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.

Share:
7,193

Related videos on Youtube

Jon
Author by

Jon

Updated on September 18, 2022

Comments

  • Jon
    Jon over 1 year

    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.

    • Pilot6
      Pilot6 almost 6 years
      Let's start with your real network card model. Post the output of lspci -knn | grep Eth -A3 command.
    • AlexOnLinux
      AlexOnLinux almost 6 years
      or even better, post the output of the wireless info script. askubuntu.com/a/425205/669014
    • Jon
      Jon almost 6 years
      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
      Jon almost 6 years
      @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.
    • K7AAY
      K7AAY almost 6 years
      That's excellent, Jon!
  • Jon
    Jon almost 6 years
    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
    Jon almost 6 years
    Thanks, I'll try the r8168-dkms driver above first and see what happens :).
  • Jon
    Jon almost 6 years
    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.
  • Boris Hamanov
    Boris Hamanov almost 6 years
    Always put @heynnema in your comments, or I'll miss them. Try a different cable.
  • Jon
    Jon almost 6 years
    @heynnema I tried 2 cat6 cables, from different manufacturers, that connect at Gigabit on another system running ubuntu 16.04.
  • Boris Hamanov
    Boris Hamanov almost 6 years
    @Jon try plugging the cat6 cable directly from the computer into your cable/DSL router and see if you get gigabit speeds.
  • Jon
    Jon almost 6 years
    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
  • Boris Hamanov
    Boris Hamanov almost 6 years
    @Jon I'm at a loss. Sorry I couldn't help more.