The pain of an Realtek (RTL8111/RTL8168) ethernet card

The most of the Realtek ethernet cards are working out of the box on a Linux machine. But some of them, for e. g. the RTL8111/RTL8168, making some troubles.

In the last three Ubuntu Versions (11.10, 11.04 and 10.10) and the latest Debian testing, you will have the problem, that the noticed ethernet card above will only work with round about 200kb/s and after a while the whole network connection will break down for more than a minute and than you will be back with your 200kb/s again.

So, this is really annoying and it’s nearly impossible to work with your machine. To solve this problem you have to use the official Realtek (r8168) driver instead of the r8169 driver, which is included in the Linux Kernel.

This tutorial will show you in a few steps, how you can build the official Realtek driver for the RTL8111/RTL8168 ethernet card for Ubuntu or Debian:

1. Get root privileges
Get root privileges, while typing “su” or (when you use Ubuntu) “sudo -s” in a terminal.

2. Get the requirements
To build and install the driver, we need the kernel headers and the build tools like gcc. To get them, just easily type in a terminal:

apt-get install build-essential

3. Get the driver
Now, go to the official download page from Realtek for the Linux/UNIX Driver for the RTL8111/RTL8168 ethernet card and download the latest driver version.
Link: Realtek Download Page

4. Untar the archive
The driver is compressed to an archive. So uncompress it with the following command:

tar xfvj r8168-8.025.00.tar.bz2

NOTE: Please do not forget to replace the “r8168-8.025.00.tar.bz2″ with the driver version which you have downloaded!

5. Blacklist old driver
We have to blacklist the old driver (r8169) to prevent the system to load it. To do this, easily set a new entry in “/etc/modprobe.d/blacklist.conf” which is called:

blacklist r8169

or just enter in the terminal again

echo “blacklist r8169″ >> /etc/modprobe.d/blacklist.conf

to do this in only one command.

6. Build and install the new driver
Now, the whole requirements to install the new driver are done. Let us now change in the driver directory, which we have uncompressed in a few steps before:

cd r8168-8.025.00

NOTE: Again, please do not forget, to change “r8168-8.025.00″ to the version which you have downloaded.

The only think we have to do now is, to build the driver and install it. To build it, just type:

make clean modules

after a few secondes (depending on your CPU), the driver is build and you can install it with:

make install

7. Welcome r8168
One of our last steps is, to let the system know about the r8168 driver. With the command

depmod -a

you rebuild the kernel module dependencies and with an

insmod ./src/r8168.ko

you insert the new kernel module (the driver) into the kernel.

8. Make it available for boot
To always use the new module, you have to make a new initrd boot file. Just do

mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`

in a terminal. Here we make the initrd file with the help of the “uname -r” command, which allows us to get the version of the actually running kernel.
At least, you have to add in the “/etc/modules” file a new entry, which is called “r8168″, to get the driver automatically loaded after boot. As an alternative you can do the last step again with only one command:

echo “r8168″ >> /etc/modules

That’s it! After a reboot you should have the best possible performance with the RTL8111/RTL8168 and additionally no other network problems should be available anymore (no break down).
After the reboot you can check if the right driver is loaded with this command:

lspci -v

with this command you should find your RTL8111/RTL8168 network card in a list and the additional command “Kernel driver in use: r8168″.

Greetings
ReCon

About these ads

102 Responses to The pain of an Realtek (RTL8111/RTL8168) ethernet card

  1. Veltrakz sagt:

    Thanks for this howto!

    I did this and now i hope that everything is going to work well.

    I use Linux Mint 11 and had some problems with WLAN. The connection wasn’t stable and broked after a random time, so i had to reconnect. Very annoying.

    Keep writing solutions for Unix/Linux problems! It may help people like me!

    • unixblogger sagt:

      Hi Veltrakz,

      yes, I know, WLAN drivers, especially from realtek, can also be a such of pain to get them really up under Linux ….

      Thanks for your feedback! – I try to write as much as I can ;)

      Greetings
      ReCon

  2. nidzo sagt:

    it doesn’ work. on realtek page i can find drivers for kernel 2.6, while ubuntu 11.10 has kernel 3.0. i tried the procedure with latest driver, and it doesn’t work: i don’t know if i did something wrong…

    • unixblogger sagt:

      Hi nidzo,

      sorry for the late answear …

      I’ve tested it with Kubuntu 11.10 (which is the same as Ubuntu 11.10 when you look at the base), with the driver for 2.6 Kernel and it is working without any problems.

      A console output would help here, if something went wrong on your side.

      Greetings

  3. Santhosh sagt:

    Thank you so much for sharing your pain. This really helped me too. I had no issue with RedHat 6.1 but when i went back with 5.5 my network never showed up and your step be step instructions solved my problem.

    Thank you so much…

    Santhosh

  4. Lingshan sagt:

    Very good, thks ;)

    • unixblogger sagt:

      You’re welcome :)

      • Toope sagt:

        Well, i didn’t get it work. After restart two modules found – r8168 and r8169 which is still active. I think that old module needs to remove, something like – “sudo rmmod r8169″. And maybe – “sudo update-initramfs -u” is also needed? I’ve got Ubuntu 11.10 64bit.

      • unixblogger sagt:

        @Toope: Did you blacklist the old one as listed above?

  5. Eviatar sagt:

    Thanks!!!!! worked for me :)

  6. possel sagt:

    Thanks dude… this really saved my day!

  7. predicative sagt:

    This just worked for me in Ubuntu 11.10. Thanks so much!

  8. phil sagt:

    Worked like a charm but ethtool tells me only 100Mb/s (with r8168 loaded)
    manually setting up the speed doesn´t work neither :(

  9. joe sagt:

    Thank you so much! I’m a newbie to linux, and this helped a ton.

    The only issue I had was with the syntax of the commands you used. For instance, instead of:
    mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`
    I had to use:
    mkinitramfs -o /boot/initrd.img-$(uname -r) $(uname -r)

    …just thought I’d mention it, in case someone else has the same issue.

    —Ubuntu 11.10 3.0.0-15

    Thanks again

  10. Aaika sagt:

    I love u!! Marry ME!!

  11. toppa sagt:

    Hi – thank you very much for posting this. Your instructions work for me except the last step. When I run lspci -v after reboot, I get the following. Everything looks right except “Kernel driver in use: r8168″ is missing

    —–
    02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
    Subsystem: Toshiba America Info Systems Device fc30
    Flags: bus master, fast devsel, latency 0, IRQ 11
    I/O ports at e000 [size=256]
    Memory at f0004000 (64-bit, prefetchable) [size=4K]
    Memory at f0000000 (64-bit, prefetchable) [size=16K]
    Capabilities:
    Kernel modules: r8169
    ——

    If I run the depmod and insmod commands again, my network connection works, but then its gone after I reboot (completely gone – there is no “Wired Connection” listed in the GUI Network Manager).

    The mkinitramfs command runs without error, and I can see from the timestamp that it does touch the file.

    If there is anything you can suggest I try, I’ll very much appreciate it! Thanks!

  12. toppa sagt:

    I should add that I double checked all the steps. I blacklisted r8169 in /etc/modprobe.d/blacklist.conf and I added r8168 to /etc/modules.

  13. toppa sagt:

    Hi – thanks very much for replying. I provide support for my WordPress plugins, so I know that it can take a lot of time to support people who come to your site.

    I am running Ubuntu 11.10

    I still have the same problem. Here are all my steps, doing it a second time (I did not run make again though, because the driver works fine until I reboot, so the driver itself is good):

    toppa@toppa-desu:~/Downloads/r8168-8.028.00$ sudo -s
    [sudo] password for toppa:
    root@toppa-desu:~/Downloads/r8168-8.028.00# tail -1 /etc/modprobe.d/blacklist.conf
    blacklist r8169
    root@toppa-desu:~/Downloads/r8168-8.028.00# depmod -a
    root@toppa-desu:~/Downloads/r8168-8.028.00# insmod ./src/r8168.ko

    [at this point the wired connection activates and it works great]

    root@toppa-desu:~/Downloads/r8168-8.028.00# mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`
    root@toppa-desu:~/Downloads/r8168-8.028.00# tail -1 /etc/modules
    r8168
    root@toppa-desu:~/Downloads/r8168-8.028.00# lspci -v

    [snip]

    02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
    Subsystem: Toshiba America Info Systems Device fc30
    Flags: bus master, fast devsel, latency 0, IRQ 51
    I/O ports at e000 [size=256]
    Memory at f0004000 (64-bit, prefetchable) [size=4K]
    Memory at f0000000 (64-bit, prefetchable) [size=16K]
    Capabilities: [40] Power Management version 3
    Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [70] Express Endpoint, MSI 01
    Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
    Capabilities: [d0] Vital Product Data
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Virtual Channel
    Capabilities: [160] Device Serial Number 07-00-00-00-68-4c-e0-00
    Kernel driver in use: r8168
    Kernel modules: r8169

    [ I noticed the driver numbers don't match on the last two lines ]

    [ I reboot, and I have no wired connection available at all ]

    toppa@toppa-desu:~$ lspci -v

    [snip]

    02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
    Subsystem: Toshiba America Info Systems Device fc30
    Flags: bus master, fast devsel, latency 0, IRQ 11
    I/O ports at e000 [size=256]
    Memory at f0004000 (64-bit, prefetchable) [size=4K]
    Memory at f0000000 (64-bit, prefetchable) [size=16K]
    Capabilities:
    Kernel modules: r8169

    To get around the problem I suppose could put the depmod and insmod commands in a startup script, but that seems silly (and the depmod command takes a while to run). If you can think of anything else I should try, please let me know – thanks again!

  14. I am dual booting Windows 7 & Oneiric, but I have no networking in Linux because of this issue. Which means I cannot “apt-get install” anything. :-(

    Could somebody please tell me what the dependencies are for build-essential in Oneiric so I can download the debs from Windows 7?

    Thanks in advance,
    Emanuel

    • Hm, let’s just say the gordian knot that is “build-essential” is not easily untangled offline. I tried installing Fedora Core 16, but it has the exact same problem with loading 8169. I could easily have solved the problem by chrooting into my Oneiric from Fedora, but, alas, ’twas not to be…

      Last resort: now downloading a Precise Pangolin snapshot, fingers crossed.

      • Lol, I just realized my wlan interface was working in Oneiric. It was just the access point that was acting weird. Wasted two days solving a non-issue (getting Oneiric connected).

        So, anyway, followed this how-to, and lo! I have wired internet up and running. Thanks for your how-to!

  15. Pingback: The plot thickens | | Furious PurposeFurious Purpose

  16. Thank you!! sagt:

    Legen… wait for it… dary.

    If it weren’t for you I may just have (god forbid) switched back to windows.
    Most useful thing I have ever read on the internet.

  17. David Clark sagt:

    Hi,
    I’ve been through this thing word for word five times now. Only my desperation not to go back to Windows has kept me going.

    The only message or whatever I’m getting up that may or may not be of significance is after the line “mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`” where it gives me warning.

    What puzzles me is that the r8169 is present on the blacklist and yet when I run “lspci -v” it’s still showing. I’m going in circles here.

    I’m using Mint 12 by the way.

    • unixblogger sagt:

      Well, you need the initramfs, otherwise the new kernel driver for the Realtek wouldn’t get loaded …

      Some other comment here mentioned, that he had to use: mkinitramfs -o /boot/initrd.img-$(uname -r) $(uname -r)

      instead the other command. Did you tried that?

      • David Clark sagt:

        Yeah, tried that and resulted in the same way. I’ve since given up and will wait for 12, hoping they’ve fixed it. Needed a working computer for now. Have tried all sorts from Ndiswrapper to varying methods upon your own that I’ve found with no luck.

        I can’t remember the exact message but whenever I was doing the initramfs it warned me about compatibility, I think. My ethernet card is a slightly different model but automatically uses the r8168 driver in Windows with no problems. I tried the supposed original driver too but that didn’t work either.

      • David Clark sagt:

        It’s a LiteOn WN6302L Wireless LAN, said to just be a rebranded Realtek RTL8187SE

  18. Andrew Hamming sagt:

    06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
    Subsystem: Giga-byte Technology GA-EP45-DS5 Motherboard
    Flags: bus master, fast devsel, latency 0, IRQ 40
    I/O ports at ee00 [size=256]
    Memory at fbdff000 (64-bit, prefetchable) [size=4K]
    Memory at fbdf8000 (64-bit, prefetchable) [size=16K]
    Capabilities:
    Kernel driver in use: r8168
    Kernel modules: r8168, r8169

    Why does it say ? is this bad? seems to be working really well tho :) love your work!

    • unixblogger sagt:

      This just only means, that two drivers are available in the kernel. Are you sure, that you blacklisted the r8169?

      Anyway, when it’s working for you, it’s fine.

  19. tchado sagt:

    Thanks that works with Ubuntu 11.10 :-)

  20. cygon sagt:

    I am just about to replace my home server’s boarrd with a new one that uses the RTL8111. The problem is, I also have an R8169 PCIe card that I want to use, so I need both drivers on my system.

    This doesn’t bode well….

    • cygon sagt:

      Made the switch, both the RTL8169 and the RTL8111 are working out of the box for me with no performance or disconnection issues on my system.

      Running Gentoo Linux with the standard kernel drivers compiled into the kernel (not downloaded from Realtek).

      • unixblogger sagt:

        Glad to her. So this issue affected before your chance on Gentoo as well?

      • cygon sagt:

        Nope, before my change, I used two RTL8169s (one onboard, one as a PCIe card) and everything was working fine — this is, until the server began suffering kernel panics a few weeks ago. As I hadn’t changed a thing, I concluded that the hardware was breaking down.

        That was my reason for the change.

  21. Erik Welander sagt:

    sudo apt-get install linux-backports-modules-net-oneiric-generic
    Solved the issue for me, r8169 driver @ ubuntu 11.10 64Bit.
    No need for any recompiles or old kernels, just install and restart.
    Bug is reported here: https://bugs.launchpad.net/ubuntu/+source/linux-backports-modules-3.0.0/+bug/839393

  22. Hi ReCon,

    Pre-Story:
    I have installed Linux Mint 12 (3.0.0-12-generic) on my Extreamer Ultra but I’m having this problem like everyone else.
    And my problem started when I installed Linux Mint, its said that it didn’t have any internet connection but the LEDs for the NIC are flashing and glowing (as it should be). But when the installation was completed I noticed that I didn’t have a internet connection.
    But when I installed Ubuntu 11.10 it worked fine.

    Problem 1:
    I can’t even get pass step nr 2: “apt-get install build-essential”.
    I get:
    Err (website address)
    Could not resolve ‘archive.ubuntu.com’
    [This repeated around 10 times]
    Fail to fetch (website address) Could not resolve ‘archive.ubuntu.com’
    [This also repeated around 10 times]
    E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?

    But I suppose this is because it don’t have any connection to the internet.

    Problem 2:
    Step 5 – Blacklist
    When I run the command i get and it doesn’t matter if I run it with “sudo” or not:
    bash: /etc/modprobe.d/blacklist.conf: Permission denied

    Problem 3:
    Step 6
    I can unpack the folder and navigate into the folder but when I run the command “make clean modules” I get:
    make -C src /clean
    make[1]: Entering directory ‘/home/zew/r8168-8.026.00/src’
    make -C /lib/modules/3.0.0-12-generic/build SUBDIRS=//home/zew/r8168-8.026.00/src clean
    make: Enetering an unknown directory
    make: *** /lib/modules/3.0.0-12-generic/build: No such file or directory. Stop.
    make: Leaving an unknown directory
    make[1]: *** [clean] Error 2
    make[1]: Leaning directory ‘/home/zew/r8168-8.026.00/src’
    make: ***[clean] Error 2

    Any idés?

    Br
    Zew

    • unixblogger sagt:

      Are you sure that your network connection is running fine. For me it looks like, that your network connection has some problems, because there is no connection to the update servers possible.
      Can you ping google.de? Can you ping 8.8.8.8?

      Do you really have read my tutorial? I mentioned, that you should use “sudo su” to get complete root privileges for the whole proccess. If you do so, the “permission denied” error will not come back anymore.

      Without build-essential, it is absolutely normal that this happens.

  23. ironhoof sagt:

    Excellent! thanks for this my new desktop computer would not be usable without this!

    Just out of curiosity I notic kernel updates wipe this out, and I have to compile and reinsert into the kernel each time, the blacklist, and everything else it there. Is there by chance a way to include it with the rest of thed rivers in the system so it can be injected at the time of kernel update?

  24. PB sagt:

    I’m running Ubunto 11.10

    When I try to run “mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`” I get a “No such file or directory”.

    I ran echo “r8168″ >> /etc/modules, and it seemed to work. I manually opened the file in a text editor and confirmed that R8168 was supposed to load. But I’m still not getting the new drivers up.

    I’ve manually confirmed that R6189 is black listed.

    • PB sagt:

      I just tried mkinitramfs -o /boot/initrd.img-$(uname -r) $(uname -r).

      No error in the terminal window. but I’m still getting “Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)” when I run “lspci”, and my connection is as buggy as ever.

      R8619 is definetly on the blacklist for the system.

  25. tomekkaczanowski sagt:

    All of this is not required anymore for Kubuntu 11.10 and r8168-8.029.00.tar.bz2 driver. All you have to do is this (tested on the fresh copy of the system):

    sudo -s
    apt-get install make gcc
    tar xvjf r8168-8.029.00.tar.bz2
    cd r8168-8.029.00/
    ./autorun.sh

    that is it, than you can check

    lspci -v | grep r8
    Kernel driver in use: r8168
    Kernel modules: r8168

    And the net works fine!

    • unixblogger sagt:

      Sounds good! This autorun script wasn’t available at the time I’ve written the tutorial.

      Are you sure, that the user does not need to install any other software anymore? For e. g. build-essential?

  26. Pingback: network intermittent (linux mint12)

  27. Everything went fine, but it still didn’t solve my problem, that my WLAN is not on the list of avaible WLANs. Some others secured with passwords are listed, but my home WiFi is not. On Windows it works fine, but in Ubuntu 11 after changing driver to r8168 not. What is wrong?

  28. iphg93 sagt:

    Hello Ich habe eine probleme!
    when I put this : insmod ./src/r8168.ko
    It says file already exists
    and the connection still slow
    PLEASE help!!
    thanks a lot.

  29. Outcast sagt:

    Using Linux mint 12 here. I salute you sir. Thanks for saving me a shit load of time!

  30. Robert sagt:

    Great Thanx for this !
    I had the problem obn a dual boot system (ubuntu 11.10/win7) that after booting win7 the network under ubuntu was dead ! i had to plug off the !power cable! and reconnect it to get network under linux work again.
    after switching the driver to the 8168 evrything works fine !
    done under ubuntu 11.10 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:28:43 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

  31. duck sagt:

    I have a problem when i do the step where it says tar xfvj the packet. I downloaded it and everything and i put in the right name but when i do the step it says error no such directory and such of that

    • unixblogger sagt:

      Then you aren’t in the right directory, where the downloaded file is stored! You have to use the command “cd” in the terminal to navigate to the destination, where the downloaded file is stored.

  32. jack sagt:

    Most of these solutions are fine for systems with a single ethx. I have an onboard and a nic. The onboards needs the r8169 and the nic needs the 8168. what to do? This is a server BTW and the onboard is WAN, the nic LAN. netools sees it, and it passes a few packets, but no ip number and status shows link=no

    • unixblogger sagt:

      Well, than you can just try to not blacklist the r8169. Normally this should go fine!

      So, install the 8168, as mentioned in the Tutorial above and leave the “blacklisting” part out so that both are getting loaded while your system is booting.

  33. Keny sagt:

    After running ./autorun.sh everything seemed fine. Net connection finally worked. No dropped RX packets. BUT after reboot, the system freezes completely with black screen. Last /var/log/message is:
    r8186: eth0: link up

    • unixblogger sagt:

      Are you useing NetworkManager or the regular ifup method? Are you sure, that the complete system freezes? What’s happening when your pressing STRG+ALT+F2 / +F3 and so on? Did your system switches between the virtual consoles?

      • Keny sagt:

        There is no keyboard response, so no way to switch to another console. Only single underscore is sometimes displayed in the upper left corner of the screen. So the system is most definitely frozen.
        Is there any way to revert back to r8169 driver now, or at least temporarily disable the r8168 which seems to be the culprit? Simply blacklisting it did not do the trick.

      • unixblogger sagt:

        So then you can try to load up your Ubuntu (or other distro) in the Rescue mode (GRUB Menu). Normally this should work then and you will be able to delete the installed driver.

  34. jim amberger sagt:

    danke schon. du bist sehr gut. just the answer i needed.

  35. samig sagt:

    Thank you! This worked with Kubuntu 12.04 LTS. The “unplugged cable” is finally gone!

  36. Andres sagt:

    Gracias, Thanks you, merci, dank, grazie, спасибо, 謝謝…works perfect!!!! “There goes my hero” said Foo Fighters! LOL! Thanks once more!!!

  37. Pingback: What Operating System do you primarily use for computer audio? - Page 7

  38. inoekuma sagt:

    Hi, im currently running Ubuntu 12.04 LTS Precise. I’d gone many process even on your instruction given and others. but still my r8168 could not be detected. when i run the command

    lsmod | grep r81

    it will displayed this

    r8168 244911 0

    and when i run

    lspci | grep Eth

    only my build-in ethernet would displayed

    00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)

    and this my version

    Linux mpv4 3.2.0-30-generic #48-Ubuntu SMP Fri Aug 24 16:52:48 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

    Someone please help me..sorry for my bad english

  39. Pingback: Welche PCI-Express Grafikkarte funktioniert mit openSUSE 12.2 ohne Probleme ?

  40. coolhand sagt:

    This seems to work right up until I get prompted to log in. Running on Precise amd64 server.

    The link light comes on when Ubuntu starts running, but as soon as I get to the login prompt it’s gone, and ethtool says “Link detected: no”

    Please, any ideas?

  41. Peter Talbot sagt:

    Really helpful post, thanks.

    I used r8168-8.034.00.tar.bz2 downloaded from http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false

    With this version of the Realtek software you can replace all your steps 5 6 7 and 8 with just ./autorun.sh

    If this fails it may be because you don’t have the kernel headers. Install these on Debian 6.0.5 with:

    apt-get install linux-headers-2.6.32-5-686

    (On other flavours and versions do what’s necessary.)

    Peter Talbot, London UK

  42. Harshith sagt:

    This worked for me perfectly. But every time I install some updates it stops working again. Is there a way to hard code these changes? I am using 12.0LTS.

    Thanks

  43. Very thanks for this useful post.
    I was surfing the web searching for rtl8111 datasheet, so I discovered the Issue you have reported.
    Some comments report that this Issue exists also on Ubuntu 12.04 that is the platform I use for my LAN server… very thanks guys!!!!

  44. Andre sagt:

    Wow, vielen Dank !!! Wollte schon nach einer anderen Netzwerkkarte schauen…
    Thank you so much

  45. Pingback: r8169 module with DKMS in Ubuntu 12.04 LTS | Roman Yepishev

  46. Pingback: Toshiba Satellite C850-1CV - issues with drivers.

  47. Prooq sagt:

    Didn’t solve my problem under 12.10. The r8168 is loaded and everything went well beside the problem is still there. No connection with my RTL8111 Card. :( Any other ideas?

  48. Ankur sagt:

    I can’t express how happy I’m when this worked for me.
    Thanks a lot. With this, I also installed my first kernel module. :)

  49. Pingback: Back to having rlt r8169 network card problems

  50. Afterdark sagt:

    Worked perfectly on Ubuntu 12.10 :)
    Thanks!

  51. Worked, thank you so much! :)

  52. ButWhyItsSoHardToBeConnected sagt:

    Hi,

    I have r8168 Realltek card used with default r8169 driver. The problem is that I had pain to get a DHCP response (must wait a long time, invoking dhclient, which can simply nevers has an offer)
    Tried to install the r8168, but things getting worse … never get an offer …

    I think i’ve managed to go back (by rmmod r8168, blacklisting the r8168, and explicitely load the r8169, and redo a “depmod -a” and a “mkinitramfs ….”).
    Not sure to have done everything well to go back …
    For instance, is there, somewhere, some backups of initramfs ? Or does the mkinitramfs simply overwrite the former boot image ?

    Finaly, is there a chance that this dhcp problem comes from the fact that ipv6 is disabled on my router ?
    Tried to configure the networkmanager to use the same static IP (v4) or not, ignore (or not) ipv6 (but it still try to assign an ipv6 anyway …) …

    Some more infos :
    – ubuntu 11.04
    – worked fine no so long time ago (when I installed ubuntu), and now, at each reboot, I have (real) pain to get connected
    – close/reopen session, when previously connected, get reconnected directly …

  53. Jose sagt:

    Hi, I went through all of the steps but when I got to the one where it said to enter: insmod ./src/r8168.ko

    In the terminal, I got the following error.

    root@jose-HP-HDX16-Notebook-PC:~/Downloads/r8168-8.035.00# insmod ./src/r8168.ko
    Error: could not load module ./src/r8168.ko: No such file or directory

    What did I do wrong? It’s still using the r8169 kernel. Thank you in advance!

  54. Eric Saboia sagt:

    I get some erros in “make clean modules” step using Ubutun 13.04 with kernel 3.8.0.

    The bugtracker is here: https://bugs.launchpad.net/ubuntu/+source/r8168/+bug/1108068 , and the solution is simple:

    sudo apt-get update
    sudo apt-get install r8168-dkms

  55. Lewis sagt:

    Hello, Thankyou for posting these steps but I’m having issues during the “make clean modules” step


    lewis@Jehuty-OSURR:~/Documents/r8168-8.035.00$ sudo make clean modules
    make -C src/ clean
    make[1]: Entering directory `/home/lewis/Documents/r8168-8.035.00/src’
    make -C /lib/modules/3.8.0-19-generic/build SUBDIRS=/home/lewis/Documents/r8168-8.035.00/src clean
    make[2]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic’
    CLEAN /home/lewis/Documents/r8168-8.035.00/src/.tmp_versions
    make[2]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic’
    make[1]: Leaving directory `/home/lewis/Documents/r8168-8.035.00/src’
    make -C src/ modules
    make[1]: Entering directory `/home/lewis/Documents/r8168-8.035.00/src’
    make -C /lib/modules/3.8.0-19-generic/build SUBDIRS=/home/lewis/Documents/r8168-8.035.00/src modules
    make[2]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic’
    CC [M] /home/lewis/Documents/r8168-8.035.00/src/r8168_n.o
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:14545:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl8168_init_board’
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:14715:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl8168_init_sequence’
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:14968:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl8168_init_one’
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:15132:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl8168_remove_one’
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:17651:12: error: ‘rtl8168_init_one’ undeclared here (not in a function)
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:17652:2: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:17652:25: error: ‘rtl8168_remove_one’ undeclared here (not in a function)
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:17301:12: warning: ‘rtl8168_poll’ defined but not used [-Wunused-function]
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:1368:1: warning: ‘rtl8168_xmii_reset_pending’ defined but not used [-Wunused-function]
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:1383:1: warning: ‘rtl8168_xmii_link_ok’ defined but not used [-Wunused-function]
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:1395:1: warning: ‘rtl8168_xmii_reset_enable’ defined but not used [-Wunused-function]
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:1544:1: warning: ‘rtl8168_link_option’ defined but not used [-Wunused-function]
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:1823:1: warning: ‘rtl8168_set_speed_xmii’ defined but not used [-Wunused-function]
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:2151:13: warning: ‘rtl8168_gset_xmii’ defined but not used [-Wunused-function]
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:2886:13: warning: ‘rtl8168_get_mac_version’ defined but not used [-Wunused-function]
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:3002:1: warning: ‘rtl8168_print_mac_version’ defined but not used [-Wunused-function]
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:3044:1: warning: ‘rtl8168_hw_phy_config’ defined but not used [-Wunused-function]
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:13681:1: warning: ‘rtl8168_release_board’ defined but not used [-Wunused-function]
    /home/lewis/Documents/r8168-8.035.00/src/r8168_n.c:14914:17: warning: ‘rtl8168_try_msi’ defined but not used [-Wunused-function]
    cc1: some warnings being treated as errors
    make[3]: *** [/home/lewis/Documents/r8168-8.035.00/src/r8168_n.o] Error 1
    make[2]: *** [_module_/home/lewis/Documents/r8168-8.035.00/src] Error 2
    make[2]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic’
    make[1]: *** [modules] Error 2
    make[1]: Leaving directory `/home/lewis/Documents/r8168-8.035.00/src’
    make: *** [modules] Error 2

    Why am I getting these errors? I assume they are significant, because I tried to follow the later steps afterwards but they wouldn’t work for various reasons (including r8168.ko not existing).
    Any idea what I’ve done wrong?

  56. Pingback: The pain of an Realtek (RTL8111/RTL8168) ethernet card | Ubuntu InfoUbuntu Info

  57. Marc sagt:

    Followed your instructions to the letter today and it works like a charm…. so everything still up to date. Thank’s a lot….

  58. George sagt:

    Hi …

    Thanks for this awesome post to an annoying problem. Everything was going fine till:

    8. Make it available for boot

    mkinitramfs -o /boot/initrd.img-’uname -r’ ‘uname -r’

    My system kept giving me FATAL errors stating that there is no such file as ‘uname’.

    I wasn’t shure if thes step absolutely had to be done so I went on to:

    echo “r8168″ >> /etc/modules

    That seemed to go OK … however, after the reboot on using ‘lspci -v’ the kernal driver was STILL r8169!

    Please … how do I get this installed. Please be gentle I’m a GUI guy.

    - Thanks.

  59. George sagt:

    Hi again …

    I did it again restarting at the “make clean modules” step and making sure that I used the “sudo -s” permissions this time. It sure looks like it worked just fine this time. I did get a “can’t read private key” error on the “make install” step but it doesn’t seem to matter. After I rebooted “lspci -v” reveals that I have both the r8168 and r8169 modules and the system’s using the r8168 driver. I’ll see if this corrects my wired network from randomly dropping. So far it’s been good so I’ll keep my fingers crossed.

    Thanks again for the solution to a very annoying issue.

  60. ashok bansal sagt:

    get the driver software file from realtek. ( with oracle enterpise linux Release 5 update 4, default nic card driver did not work)
    web link

    http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#2

    follow readme file
    Unpack the tarball :
    # tar vjxf r8168-8.037.00.tar.bz2

    Change to the directory:
    # cd r8168-8.037.00

    If you are running the target kernel, then you should be able to do : (as root or with sudo)

    # ./autorun.sh

    You can check whether the driver is loaded by using following commands.

    # lsmod | grep r8168
    # ifconfig -a

    It works like magic for me. wasted at least 48 hours to figure out this realtek hardware mess.

  61. It help me to install R8181e-r8103E drivers Ubuntu 12.04 LTS Precise

  62. Tek sagt:

    make -C src/ install
    make[1]: Entering directory `/home/ivan/Downloads/r8168-8.037.00/src’
    make -C /lib/modules/3.8.0-32-generic/build SUBDIRS=/home/ivan/Downloads/r8168-8.037.00/src INSTALL_MOD_DIR=kernel/drivers/net/ethernet/realtek modules_install
    make[2]: Entering directory `/usr/src/linux-headers-3.8.0-32-generic’
    INSTALL /home/ivan/Downloads/r8168-8.037.00/src/r8168.ko
    Can’t read private key
    DEPMOD 3.8.0-32-generic
    make[2]: Leaving directory `/usr/src/linux-headers-3.8.0-32-generic’
    make[1]: Leaving directory `/home/ivan/Downloads/r8168-8.037.00/src’
    root@FireflyPC:~/Downloads/r8168-8.037.00# ^C
    root@FireflyPC:~/Downloads/r8168-8.037.00#

    Got this promlem

  63. Inge sagt:

    Hey Unixblogger,
    Thanks for your detailed explanation!
    But still I didn’t manage to get wifi…
    I blacklisted the 8169 (3times actually, as I saw in the gedit file)
    I do see the 8168 driver in my extra programs (don’t know the english version)
    It says the Realtek RTL 8168 Gigabit Eternet driver is in use.
    But when typing in terminal: sudo lspci -v
    the outcome is: kernel driver in use: 8169
    kernel modules: 8168, 8169
    Why won’t it work? I’m trying to make this work for days in a row…
    Thanks in advance for your help!

  64. Pingback: RTL8111/8168B Rev 06 Ethernet controller not working with Ubuntu 12.04.03 / 13.10 | Ubuntu InfoUbuntu Info

  65. John sagt:

    I’m a novice user, but found your solution and managed to implement it. (I got what looked like a few error messages along the way, but it still worked). This was the end of about 8 hours of frustration – mostly thinking “surely this should work out of the box”!
    Many thanks for your original, very clear solution.
    John

  66. Thanks a lot for this howto!

    I was having problems with my NIC (RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 09)) not being able to reach gigabit speeds (although it was connected at 1000 Mb/s according to ethtool).

    After installing the driver it sends data at a steady rate at 118 MB/s.

  67. Brian sagt:

    Thank you!!! This have been frustrating me for weeks!

  68. Leon Hall sagt:

    I was having some connection stability issues with the r8169 driver in Mint 17 (kernel 3.13.0-24). After trying the latest driver from Realtek, problem solved. It’s worth noting that the entire process of compiling and installation has been automated with a script in the most recent release.

  69. Tom Leonard sagt:

    Worked file with Debian 3.2.0-4. Mine was a minimalist install, so had to also install a build environment:

    sudo apt-get install build-essentials
    sudo apt-get install linux-headers-`uname -r`

    Thanks

  70. Tony sagt:

    Thank you very much!!!!
    That works for me too.
    You solved my problem causing me a big headache!!! :)
    Tony

  71. Adam R sagt:

    thank you very much indeed. just tried the instructions as described above (September 2014) wuth the latest realtek 8168 driver from their website. :)

  72. Pingback: Hands on: Steam OS

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ photo

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s

Folgen

Erhalte jeden neuen Beitrag in deinen Posteingang.

%d Bloggern gefällt das: