trixbox CE 2.6.2 (Stable) ETHERNET PROBLEM WITH INTEL D945GCLF2's ETHERNET CHIP RTL8111/8168B PCI Express Gigabit controller

kinglyr
Posts: 28
Member Since:
2007-05-06

Hello,
I tried to install
Trixbox CE 2.6.2 (Stable) - 602,109,952 bytes - Released 12/26/08 MD5: 4b71156885733abe0c6cdc531577657f
on my system which consists of:
M/B: Intel D945GCLF2 (latest bios *140*) which has onboard RTL8111/8168B PCI Express Gigabit Ethernet controller
RAM: 512MB DDR2
HDD: Transcend 8GB CF 266x
and i faced problems with the Gigabit LAN which seems that does not work properly...
Actually, sometimes when Trixbox is loading it say "bringing up eth0 interface... Failed, no link present, please check cable" although the Gigabit led is lighted up green (means 100MB/s speed network) and sometimes it is working but only at 100Mb/s speed. One thing is for sure, the system NONE of the times i tested, did worked at 1000Mb/s speed.

The thing is that, if i try on exactly same setup, to install my old Trixbox 2.6.1.13 (stable) EVERYTHING IS WORKING PERFECTLY!!! The Gigabit LAN led is light up orange (that means that supports 1000MB/s speed!!!) and also on my gigabit switch (Level1 GSW-0806) the led is showing that the port speed is 1000MB/s!!!

Please check, what you have changed from TrixBox 2.6.1.13 to Trixbox 2.6.2.1 and fix it...

Regards,

John

--

BEng (HONS) Electronic Engineering
MBA, MSc in Mobile and Satellite Comms
Node Admin into Athens Wireless Metropolitan Network (www.awmn.net)



kinglyr
Posts: 28
Member Since:
2007-05-06
SOLVED!

THE PROBLEM WAS WITH THE REALTEK DRIVER! HERE IS THE SOLUTION:
download driver from realtek:
http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&P...

Check by looking:
from /etc/sysconfig/hwconf
or by running:
• ethtool -i eth0
or by running:
• lspci
• lspci –v which shows:
“01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
Subsystem: Unknown device 8680:0100
Flags: bus master, fast devsel, latency 0, IRQ 50
I/O ports at 2000 [size=256]
Memory at 30200000 (64-bit, non-prefetchable) [size=4K]
Memory at 30000000 (64-bit, prefetchable) [size=64K]
Expansion ROM at 30020000 [disabled] [size=128K]
Capabilities: [40] Power Management version 3
Capabilities: [50] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable+
Capabilities: [70] Express Endpoint IRQ 1
Capabilities: [b0] MSI-X: Enable- Mask- TabSize=2
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 00-e0-4c-68-00-00-00-01”

• ifconfig or ifconfig -a

