Comment 4 for bug 114171

Revision history for this message
Achim (ach1m) wrote :

Realtek has released a new driver, that solves my problems.

Linux driver for kernel 2.6.x (Support x86 and x64)
 8.001.00 2007/5/25 20k

ftp://209.216.61.149/cn/nic/r8168-8.001.00.tar.bz2
To install the module take a look at the README.

You have to blacklist the original module "r8169" as it would catch the NIC and the Realtek module "r8168" would not be used.

Here is a copy of the original post, that I found.
source: http://ubuntuforums.org/showthread.php?t=143982&highlight=r1000

That post was made for an older version of the Realtek driver, which was called "r1000".
But don't mind just replace "r1000" with "r8168".

##############################################################################################################################

Inside of Gnome press ALT + F2 and type:

gksudo gedit /etc/modprobe.d/blacklist-network

Now create ONE of the following lines

# Prevent r8169.ko from loading and allow r1000.ko to load
blacklist r8169

# Prevent r1000.ko from loading and allow r8169.ko to load
blacklist r1000

##############################################################################################################################

If you could not blacklist the original module "r8169", then follow this installation steps.

Here is a copy of the original post.
source: http://ubuntuforums.org/showthread.php?t=143982&highlight=r1000

##############################################################################################################################

 Re: Gigabit ethernet Realtek RTL8169 too slow
> ...but transfer speed still the same as with 100 Mbps ethernet.

Got the same problem with my onboard 8169 NIC ... transfers are en par or worse as with 100MBit. Couldn't find any solution so far ...

> I've tryed a Realtek driver r1000 and it did install, but I'm not sure if it actually loads.

To check if the r1000 module is loaded simply check with lsmod:

Open a terminal:

# lsmod | grep r1000

Output should look like this:
r1000 16064 0

Now, let's find out if r8169 is loaded as well...

# lsmod | grep r8169

If it is loaded then there's the chance that r8169 has grabbed the NIC ... however, you can force r1000 to be used by a small "hack".

# sudo mv /lib/modules/`uname -r`/kernel/drivers/net/r8169.ko ~/
This will move the r8169 kernel module into your home directory.

# sudo depmod -a
Rebuild the kernel module dependencies.

# sudo mv /boot/initrd.img-`uname-r` /boot/initrd.img-`uname -r`.ubuntu
make a backup of the original initrd.

# sudo mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`
Create a new initrd WITHOUT the r8169 module

# sudo gedit /etc/modules

Add "r1000" (without the quotes) at the end of the file.

Save the file.

Upon reboot you are using r1000 for sure as there's no more r8169.

I'm sure the same goal may be accomplished by blacklisting r8169 somewhere in the config of hotplug --- haven't worked myself into this yet.

Now try and see if you see any improvements ...

[EDIT]
If you are curious you may find some output from the module in /var/log/dmesg - looks like this:

Code:

[ 67.280895] eth0: Identified chip type is 'RTL8169S/8110S'.
[ 67.280902] eth0: r10001.0, the Linux device driver for Realtek Ethernet Controllers at 0xd800, 00:0c:76:96:a5:64, IRQ 16
[ 67.322309] eth0: Auto-negotiation Enabled.
[ 73.642947] eth0: 1000Mbps Full-duplex operation.
[ 73.642950] Realtek RTL8169/8110 Family Gigabit Ethernet Network Adapter
[ 73.642952] Driver version:1.0
[ 73.642953] Released date:2005/12/30
[ 73.642955] Link Status:Linked
[ 73.642957] Link Speed:1000Mbps
[ 73.642959] Duplex mode:Full-Duplex
[ 73.642960] I/O Base:0xD800(I/O port)
[ 73.642962] IRQ:16

[/EDIT]

--- Undoing the changes:

# sudo gedit /etc/modules
Remove the "r1000" line and save the file

# sudo mv /boot/initrd.img-`uname -r`.ubuntu /boot/initrd.img-`uname -r`
Restore the original initrd

# sudo mv /lib/modules/`uname -r`/kernel/drivers/net/r1000.ko ~/
Move the r1000 module to your home directory

# sudo mv ~/r8169.ko /lib/modules/`uname -r`/kernel/drivers/net/
Move the r8169 module back to where it belongs.

# sudo depmod -a
Rebuild the module dependencies.

Reboot.

##############################################################################################################################

so I hope this would help some people.

I hope that this problem will be solved in the next ubuntu release.

Best wishes
Achim