PDA

View Full Version : Trouble with Realtek RTL8168/8111 network card and FC5


DigitalDingo
2006-07-17, 10:57 AM CDT
Warning: I'm a Linux-newbie so please be patient!

I have recently installed Fedora Core 5 along with my Windows XP on a dual boot. In Windows I can easily set up my network connection, but as Fedora doesn't know my network card I can set up a connection.

Network card: Realtek RTL8168/8111 PCI-E Gigabit Ethernet NIC

The card wasn't listed in Fedora so I downloaded a driver. The readme file says as follows:

<Quick install with proper kernel settings>

Unpack the tarball :
unzip r1000_linuxdrv_vxx.zip

Change to the directory:
cd r1000

If you are running the target kernel, then you should be
able to do :

make clean modules (as root or with sudo)
make install
depmod -aI open Terminal and type in: unzip r1000_linuxdrv_vxx.zip
The driver zip-file is named linux-r1000(103).zip so I obviously don't get anything:

[root@localhost drivers]# unzip r1000_linuxdrv_vxx.zip
unzip: cannot find or open r1000_linuxdrv_vxx.zip, r1000_linuxdrv_vxx.zip.zip or r1000_linuxdrv_vxx.zip.ZIP.I just double-clicked the right file and extracted it. Actually you will only get access to this readme file after you unzip the zip-file(!).
I continued as said in the readme file:

[root@localhost r1000]# make clean modules
make -C src/ clean
make[1]: Entering directory `/home/Kristoffer/drivers/r1000/src'
rm -f *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags
make[1]: Leaving directory `/home/Kristoffer/drivers/r1000/src'
make -C src/ modules
make[1]: Entering directory `/home/Kristoffer/drivers/r1000/src'
make -C /lib/modules/2.6.15-1.2054_FC5smp/build SUBDIRS=/home/Kristoffer/drivers/r1000/src modules
make: *** /lib/modules/2.6.15-1.2054_FC5smp/build: No such file or directory. Stop.
make: Entering an unknown directorymake: Leaving an unknown directorymake[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/Kristoffer/drivers/r1000/src'
make: *** [modules] Error 2
[root@localhost r1000]# make install
make -C src/ install
make[1]: Entering directory `/home/Kristoffer/drivers/r1000/src'
install -m 644 -c r1000.ko /lib/modules/2.6.15-1.2054_FC5smp/kernel/drivers/net/install: cannot stat `r1000.ko': No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/Kristoffer/drivers/r1000/src'
make: *** [install] Error 2
[root@localhost r1000]# depmod -a
[root@localhost r1000]#Obviously I get some errors, but I'm too new to this Linux. I'm completely stuck. Can anyone help me out here?
Thanks in advance.

DigitalDingo
2006-07-25, 05:56 AM CDT
Come on guys... Can't anybody help me here? I just need to get my internet connection working – I really don't care how. Please help me.

ggulik
2006-11-22, 02:22 PM CST
I just got a new motherboard which has the Realtek RTL8168/8111 and I couldn't get it to work with FC6. It would appear this interface is not on the list of supported Gigabit ethernet devices in the 2.6.18 kernel.

The only way I was able to get ethernet working was to install a cheap 3Com 10/100 ethernet card in one of the PCI slots. If I can't find a solution in a couple days I'm going to return this motherboard and buy something better.

ggulik
2006-11-22, 03:13 PM CST
Ok, making a little bit of progress. I called ASUS support and their response was did I install the drivers on the CD. I've never done it because there never are Linux drivers but on this particular CD there were LAN drivers for Linux?!?

Sure enough there was a driver on the CD in source format. It's a little older but doing a little bit of research I found the following guide for Gentoo:

http://gentoo-wiki.com/HARDWARE_RTL8168

I followed those instructions and I was able to build the module but for some reason I still can't modprobe it. I'm going to keep at it.

ggulik
2006-11-22, 03:33 PM CST
Doh, simple problem, forgot the "depmod -a" and once I did that the module loaded just fine. I just have to remember to rebuild the module every time the kernel gets updated.

Nekon
2006-11-23, 01:59 AM CST
Hi,
I have the same problem as DigitalDingo:
- The same ehernet card
- The same output.

I'm trying to find the answer on installing realtek drivers too. After start following the instrucctions, I obtain the same error:
...

make -C /lib/modules/2.6.15-1.2054_FC5smp/build SUBDIRS=/home/alexkapi/drivers/Realtekr1000/r1000_v1.04/src modules
make: *** /lib/modules/2.6.15-1.2054_FC5smp/build: No existe el fichero o el directorio. Alto.


ggulik, I've taken a look the link of gentoo and it's told to do the same: make clean modules, make install

Any idea?

giulix
2006-11-23, 03:27 AM CST
yum install kernel-devel kernel-headers

Nekon
2006-11-23, 04:06 AM CST
I had to download both packages: kernel source and kernel devel (because I still hadn't internet on Fedora) and I typed this to install them:

- Kernel-devel:
rpm -ivh kernel-devel-2.6.15-1.2054_FC5.i686.rpm

- Kernel source:
rpm -ivh kernel-2.6.15-1.2054_FC5.src.rpm

rmpbuild -bp --target=$(uname -m) /usr/src/redhat/SPECS/kernel-2.6.spec

I did both installations as root and without errors, but when installing the driver I always obtain the same error.

Thanks

ggulik
2006-11-23, 10:40 AM CST
You should need the kernel sources or hand recompile the kernel to compile the r1000 kernel module. It worked just fine for me but I did need to fix the compilation problem which is covered in the "MODULE_PARAM Error" section of the Wiki on this subject:

http://gentoo-wiki.com/HARDWARE_RTL8168

DigitalDingo
2006-11-23, 12:47 PM CST
I solved the problem in FC5 - and I think it also works for someone in FC6, but not for me... :rolleyes:

You can find my solution here: http://forums.fedoraforum.org/forum/showthread.php?t=108031

I hope it'll help.

Nekon
2006-11-26, 12:00 PM CST
Hi all,

I have been a little busy but I have followed your advices and I've done some progress.

ggulik I installed the kernel source as I writed above, I'm not sure If you are meaning that.

I realized that the link of 'build' was wrong because I had downloaded a different version of kernel-devel. Now I have installed the rigth one and I have inserted these comands to install the driver without errors:

#make clean modules

#make install

#depmod -a

Now, according to the solution of DigitalDingo I typed the next with these results:

#modprobe r1000
FATAL: Error inserting r1000 (/lib/modules/2.6.15-1.2054_FC5smp/kernel/drivers/net/r1000.ko): Invalid module format

With dmseg I found two entries with the same:

#dmseg
r1000: disagrees about version of symbol struct_module


As it is said on the link, I tried a wrong card and repeated it but nothing changed. Also, I modified the file 'r1000_n.c' of the problem covered in: "MODULE_PARAM Error" section of the wiki.

In all cases, modprobe and dmseg reported the same.

What is going wrong?

Thanks for your help.

ggulik
2006-11-27, 09:19 AM CST
First of all, you shouldn't need to install the full kernel sources, the kernel-headers and kernel-devel packages should be sufficient. I didn't download the full sources and got the r1000 driver installed just fine. I'm using it right now.

As far as why it doesn't load, I'm guess it's because you compiled the driver against the kernel sources instead of the includes and modules of the currently running kernel. First of all, get rid of the full kernel sources directory. Then get rid of the kernel module in /lib/modules/2.6.18-1.2849.fc6/kernel/drivers/net/r1000.ko I believe you're running FC5 so adjust the path according to the output of "uname -r". The differences in the FC5 and FC6 kernels are very minor so the instructions should be the same.

Then run "uname -r" to see what version of the kernel you're running and go to your r1000_v1.04 directory (assuming that's the version you're building) and do a "make clean install". Be sure the module build is pulling in the correct version of the objects.

Nekon
2006-11-27, 01:50 PM CST
Hey, everything is ok!, Now I am connected from fedora :)
You were right. I had a wrong kernel-devel installed. I had to download the version 'smp' and install the depencies with hardlink (<-Only _386, The others asked me for a lot of dependencies)

Thanks to all!!!!!