http://wiki.centos.org/AdditionalResources/HardwareList/RealTekRT...
5. Solutions
There are a few ways to get the driver.
(1) Download and install the r8168 driver from Realtek's website at:
Realtek Driver Download
Some direct links (newer versions might be available -- go to Realtek Driver Download to check):
ftp://66.104.77.130/cn/nic/r8168-8.010.00.tar.bz2
ftp://202.65.194.212/cn/nic/r8168-8.010.00.tar.bz2
ftp://61.56.86.122/cn/nic/r8168-8.010.00.tar.bz2
Pro:
• Requires only the packages available on the install DVD/Base repository and the source drivers downloaded from Realtek.
Against:
• You must recompile manually the module after each kernel upgrade.
(2) As an alternative method, a dkms-enabled driver package can be downloaded from RPMForge. Please follow the instructions available at http://wiki.centos.org/Repositories/RPMForge to install and activate this repository. After that you can use
• yum install dkms-r8168
to install the driver (and all its dependencies) on your system.
Pro:
• After each kernel upgrade, rebuilding of the module is automatically handled by the dkms-autoinstaller program.
• Does not require downloading the drivers directly from Realtek.
Against:
• Requires the dkms package (available in RPMForge).
(3) As yet another alternative method, the driver may be downloaded as a kmod driver RPM package from here (thanks to Alan for contributing these packages). Select the kmod package that matches your kernel and install with:
• a) Log in as the root user (or use sudo command)
• b) Create a mount point “mkdir –p /mnt/pen”
c) To mount the disk run mount command: “mount /dev/sda1 /mnt/pen” (this command will mount usb stick contents into /mnt/pen)
• d) To use it or to see your files:
“cd /mnt/pen”
“ls –l”
• e) To copy files from /home/rdl/*.c to directory to pen drive us cp command:
“cp –v /home/rdl/*.c /mnt/pen”
• Check whether the built-in driver, r8169.ko (or r8169.o for kernel 2.4.x), is installed by running: “lsmod | grep r8169”. If it is installed remove it by running: “rmmod r8169”
• “rpm -ivh kmod-r8168*.rpm”
• f) To unmount the disk run umount command: “umount /dev/sda1”
Pro:
• The module functions seamlessly across kernel updates via the weak-updates mechanism.
• Does not require nor depend on any other packages, particularly development packages.
• Does not require compiling the driver.
Against:
• Not yet available from any major repositories.

6. List of packages needed to install r1000/r8168/r8101
Here is the full list of packages which must be installed in order to compile the driver from source.
Note this section does not apply to the kmod packaged driver from solution (3) above.
Centos 5 Centos 4 Centos 3 Repository Observation
binutils binutils binutils standard (1)
gcc gcc gcc standard (1)
glibc-devel glibc-devel glibc-devel standard (1)
glibc-headers glibc-headers glibc-headers standard (1)
kernel-headers glibc-kernheaders glibc-kernheaders standard (1)
kernel-devel kernel-devel kernel-source standard (1) (2) (3)
make make make standard (1)
dkms dkms dkms RPMForge (4)
(1) standard = Base + Updates repositories.
(2)
• Under all circumstances, the kernel-headers / kernel-devel / kernel-source package must match the version of the kernel for which the driver is compiled (not necessarily the running kernel).
• At boot time, dkms will detect if the existing driver module matches the running kernel and will compile a newer one if needed, provided that kernel-headers / kernel-devel / kernel-source matches the running kernel.
• If you are compiling the driver manually, you can compile the driver for kernel version other than the running one by using the procedure described below under Updating the Kernel. This step is mandatory if you are upgrading the kernel via a remote connection and you are not using dkms.
(3) If you are using xen, please install and use kernel-xen-devel instead of kernel-devel.
(4) Only needed if installing dkms-r8168. You can check the state of the module any time using the command dkms status. The most interesting states are: added (the module has been successfully registered with the dkms system, but it has not been compiled) and installed (the module has also been successfully compiled).
(5) to compile driver first copy r8168-8.010.00.tar.bz2 into /usr/src/ and then run:
• tar vjxf r8168-8.010.00.tar.bz2
• cd r8168-8.010.00
• yum -y install binutils-devel
• yum -y install kernel-devel
• rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-releas...
• yum -y install dkms
• Check whether the built-in driver, r8168.ko (or r8168.o for kernel 2.4.x), is installed by running: “lsmod | grep r8168”. If it is installed remove it by running: “rmmod r8168”
• make clean modules (as root or with sudo)
• make install
• depmod -a (depmod creates a list of module dependencies)
• insmod ./src/r8168.ko (or r8168.o in linux kernel 2.4.x) (insmod installs a loadable module in the running kernel.)
• 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 it:
“ifconfig eth0 up”

7. Driver Disks
Driver disks for the following releases have been created and can be used while installing a new system :
• CentOS 4.5 (kernel 2.6.9-55.EL)
• CentOS 5.0 (kernel 2.6.18-8.el5)
• CentOS 5.1 (kernel 2.6.18-53.el5)
• CentOS 5.2 (kernel 2.6.18-92.el5)
These driver disks are for i686 and x86_64 arches only.
• r8168 Driver Disk for CentOS 4.5 and 5.0
• r8168 Driver Disk for CentOS 5.1 and newer
• r8168 Driver Disk Files for CentOS 5.2 See readme.txt.
8. Notes
• The kernel's r8169 driver identifies the same PCI ID as its working hardware. A test with a Fedora 8 Test 1 Live CD showed that that kernel 2.6.23 attempts to load the r8169 driver. However it does not work. The CentOS 5.0 installer does not attempt to load the r8169.
An exchange with Francois Romieu, one of the kernel developers for the r8169 driver, confirmed that the functionality of Realtek's r8168 and r8169 drivers will be incorporated into the kernel's r8169 driver. The kernel changelog shows a merge with Realtek's drivers in July 2007.
Kernel r8169 Changelog
This was confirmed November 2007 using the first release of Fedora 8 (kernel 2.6.23.1-42.fc8) on a Gigabyte GA-P35-DS4 and an MSI P35 Neo-F E7360, both with an RTL8111B on-board. The kernel's r8169 driver correctly identified and configured the on-board NIC.
8.1. Update January 2009
To test a more recent kernel than that provided by the upstream vendor, a rev 02 motherboard (a Gigabyte GA-EG45M-DS2H) was tested with Fedora 10 (kernel 2.6.27.5-117.fc10). As previously seen, the kernel identified the NIC and loaded the r8169 driver but still did not operate the NIC correctly. Interestingly, the same hardware was also tested with GParted Live 0.4.1-2, which is based on Debian Lenny (kernel 2.6.26-12). This software did correctly initialize and operate the RTL8111C rev. 02 NIC.
9. Updating the Kernel
Note this section does not apply to the kmod packaged driver from solution (3) above or if you have used one of the driver disks from section 7 above because those drivers work seamlessly across kernel updates via the weak-updates mechanism.
When a NIC driver isn't included in the kernel, remotely (that is over a telnet or ssh session) updating the kernel can be a problem. A few extra steps can make this possible.
1. Install the new kernel. Either from RPM or compiling a custom kernel. If installing from RPM, the associated kernel-devel package will also need to be installed.
2. Do not reboot. The NIC driver hasn't been added to the new kernel yet. Rebooting now means an inactive NIC and a visit to the console.
3. Go to the src directory of the r8168 source. Edit Makefile.
4. Change the line
KVER := $(shell uname -r)
to your newly installed kernel version. For example:
KVER := 2.6.22.9-MyCustomKernel
5. Go back to the top directory of the r8168 source and recompile and install the driver:
make all;
This will overwrite any existing r8168.ko driver. If you want to keep the older driver, rename the existing file before compiling the new driver.
6. Confirm that the driver was copied to the right place. For example:
find /lib/modules/2.6.22.9-MyCustomKernel -name r8168.ko
If you have two copies present, use modinfo to identify the older driver and delete or rename it before rebooting.
7. Run:
depmod -a 2.6.22.9-MyCustomKernel
8. Update your bootloader configuration (usually /boot/grub/grub.conf) and reboot.
Note: if you install the above mentioned dkms-r8168 package and leave the dkms-autoinstaller service enabled, steps 3-7 will be performed automatically after you boot with a new kernel, provided you have updated the corresponding kernel-headers (kernel-devel/kernel-source) package. So basically all you would have to do is
1. install dkms-r8168
2. upgrade kernel (and the corrresponding source)
3. make sure the dkms-autoinstaller service is active
4. reboot

References:
http://forums.fedoraforum.org/archive/index.php/t-153049.html
http://wiki.centos.org/AdditionalResources/HardwareList#head-80d2...

--

BEng (HONS) Electronic Engineering
MBA, MSc in Mobile and Satellite Comms
Node Admin into Athens Wireless Metropolitan Network (www.awmn.net)



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.