Damn you, unworking r8168

I really don’t know why ethernet device makers insist on making it hard for to use their products.  Ethernet has been around for many, many years; surely its not too much to ask for drivers that “just work”.

And so that’s the problem I currently have with my new computer. It has an onboard Ethernet interface which uses a Realtek chip and that’s where the problems have been (with the exception of a power button that wriggled free, but that is also easy to fix).

The device comes up as:

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

I’ve used:

  • The R8169 driver that comes with most of the Debian kernels
  • r8168-dkms driver
  • The 8168 driver from the realtek site

and all of them don’t work.  It seems that the receive side works fine (I sometimes get a valid IPv6 address) but no packets are sent, even ifconfig eth0 shows zero transmitted packets.

ethtool shows some of the setup, this is with the r8168 driver:

driver: r8168
version: 8.037.00-NAPI
firmware-version:
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no

 

Interestingly, if I use the r8169 driver in the kernel and try ifup etho then I do get an entry in the firmware-version spot.

dmesg also shows that it finds the device.

[    0.916487] r8168 Gigabit Ethernet driver 8.037.00-NAPI loaded
[    0.916667] r8168 0000:03:00.0: irq 72 for MSI/MSI-X
[    0.939129] r8168: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[    0.939136] r8168  Copyright (C) 2013  Realtek NIC software team <[email protected]>
[   10.807066] r8168: eth0: link up

So it all looks good, except it won’t send any packets.  Anyone got one of these devices and if so (and more importantly) how did you get it to work?

 

