Page 1 of 12 12311 ... LastLast
Results 1 to 10 of 115

Thread: RTL8111/RTL8168 Network Connection Fix

  1. #1
    Join Date
    Dec 2008
    Beans
    23

    RTL8111/RTL8168 Network Connection Fix

    This is guidance for those with integrated Realtek RTL8111 series gigabit Ethernet, built in to motherboards such as the ASRock G41M-LE.

    Ubuntu 8.10 (and may other versions) have been reporting problems with connectivity. Here is the solution in a walk-through format. You must be root (sudo su -).

    1) Check to see if the r8169 module is loaded
    -> lsmod | grep r816
    r8168 41104 0
    -> lspci -v
    01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
    Subsystem: ASRock Incorporation Device 8168
    Kernel driver in use: r8169
    Kernel modules: r8169


    2) Download the official Realtek driver
    Realtek RTL8111/RTL8168

    3) Remove the r8169 module
    -> rmmod r8169
    -> mv /lib/modules/`uname -r`/kernel/drivers/net/r8169.ko ~/r8169.ko.backup

    ( the ` is a backtick, it is not an apostrophe or single quote )

    4) Build the new r8168 module for the kernel
    -> bzip2 -d r8168-8.009.00.tar.bz2
    -> tar -xf r8168-8.009.00.tar
    -> cd r8168-8.009.00
    -> make clean modules
    -> make install


    5) Rebuild the kernel module dependencies
    -> depmod -a
    -> insmod ./src/r8168.ko


    6) Remove the r8169 module from initrd
    -> mv /initrd.img ~/initrd.img.backup
    -> mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`


    7) Add r8168 module to /etc/modules
    -> echo "r8168" >> /etc/modules

    8) Reboot, You are done!

    9) Examine that ONLY the r8168 module is loaded for the interface
    -> lspci -v
    01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
    Subsystem: ASRock Incorporation Device 8168
    Kernel driver in use: r8168
    Kernel modules: r8168


    If you need to, configure your /etc/network/interfaces for dhcp or static address then `sudo ifup eth0`
    Last edited by nausicaavow; December 31st, 2008 at 03:08 PM.

  2. #2
    Join Date
    Jul 2006
    Beans
    43

    Re: RTL8111/RTL8168 Network Connection Fix

    Thanks a lot, this saved me from buying a new network card for my brand new Dell Vostro 420.

    One typo though:
    5) Rebuild the kernel module dependencies
    -> depmod -a
    -> insmod ./src/rr8168.ko
    should be:
    5) Rebuild the kernel module dependencies
    -> depmod -a
    -> insmod ./src/r8168.ko
    I guess I have to redo this for every kernel update that gets released?

    -Bart
    Last edited by eombah; December 29th, 2008 at 02:04 AM.

  3. #3
    Join Date
    Dec 2008
    Beans
    23

    Re: RTL8111/RTL8168 Network Connection Fix

    Yes, unfortunately this will have to be done for each kernel upgrade. Luckily, it takes only a few minutes.

    Thanks I will update the post

  4. #4
    Join Date
    Dec 2008
    Beans
    2

    Re: RTL8111/RTL8168 Network Connection Fix

    Thanks for your post.

    I am having trouble compiling the realtek driver. The directory:
    /lib/modules/2.6.24-22-server/build
    is missing on my system. The Makefile is trying to switch to that directory.

    I am assuming that the driver tarball is expecting something in the build directory, probably kernel module sources. I already installed the linux-source-`uname -r` package. What package do I need to install?

    I had to download individual .deb pkgs and transfer it to my linux box. Thank goodness for USB flash drives
    Last edited by Deflatarat; December 31st, 2008 at 04:53 AM. Reason: fix typo

  5. #5
    Join Date
    Dec 2008
    Beans
    2

    Re: RTL8111/RTL8168 Network Connection Fix

    I should have searched some more before posting. But if you install the following two packages, the build directory will be there.

    linux-headers-2.6.24-22-server_2.6.24-22.45_amd64.deb
    linux-headers-2.6.24-22_2.6.24-22.45_all.deb

    Or sudo apt-get install linux-headers-`uname -r`, but my network was down

    Replace version number with your `uname -r`. Mine was 2.6.24-22-server.

  6. #6
    cprofitt's Avatar
    cprofitt is offline νόησις νοήσεως - nóesis noéseos
    Join Date
    Oct 2006
    Location
    平静
    Beans
    1,445
    Distro
    Ubuntu Development Release

    Re: RTL8111/RTL8168 Network Connection Fix

    Why is the default kernel not identifying the right driver?

  7. #7
    Join Date
    Sep 2006
    Beans
    31

    Re: RTL8111/RTL8168 Network Connection Fix

    I'm afraid these instructions didn't help me.

    I have a new HP Pavilion Intel Core2 Quad machine with the following onboard Ethernet controller:

    Code:
    02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
            Subsystem: Hewlett-Packard Company Device 2a6f
            Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
            Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
            Latency: 0, Cache Line Size: 32 bytes
            Interrupt: pin A routed to IRQ 2298
            Region 0: I/O ports at e800 [size=256]
            Region 2: Memory at febff000 (64-bit, non-prefetchable) [size=4K]
            Region 4: Memory at f8ff0000 (64-bit, prefetchable) [size=64K]
            Expansion ROM at febc0000 [disabled] [size=128K]
            Capabilities: <access denied>
            Kernel driver in use: r8168
            Kernel modules: r8168
    As you can see, I'm using the r8168 driver (the latest one available from the realtek site).

    The driver works for a while, but seems to crap out after a little while -- typically during a large download. ifconfig shows that the card is still up, but no packets are received. dmesg provides no information about the failure that I can see. You can see here the output of dmesg when I've loaded the module. There's nothing in dmesg about the card going down.
    Code:
    [67522.264022] eth0: no IPv6 routers present
    [67988.801622] r8168 0000:02:00.0: PCI INT A disabled
    [67988.817782] r8168 Gigabit Ethernet driver 8.010.00-NAPI loaded
    [67988.817830] r8168 0000:02:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
    [67988.817903] r8168 0000:02:00.0: setting latency timer to 64
    [67988.819477] r8168: This product is covered by one or more of the following patents: US5,307,459, US5,434,872, US5,732,094, US6,570,884, US6,115,776, and US6,327,625.
    [67988.819482] eth0: Identified chip type is 'RTL8168C/8111C'.
    [67988.819485] eth0: RTL8168B/8111B at 0xffffc20000646000, 00:1e:8c:4d:00:a8, IRQ 2298
    [67993.042746] r8168: eth0: link up
    [67994.040261] r8168: eth0: link up
    [68003.988006] eth0: no IPv6 routers present
    If I rmmod and modprobe r8168, then the card works normally (for a while).

    I've also tried the r8169 driver (the one selected on a clean install of AMD64 Ubuntu 8.10), but the behavior is just the same. It works for a while and then silently fails.

    Here's the output of ifconfig while the card is working.

    Code:
    eth0      Link encap:Ethernet  HWaddr 00:1e:8c:4d:00:a8  
              inet addr:192.168.1.3  Bcast:192.168.1.255 Mask:255.255.254.0
              inet6 addr: fe80::21e:8cff:fe4d:a8/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:116 errors:0 dropped:0 overruns:0 frame:0
              TX packets:128 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:14766 (14.7 KB)  TX bytes:72354 (72.3 KB)
              Interrupt:250 Base address:0x6000
    I'm bumfuzzled. It's been a long time since I had any trouble getting an ethernet card to work on Linux, so I'm a bit disappointed with this problem. Any help would be greatly appreciated.

    Thanks much.

  8. #8
    Join Date
    Jul 2007
    Beans
    3

    Re: RTL8111/RTL8168 Network Connection Fix

    I seem to have the same problem. Ive tried every "Solution" on the forums, got no errors, still no access to online. Any other ideas?

  9. #9
    Join Date
    Jun 2006
    Location
    Antarctica
    Beans
    500
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: RTL8111/RTL8168 Network Connection Fix

    Thanks, your instructions worked great. How can I figure out when the issue will be fixed in the kernel ? By looking at the replacement of r8169 by r8168 at kernel.org or somesuch ? I'd like to avoid updating my kernel until this is fixed, so if anyone knows for sure, a note here would be appreciated.

  10. #10
    Join Date
    Apr 2009
    Beans
    6

    Re: RTL8111/RTL8168 Network Connection Fix

    I think that this should be included in Ubuntu 9.04 Desktop AND Server editions.
    I am trying to run a server on a MB with Realtek RTL8111DL (ASRock G41M-LE) and its a pain to do this fix every time.

Page 1 of 12 12311 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •