Problems with Realtek RTL-8168 ethernet card

I have a DELL Vostro 410 desktop with a Realtek RTL-8168 ethernet card integrated in the motherboard and it works flawlessly with Ubuntu Hardy, but when I installed openSUSE 11 my NIC didn’t work. It seems to be installed but it won’t work either using DHCP nor with static IP. I can ping myself but no other devices in my wired network.

I decided to download the drivers from Realtek website, but I can’t compile them. I followed the readme instructions, but I keep getting this results:

make -C src/ clean
make[1]: Entering directory /home/artago/driver/src' rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions Module.symvers Modules.symvers *.order make[1]: Leaving directory /home/artago/driver/src’
make -C src/ modules
make[1]: Entering directory /home/artago/driver/src' make -C /lib/modules/2.6.25.5-1.1-default/build SUBDIRS=/home/artago/driver/src modules make[2]: Entering directory /usr/src/linux-2.6.25.5-1.1-obj/x86_64/default’
make[2]: *** No rule to make target modules'. Stop. make[2]: Leaving directory /usr/src/linux-2.6.25.5-1.1-obj/x86_64/default’
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/artago/driver/src’
make: *** [modules] Error 2

I don’t know what I’m doing wrong. Could anyone help me or at least refer me to a link where they explain how to compile that driver?

Please Help.

Hi
Do you have the kernel-source, linux-kernel-headers, kernel-syms and
module-init-tools installed?


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 x86 Kernel 2.6.27.7-9-default
up 12:31, 1 user, load average: 0.19, 0.12, 0.09
GPU GeForce 6600 TE/6200 TE - Driver Version: 180.27

Can I install them from the installation DVD? because I won’t be able to download them from the internet since my NIC isn’t working.

Hi
Yes, they are all on the dvd. Not just remember if the kernel updates,
you need to perform the same routine.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 x86 Kernel 2.6.27.7-9-default
up 13:27, 1 user, load average: 0.06, 0.03, 0.06
GPU GeForce 6600 TE/6200 TE - Driver Version: 180.27

Hi, I installed the files you told me from the Installation DVD plus gcc which is also necessary. It seemed to work ok, but there’s no eth0 after the installation and the network doesn’t work of course.

This is what I got during the installation:

artago-suse:/home/artago/driver # make clean modules
make -C src/ clean
make[1]: Entering directory /home/artago/driver/src' rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions Module.symvers Modules.symvers *.order make[1]: Leaving directory /home/artago/driver/src’
make -C src/ modules
make[1]: Entering directory /home/artago/driver/src' make -C /lib/modules/2.6.25.5-1.1-default/build SUBDIRS=/home/artago/driver/src modules make[2]: Entering directory /usr/src/linux-2.6.25.5-1.1-obj/x86_64/default’
make -C /usr/src/linux-2.6.25.5-1.1 O=/usr/src/linux-2.6.25.5-1.1-obj/x86_64/default/. modules
CC [M] /home/artago/driver/src/r8168_n.o
/home/artago/driver/src/r8168_n.c: In function ‘rtl8168_hw_phy_config’:
/home/artago/driver/src/r8168_n.c:1398: warning: unused variable ‘data’
/home/artago/driver/src/r8168_n.c: In function ‘rtl8168_down’:
/home/artago/driver/src/r8168_n.c:4838: warning: unused variable ‘poll_locked’
/home/artago/driver/src/r8168_n.c: At top level:
/home/artago/driver/src/r8168_n.c:2675: warning: ‘rtl8168_phy_power_down’ defined but not used
/home/artago/driver/src/r8168_n.c:4183: warning: ‘rtl8168_reinit_task’ defined but not used
LD [M] /home/artago/driver/src/r8168.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/artago/driver/src/r8168.mod.o
LD [M] /home/artago/driver/src/r8168.ko
make[2]: Leaving directory /usr/src/linux-2.6.25.5-1.1-obj/x86_64/default' strip --strip-debug r8168.ko make[1]: Leaving directory /home/artago/driver/src’

artago-suse:/home/artago/driver # make install
make -C src/ install
make[1]: Entering directory /home/artago/driver/src' install -m 744 -c r8168.ko /lib/modules/2.6.25.5-1.1-default/kernel/drivers/net/ make[1]: Leaving directory /home/artago/driver/src’

artago-suse:/home/artago/driver # depmod -a
artago-suse:/home/artago/driver # insmod ./src/r8168.ko

artago-suse:/home/artago/driver # lsmod | grep r8168
r8168 60688 0

artago-suse:/home/artago/driver # ifconfig -a
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:126 errors:0 dropped:0 overruns:0 frame:0
TX packets:126 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8372 (8.1 Kb) TX bytes:8372 (8.1 Kb)

What am I doing wrong?

Hi
You need to go into YaST and see if the device is now discovered and
configure that way.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 x86 Kernel 2.6.27.7-9-default
up 14:00, 1 user, load average: 0.12, 0.07, 0.10
GPU GeForce 6600 TE/6200 TE - Driver Version: 180.27

By the way, when I reboot the computer and execute lsmod | grep r8169 it’s on again and r8168 too. How can I get rid of the r8169? I used the command rmmod r8169, but when I restart it’s still there :frowning:

At last!!!

I put the r8169 in the /etc/modprobe.d/blacklist and deleted the device from YaST because I had two after installing r8168 and VOILA!!!

Thanks a lot guys.

Hi
You need to blacklist it, edit the file /etc/modeprobe.d/blacklist and
add;


blacklist r8169


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 x86 Kernel 2.6.27.7-9-default
up 14:23, 1 user, load average: 0.15, 0.08, 0.03
GPU GeForce 6600 TE/6200 TE - Driver Version: 180.27

Hi
Your welcome :slight_smile: Now, just remember you need to do it again after the
kernel update… :frowning:


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 x86 Kernel 2.6.27.7-9-default
up 14:32, 1 user, load average: 0.10, 0.19, 0.12
GPU GeForce 6600 TE/6200 TE - Driver Version: 180.27