31 thoughts on “Damn you, unworking r8168

  1. 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 06)
    Linux proto 3.11.5-1-ARCH #1 SMP PREEMPT Mon Oct 14 08:31:43 CEST 2013 x86_64 GNU/Linux

    It’s not Debian, but this comment brought to you by this ethernet device and the kernel r8169.

    1. Interesting, almost the same except I got RTL8111/8168B and you don’t have the B. They’re both rev 06 though. You’re also using Linux 3.11 while I think I was on 3.10

      Looking around, there are a lot of problems with realtek ethernet chipsets. I’ll try their latest drivers (8.037) and see if that works.

      1. Yeah, I thought it was weird that they’re the same rev with a difference in B. This is the builtin ethernet on an MSI H77MA-G43 board. This device also worked with 3.10

  2. 07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
    Linux puchatek 3.12.0-0.rc1.git5.2.fc21.x86_64 #1 SMP Sat Sep 21 17:38:37 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

    Never had problems.

    Other machine:
    01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
    05:08.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8169 PCI Gigabit Ethernet Controller (rev 10)

    Also no problems.

  3. On my Thinkpad Edge E220S, I’ve got:
    11:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller [10ec:8168] (rev 06)

    ethtool reports:
    driver: r8169
    version: 2.3LK-NAPI
    firmware-version: rtl_nic/rtl8168e-2.fw
    bus-info: 0000:11:00.0
    supports-statistics: yes
    supports-test: no
    supports-eeprom-access: no
    supports-register-dump: yes
    supports-priv-flags: no

    Everything works fine here on Ubuntu 11.10-13.04 and Fedora 19.

  4. Ah, yes, I had some trouble with this device on a computer I recently built:

    09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 09)

    The issue I ran into was similar to yours, but slightly different. In my case the r8169 driver worked *most* of the time, but under low CPU load and high network load, the device would “go mute” and would not return any packets, thus all communication would break. This is a KNOWN issue under Linux, but unfortunately the Linux kernel developers are unable to fix it due to the binary blob firmware being proprietary. :-/

    So, in lieu of a real fix, I investigated some of the r8169 driver parameters, and ended up using this:

    /etc/modprobe.d/damn-realtek-firmware.conf
    ——————————————————–
    # r8169 driver causes periodic disconnection, supposedly this fixes it
    options r8169 use_dac=1 debug=8

    For whatever reason, using these options does fix the “go mute” problem on this motherboard.

  5. I’ve got 2 machines with RTL8111/8168B PCi internet controllers.A Thinkpad E135 and
    Fujitsu LH522.
    Both show module r8169.
    Both running Wheezy and on net install just presented them with the firmware and they came up.
    The Fujitsu install is a bit broken in other ways (I haven’t got the Ralink wireless working)
    The Thinkpad wireless has no range and I am wondering about the aerial and connection.
    I am over seas and will start to investigate when I get home and can find someone who can talk to me in English.

  6. One of the machines here has a similar controller:

    02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
    […]
    Kernel driver in use: r8169

    Only significant difference from yours is the rev number. I don’t ever expect very much out of RealTek hardware, but it seems to be working all right.

    dmesg on boot:

    [ 0.657518] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
    [ 0.657566] r8169 0000:02:00.0: setting latency timer to 64
    [ 0.657637] r8169 0000:02:00.0: irq 44 for MSI/MSI-X
    [ 0.658113] r8169 0000:02:00.0: eth0: RTL8168b/8111b at 0xffffc9000032c000, 00:1b:fc:36:d7:0d, XID 18000000 IRQ 44
    [ 0.658117] r8169 0000:02:00.0: eth0: jumbo features [frames: 4080 bytes, tx checksumming: ko]
    […]
    [ 8.203126] r8169 0000:02:00.0: eth0: link down
    [ 8.203135] r8169 0000:02:00.0: eth0: link down
    [ 9.932398] r8169 0000:02:00.0: eth0: link up

    # ethtool -i eth0
    driver: r8169
    version: 2.3LK-NAPI
    firmware-version: N/A
    bus-info: 0000:02:00.0
    supports-statistics: yes
    supports-test: no
    supports-eeprom-access: no
    supports-register-dump: yes
    supports-priv-flags: no

    I don’t have any of the firmware-* packages installed, and I’m running stock wheezy: 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64

  7. I’ve got a motherboard with two of these devices onboard, in a machine running wheezy, and can confirm that the hardware is totally flaky.

    After working fine for about 6 months, one of the devices started just dropping packets.. a few at first, but it got worse over the period of about a month until it was finally dropping ~50% of packets!

    I replaced it with a USB/Ethernet adapter and have had no problems since. The other onboard device is still chugging along fine.

    After checking the vendor’s website I discovered that the board is also available with Intel ethernet devices – for a premium. I guess now I know why.

  8. Well, these RTL81xx are real pieces of crap[1], it is one of the points in my small absolute blacklist of “never buy anything that has it inside” (the others are: vPro and Computrace LoJack). A RTL81xx LOM chip is a sure sign that the motherboard manufacturer has cut several corners, i.e. they are strong indicatives of a shoddy product.

    Get yourself a proper NIC, even an USB-based NIC is likely to do better, and in the future, avoid anything RealTek-inside like the plague.

    [1] Read the driver source if you haven’t had enough evidence so far.

  9. Realtek has a history of bad Ethernet, compare the r8139 which only worked fine when hand-pinned to use 10 Mbit/s half-duplex. Only working card of theirs is r8029 but then that’s some sort of ne2k alike; r8019 are also supposedly usable. But these are 10 Mbit/s cards.

  10. I’ve found a nice fix for a RTL8168 onboard chip:

    05:07.0 Ethernet controller: Accton Technology Corporation SMC2-1211TX (rev 10)

    Yes, that’s right! I’ve dug into my “computer junk” box and found an ethernet card that works, for for the ultimate in irony:

    [ 1.470653] 8139too 0000:05:07.0: eth1: RealTek RTL8139 at 0xffffc900126e0000, 00:04:e2:12:1c:ea, IRQ 21

    It has a RealTek chip in it too. Hey, at least its not a via-rhine.

  11. Just to be clear, the bug where your ethernet card using this chip dies when under some level of load is different. This one doesn’t send any packets at all from the start. I will give it a whirl with no firmware to see if that fixes it, like what Roger has done. Unfortunately, I think the rev 6 is the crappiest revision of a sad family of chips so I’m not hoping for too much.

  12. Stupid question, maybe, but do you have the “firmware-realtek” package installed?

    1. Sure did have that installed, or not installed (I’ve tried both). It plain doesn’t work.

  13. Mine its the same as yours but rev 02.
    It works with the kernel shipped with debian wheezy.

    How many of these network adapters are there?

    1. You just look at the number of different lspci outputs on this one page and see there are plenty. I was surprised myself about that and the different problems they cause.

  14. Hi Craig,
    Just for my curiosity, would you consider booting kfreebsd d-i to see if it is working at all under GNU/kFreeBSD’s blob-free “re” driver? The network autoconfiguration step should attempt DHCP and look for IPv6 router announcements, then you could switch to another console and see what ifconfig shows.

  15. No problem for me.
    02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 07)

    # ethtool -i eth0
    driver: r8169
    version: 2.3LK-NAPI
    firmware-version: rtl8168e-3_0.0.4 03/27/12
    bus-info: 0000:02:00.0
    supports-statistics: yes
    supports-test: no
    supports-eeprom-access: no
    supports-register-dump: yes
    supports-priv-flags: no
    
    Bye
    

  16. I once had to struggle with this Ethernet chip as well. I managed to get it stable and working with CAT6 cable, disabling autonegotiation, forcing 1GbE operation at both ends and modifying flow control. On the last one I can’t remember, did I enable or disable it. Also my memory comes short if the problem had anything to do with MDI/MDI-X. I think MDI/-X detection wasn’t related to this case.

    With some vague deduction I concluded that the problem related to link negotiation and the driver or card dropped to half duplex all at sudden during operation. Port enable/disable didn’t help but machine reboot, and the machine had server duties of course. Hope this helps you although I really hope whatever the technical cause is, the real cause gets fixed once.

    I was amazed this problem still exists since I think there are a big number of r81* cards in the field operating under linux systems as the chip seems quite popular in desktop motherboards. And I had the case about five to six years ago.

    1. I’ve had similar experiences on various chipsets, the oddest being a Sun server that would only work with a cross-over cable. It does have a negotiation “feel” to it and with GigE it gets more complicated (though it is theoretically better). It could well be the chipset is ok, but the auxiliary chips around it are broken, or it is just not tested too well.

  17. Hi,

    I have a similar card (on-board) and has exactly the same problem. The card works with Debian 3.8 kernel, which I still bootup. None of the newer kernel work though no warnings or errors are thrown.

    I think I will buy a new ethernet card and disable the realtek one. Any recommendations?

    1. Sorry, I basically dug an old card out of my “junk box” and put that in. For something at home this is the ideal solution.

  18. Mine:

    02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 09)
    
    $ ethtool -i eth0
    driver: r8168
    version: 8.037.00-NAPI
    firmware-version:
    bus-info: 0000:02:00.0
    supports-statistics: yes
    supports-test: no
    supports-eeprom-access: no
    supports-register-dump: yes
    supports-priv-flags: no
    

    Worked with stock wheezy driver r8169. But would refuse to acquire IP with DHCP. I upgraded kernel to 3.10 from wheezy-backports. Still no DHCP. I rebuilt r8168 driver. Still to this date no DHCP. Works with static IP. It is funny, because it worked just fine with FreeBSD 9.1 and FreeBSD 9.2 “re” driver.

    ALso, I was trying to enable Wake-On LAN, which started to work only with rebuilt dkms r8168 driver.

Comments are closed.