Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Buggy Realtek Semiconductor RTL8111/8168B driver ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Wed Jan 11, 2012 4:35 pm    Post subject: Buggy Realtek Semiconductor RTL8111/8168B driver ? Reply with quote

I have Motherboard: Gigabyte GA-990FXA-UD5
with: Realtek RTL8111E chip (10/100/1000 Mbit) chip

The kernel-3.1.5-gentoo I'm using is loading:
Code:
Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
   Subsystem: Giga-byte Technology GA-EP45-DS5 Motherboard
   Kernel driver in use: r8169

dmesg
Code:
 r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
 r8169 0000:05:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
 r8169 0000:05:00.0: setting latency timer to 64
 r8169 0000:05:00.0: irq 41 for MSI/MSI-X
 r8169 0000:05:00.0: eth0: RTL8168evl/8111evl at 0xffffc90000c1e000, 1c:6f:65:f9:5a:d6, XID 0c900800 IRQ 41


Yesterday, I lost connection. Trying to reload the net.eth0 gave me some 168.xxx.... address (and I should get:10.0.0.xxx)
I reboot the computer but it did not help, I was still getting IP an "168.xxx...."
I disconnected the computer for 30min and after re-booting it obtained correct IP address.

Is this "Realtek RTL8111/8168B" still buggy? Should I get an internal network card? I need reliable connection.

I know there was a problem with this driver in kernel-3.0 dropping connection
Back to top
View user's profile Send private message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1186
Location: Canada

PostPosted: Wed Jan 11, 2012 7:39 pm    Post subject: Reply with quote

I've been using it for years with no dropped connections.
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

What happens if you run dhcpcd manually?
Code:
dhcpcd eth0

_________________
AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Wed Jan 11, 2012 7:59 pm    Post subject: Reply with quote

bjlockie wrote:
I've been using it for years with no dropped connections.
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

What happens if you run dhcpcd manually?
Code:
dhcpcd eth0


I'll try it.
What kernel are you on?
From my knowledge they had some problems with the kernel-3.0 driver for this card. Even official Gentoo-iso installation wouldn't obtain the eth0 IP address last December I had to use an older gentoo-iso to boot and install it.

I was somehow suppose to be fixed in 3.1 kernel, that is why I was running 3.1.5. I see your revision is 01 mine is 06
There is a new driver in portage, maybe I'll load it manually.
http://packages.gentoo.org/package/net-misc/r8168

