How do I stop my ethernet network connection from dropping?

Download the official realtek driver.

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

Then remove the r8169 module from the linux kernel.

# rmmod r8169

<Quick install with proper kernel settings>
Unpack the tarball :
# tar vjxf r8168-8.aaa.bb.tar.bz2
Change to the directory:
# cd r8168-8.aaa.bb
If you are running the target kernel, then you should be able to do :
# ./autorun.sh (as root or with sudo)
You can check whether the driver is loaded by using following commands.
# lsmod | grep r8168
# ifconfig -a
If there is a device name, ethX, shown on the monitor, the linux
driver is loaded. Then, you can use the following command to activate
the ethX.
# ifconfig ethX up

Finally, blacklist the r8169 driver add the following to /etc/modprobe.d/blacklist.conf:

#blacklist r8169 driver
blacklist r8169

I found it at http://www.rvdavid.net/how-to-get-gigabit-speeds-from-rtl81118168b-pci-express-gigabit-ethernet-controller-on-ubuntu-linux/ and it works. Now it's all good with net speed.


Just so I can find this next time my SSD blows up. Here are instructions for removing the broken r8169 and inserting r8168 on Ubuntu w/Linux Kernel 3.x.

Kernel 3.x

  • Download r8168
  • Apply this patch if it is still marked unresolved.
  • STOP: If you plan to use DKMS, skip to the DKMS section now.
  • Run sudo ./autogen.sh, it will build the module, remove the old one (blacklist it if you want) and install r8168.ko to /lib/modules/'uname -r'/drivers/net/.

DKMS

DKMS will build and install the module upon new kernel installs. You will also need to blacklist the old module.

Blacklist the old module if you haven't already.

echo 'rmmod r8169' | sudo tee /etc/modprobe.d/blacklist.conf

Install DKMS, and gcc.

sudo apt-get install dkms gcc

Copy the module source files to a persistent location, so you don't accidently remove them later.

sudo cp -R r8168-8.025.00 /usr/src

echo 'PACKAGE_NAME=r8168
PACKAGE_VERSION=8.025.00
MAKE[0]="make"
BUILT_MODULE_NAME[0]=r8168
BUILT_MODULE_LOCATION[0]="src/"
DEST_MODULE_LOCATION[0]="/kernel/updates/dkms"
AUTOINSTALL="YES"' | sudo tee /usr/src/r8168-8.025.00/dkms.conf

Then run,

dkms add -m r8168 -v 8.025.00
dkms build -m r8168 -v 8.025.00
dkms install -m r8168 -v 8.019.00
sudo update-initramfs -u

I had a similar problem and I found a solution.

see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/889527