# [Solved] eth0 link dropping (r8169 driver)

## tharasix

I upgraded to the stable openrc 0.11.5, and switched over to nfsmount from netmount.  Now when I browse the web in Firefox, some sites fail to load randomly, and most requests will stall for a while on DNS lookups.  Also, my NFS connection to a file server takes a ridiculous amount of time to read directory contents, among other operations.  I'm on a wired network, so I don't suspect LAN issues.  I didn't see this before the openrc upgrade, nor am I seeing it in Windows on any machine wired or wireless.

Is anybody else seeing this?  Did I miss the net_sucks="true" setting in rc.conf?  It's making me just want to boot to Windows, which subsequently makes me feel dirty.Last edited by tharasix on Sun Dec 02, 2012 7:15 am; edited 2 times in total

----------

## tharasix

OK, so I don't think it's openrc.  From my log file:

 *Quote:*   

> Dec 01 11:43:43 [kernel] [ 7209.277180] r8169 0000:01:00.0: eth0: link up
> 
> Dec 01 11:43:45 [kernel] [ 7211.260099] r8169 0000:01:00.0: eth0: link up
> 
> Dec 01 11:43:47 [kernel] [ 7213.042139] r8169 0000:01:00.0: eth0: link up
> ...

 

And so on.  I've tried different cables and tried putting a switch in between my laptop and router, and I can reduce the number of these, but not eliminate them.  Longer cabling seems to make the problem worse.  I haven't upgraded my kernel in a while.  Still running 3.0.17-tuxonice-r1.  The most recent stable tuxonice kernel is 3.0.25.

I'm suspecting my laptop hardware or the driver, though I have to assume the r8169 driver is pretty solid at this point.  Any suggestions?  I'll try a different laptop on this cable later tonight when I get a chance.

----------

## tharasix

 *tharasix wrote:*   

> I'm suspecting my laptop hardware or the driver, though I have to assume the r8169 driver is pretty solid at this point.  Any suggestions?  I'll try a different laptop on this cable later tonight when I get a chance.

 

As it turns out, there's a long-standing bug in the autonegotiation code in the r8169 driver.  Adding the file /etc/modprobe.d/r8169.conf with the contents below seems to do the trick:

```
# turn off autonegotiation on the r8169 ethernet driver

install r8169 /sbin/modprobe --ignore-install r8169 && /usr/sbin/ethtool -s eth0 autoneg off
```

Thanks to Eric who posted this suggestion here.  Make sure you emerge ethtool as well.

I feel like the people who were reading this thread were just letting me Google for this problem myself, given the deafening silence.  Well, if anybody else hits this problem, there ya go.

----------