(this network card hangup on me for the second time since yesterday and the only way to revive it is to do a cold boot, reset the power switch otherwise I'll get a wrong IP address.)
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Wed Jan 11, 2012 9:07 pm    Post subject: Reply with quote

Ho to emerge this driver "net-misc/r8168"
Code:
* Found sources for kernel version:
 *     3.1.6-gentoo
 * Checking for suitable kernel configuration options...
 *   r8168-8.026.00 requires Realtek 8169 PCI Gigabit Ethernet adapter (CONFIG_R8169) to be DISABLED

It keep asking me to disable the one in the kernel.
If I do so my network card will not function, how am I suppose to emerge something?
Back to top
View user's profile Send private message
agent_jdh
Veteran
Veteran


Joined: 08 Aug 2002
Posts: 1783
Location: Scotland

PostPosted: Wed Jan 11, 2012 10:34 pm    Post subject: Reply with quote

emerge -f r8168

While you have a working ethernet connection; that will download the files required for the ebuild. Then rebuild your kernel (or just delete the .ko file if it's a module), reboot, and emerge r8168.
_________________
Jingle Jangle Jewellery
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Wed Jan 11, 2012 10:42 pm    Post subject: Reply with quote

agent_jdh wrote:
emerge -f r8168net-misc/r8168

While you have a working ethernet connection; that will download the files required for the ebuild. Then rebuild your kernel (or just delete the .ko file if it's a module), reboot, and emerge r8168.

I just recompile the kernel without the "R8169" build IN (without rebooting) and I was able to install the "net-misc/r8168".
Do I need to append the /etc/conf.d/modules
modules="r8168"
Back to top
View user's profile Send private message
agent_jdh
Veteran
Veteran


Joined: 08 Aug 2002
Posts: 1783
Location: Scotland

PostPosted: Wed Jan 11, 2012 10:51 pm    Post subject: Reply with quote

Try it and see - I use the kernel r8169 module and it autoloads fine without having to specify it in /etc/conf.d/modules. YMMV.
_________________
Jingle Jangle Jewellery
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Wed Jan 11, 2012 11:13 pm    Post subject: Reply with quote

agent_jdh wrote:
Try it and see - I use the kernel r8169 module and it autoloads fine without having to specify it in /etc/conf.d/modules. YMMV.


I just removed any build IN r8169 driver from the kernel and emerge the "net-misc/r8168".
Code:
find /lib/modules/3.1.6-gentoo/ -type f -iname '*.o' -or -iname '*.ko' | less

shows that
/lib/modules/3.1.6-gentoo/net/r8168.ko is there

However, it seems to me the newest one in the portage: net-misc/r8168-8.026.00
is loading the save network driver as the one that was build-IN kernel-3.1.5 and was giving me problems (losing connection, computer needs cold reboot).
Code:
Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 06)


If I lose connection again I'll be looking looking for more reliable network card, and will black list Realtek from my future network cards.

Do I need to clean the old kernel driver before I load a new one or "net-misc/r8168-8.026.00" is using the same what is in the kernel "R8169"
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2712
Location: Edmonton, AB

PostPosted: Thu Jan 12, 2012 6:59 am    Post subject: Reply with quote

Do I need to black list the "r8169" if so how?

I've installed: net-misc/r8168-8.026.00
but: lspci -v
still keep showing me I'm using: "Kernel driver in use: r8169"
Code:
05: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 41
   I/O ports at ae00 [size=256]
   Memory at fd9ff000 (64-bit, prefetchable) [size=4K]
   Memory at fd9f8000 (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 12-34-56-78-12-34-56-78
   Kernel driver in use: r8169
   Kernel modules: r8168
Back to top
View user's profile Send private message
j_c_p
Guru
Guru


Joined: 30 Aug 2003
Posts: 319
Location: France - Colmar

PostPosted: Thu Jan 12, 2012 11:41 am    Post subject: Reply with quote

bjlockie wrote:
I've been using it for years with no dropped connections.
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

What happens if you run dhcpcd manually?
Code:
dhcpcd eth0

You've got an older NIC (rev1) than Joseph_sys : he has got the RTL8111E (rev6 in the driver).
I've got the RTL8111C (rev2 in the driver).
Quote:
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
Subsystem: Giga-byte Technology GA-EP45-DS5 Motherboard
Flags: bus master, fast devsel, latency 0, IRQ 42
I/O ports at de00 [size=256]
Memory at fdcff000 (64-bit, prefetchable) [size=4K]
Memory at fdce0000 (64-bit, prefetchable) [size=64K]
[virtual] Expansion ROM at fdc00000 [disabled] [size=64K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/2 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable- Count=2 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 12-34-56-78-12-34-56-78
Kernel driver in use: r8169

It works perfect for me too.
Quote:
r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
r8169 0000:02:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
r8169 0000:02:00.0: setting latency timer to 64
r8169 0000:02:00.0: irq 42 for MSI/MSI-X
r8169 0000:02:00.0: eth0: RTL8168c/8111c at 0xffffc90000022000, 00:24:1d:10:7b:f2, XID 1c4000c0 IRQ 42

Quote:
r8169 0000:02:00.0: eth0: link down
r8169 0000:02:00.0: eth0: link down
ADDRCONF(NETDEV_UP): eth0: link is not ready
r8169 0000:02:00.0: eth0: link up
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

/etc/conf.d/net :
Quote:
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).

config_eth0="192.168.1.2"
routes_eth0="default via 192.168.1.1"

    jcp@phoenix64 ~ $ rc-status
    Runlevel: default
    syslog-ng [ started ]
    numlock [ started ]
    bluetooth [ started ]
    net.eth0 [ started ]
    cupsd [ started ]
    hddtemp [ started ]
    postfix [ started ]
    sshd [ started ]
    udev-postmount [ started ]
    vixie-cron [ started ]
    xdm [ started ]
    local [ started ]
    Dynamic Runlevel: hotplugged
    Dynamic Runlevel: needed
    udev-mount [ started ]
    sysfs [ started ]
    dbus [ started ]
    Dynamic Runlevel: manual

Code:
CONFIG_NETDEVICES=y
# CONFIG_IFB is not set
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_VETH is not set
# CONFIG_NET_SB1000 is not set
# CONFIG_ARCNET is not set
CONFIG_MII=y
# CONFIG_PHYLIB is not set
# CONFIG_NET_ETHERNET is not set
CONFIG_NETDEV_1000=y
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_E1000E is not set
# CONFIG_IP1000 is not set
# CONFIG_IGB is not set
# CONFIG_IGBVF is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
CONFIG_R8169=y
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
# CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set
# CONFIG_BNX2 is not set
# CONFIG_CNIC is not set
# CONFIG_QLA3XXX is not set
# CONFIG_ATL1 is not set
# CONFIG_ATL1E is not set
# CONFIG_ATL1C is not set
# CONFIG_JME is not set
# CONFIG_STMMAC_ETH is not set
# CONFIG_PCH_GBE is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_TR is not set
# CONFIG_WLAN is not set

_________________
Lian Li PC60 - AMD FX 8300 - Asrock 990FX EXTREME9 - Gigabyte GTX960 G1 Gaming 4Go
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Thu Jan 12, 2012 4:28 pm    Post subject: Reply with quote

I have experience with only one system that uses r8169, a server rented from Hetzner (EQ4)

However it does not like hardened newer than 2.6.34. I know of at least one other Gentoo user who has had this same problem (he actually warned me about the issue). I thought it was supposed to be fixed with 3.x kernel, but I guess not.

This sort of thing sometimes happens, I remember sky2 (Syskonnect Yukon 2) drivers caused a kernel panic a while ago. I think I saw a thread about e1000 having the same thing, but I have seen many threads over the years and my memory could betray me.

Either way, I know 2.6.34-hardened seems to work ok with r8169, have not tried anything newer since I need this server for work.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Thu Jan 12, 2012 4:46 pm    Post subject: Reply with quote

Hmm, this is just a guess, but... Do you guys have the linux-firmware package installed? It contains firmware for these cards in the rtl_nic directory. If the driver is compiled as a module, this firmware will get loaded. Might help. I have a "rev 03" of this card and I never had any issues.
Back to top
View user's profile Send private message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1186
Location: Canada

PostPosted: Fri Jan 13, 2012 12:19 am    Post subject: Reply with quote

Joseph_sys wrote:

What kernel are you on?


3.2 now but I have used almost every version.

I update my kernel alot.
_________________
AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS
Back to top
View user's profile Send private message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1186
Location: Canada

PostPosted: Fri Jan 13, 2012 12:21 am    Post subject: Reply with quote

Joseph_sys wrote:
Ho to emerge this driver "net-misc/r8168"
Code:
* Found sources for kernel version:
 *     3.1.6-gentoo
 * Checking for suitable kernel configuration options...
 *   r8168-8.026.00 requires Realtek 8169 PCI Gigabit Ethernet adapter (CONFIG_R8169) to be DISABLED

It keep asking me to disable the one in the kernel.
If I do so my network card will not function, how am I suppose to emerge something?


I have always built it into my kernel, so I have no idea.
_________________
AMD FX6100 CPU, 16 GiB RAM, OCZ Vertex 3 SSD
ASRock 970 Extreme3 motherboard with S/PDIF audio
Galaxy-NVidia GeForce 8800GT video card, Cyber Power CP550HG USB UPS
Back to top
View user's profile Send private message
ycUygB1
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 276
Location: Portland, Oregon

PostPosted: Wed Oct 24, 2012 9:21 am    Post subject: Reply with quote

The Realtek 8168 does not use the 8169 driver. It uses the driver in http://code.google.com/p/r8168/
which is also in net-misc. Attempts to use the 8169 driver are misguided and will fail in various ways and degrees.

The Gentoo install media does not contain the 8168 driver. Thus, Gentoo cannot be easily installed on new hardware that has only this network card.
One would need network connectivity (which one cannot get) in order to retrieve the correct driver.
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Wed Oct 24, 2012 10:38 am    Post subject: Reply with quote

hnaparst wrote:
The Realtek 8168 does not use the 8169 driver.

Of course it does. It's what I use. But some people have issues (particularly those with rev06 of the device, while mine is rev03), so there's an external 8168 driver provided by Realtek that works better for them.
Back to top
View user's profile Send private message
ycUygB1
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 276
Location: Portland, Oregon

PostPosted: Wed Oct 24, 2012 11:14 am    Post subject: Reply with quote

OK, I stand corrected. The 8168 uses the 8169 driver, but it doesn't work. And the Gentoo install media doesn't recognize the hardware and therefore doesn't load the 8169 driver, which doesn't work anyway unless you happen to be doing an install on old hardware.
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Wed Oct 24, 2012 11:48 am    Post subject: Reply with quote

If you have a variant that isn't recognized at all, please post the output of lspci -nn. The -nn is important, it will show the pci-id that I'm interested in.
Back to top
View user's profile Send private message
ycUygB1
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 276
Location: Portland, Oregon

PostPosted: Sun Oct 28, 2012 8:11 am    Post subject: Reply with quote

I am sorry for the delay. I ordered an e1000 card, and when Amazon delivered it I was able to set up Gentoo.

Code:
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 06)
   Subsystem: ASUSTeK Computer Inc. P8P67 and other motherboards [1043:8432]
   Flags: bus master, fast devsel, latency 0, IRQ 42
   I/O ports at d000 [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 00-00-00-00-00-00-00-00
   Kernel driver in use: r8169
   Kernel modules: r8169



On the fully built-out system, the r8169 module is able to get an IP address with a warning:

Code:

[   69.163479] r8169 0000:03:00.0: eth1: unable to load firmware patch rtl_nic/rtl8168e-3.fw (-2)
[   69.169416] r8169 0000:03:00.0: eth1: link down
[   69.169433] r8169 0000:03:00.0: eth1: link down
[   70.834321] r8169 0000:03:00.0: eth1: link up


I have not tested the stability of this link, although I have read that it is unstable. The warning does not give me confidence either.
I will just say that:

1. This card is not automatically recognized by the Gentoo minimal CD. I think it might have pulled in the r8169 module, but that was as far as it got.
2. In any event, for some reason, I was not able to connect to the internet with the 8169 module with the Gentoo install media.
2. I have previously used the r8168 module with excellent success, speed, and stability.

I would humbly suggest that the r8168 module be added to the Gentoo install media.
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2665
Location: Slovenia

PostPosted: Sun Oct 28, 2012 10:02 am    Post subject: Reply with quote

That firmware is in the linux-firmware package, as I indicated a few posts above. My card works without it, so there must be some integrated firmware already on the chip, but this external one possibly improves the functioning of the thing.

What's the kernel on the install media? Maybe it's simply too old to support your card, and a newer kernel works fine.
Back to top
View user's profile Send private message
ycUygB1
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 276
Location: Portland, Oregon

PostPosted: Sun Oct 28, 2012 10:07 am    Post subject: Reply with quote

The kernel on the install media is 3.5.7, which has since been marked as unstable. The install media was downloaded this month, not sure of the exact date.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum