LinuxMCE Forums

General => Installation issues => Topic started by: magner on February 03, 2011, 09:04:28 am

Title: realtek 8168 driver issue
Post by: magner on February 03, 2011, 09:04:28 am
Hi,

I have followed the wiki...  http://wiki.linuxmce.org/index.php/Realtek_8168.

downloaded the r8168-8.021.00.tar.bz2 file from:

http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=5&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#RTL8111B/RTL8168B/RTL8111/RTL8168%3Cbr%3ERTL8111C/RTL8111CP/RTL8111D(L)%3Cbr%3ERTL8168C/RTL8111DP

I have checked and the file is stored in /lib/modules/2.6.27-7-generic/kernel/drivers/net/ and /lib/modules/2.6.27-17-generic/kernel/drivers/net/

also in these files are the 8169 driver and in 2.6.27.17 they are the only 2 files highlighted in bright yellow.

when I do a lshw -C Network i get:

configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full ip=192.168.80.1 latency=0 link=no module=r8169 multicast=yes port=fibre speed=1GB/s
  *-network DISABLED
       description: Ethernet interface
       physical id: 1
       logical name: pan0
       serial: b2:89:23:c3:e7:f9
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A link=yes multicast=yes

ifconfig:

          Link encap:Ethernet  HWaddr 00:30:bd:6d:61:68                      
eth 0   inet addr:192.168.0.4  Bcast:192.168.0.255  Mask:255.255.255.0    
          inet6 addr: fe80::230:bdff:fe6d:6168/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:35370 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24458 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:48079506 (48.0 MB)  TX bytes:2112488 (2.1 MB)
          Interrupt:22 Base address:0xd800

eth1      Link encap:Ethernet  HWaddr 48:5b:39:ee:ac:76
          inet addr:192.168.80.1  Bcast:192.168.80.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:33 errors:0 dropped:520232405 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9876 (9.8 KB)  TX bytes:0 (0.0 B)
          Interrupt:218 Base address:0x8000

lspci -nn:

2:07.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ [10ec:8139] (rev 10)

I have connected my webpad to the internal network and still cannot get onto the lmce-admin... webpage

Any help would be appreciated on this matter.

I am using a wired sitecom network switch for my internal network.

Thanks

Dan
Title: Re: realtek 8168 driver issue
Post by: purps on February 03, 2011, 12:44:31 pm
So is the r8169 a PCI card? What is your onboard NIC? Does that work?

Cheers,
Matt.
Title: Re: realtek 8168 driver issue
Post by: magner on February 03, 2011, 01:10:00 pm
Hi,

The 8169 is an onboard NIC. Motherboard ASUS M4A87TD EVO

 http://wiki.linuxmce.org/index.php/ASUS_M4A87TD_EVO

My 2nd card is PCI  and works fine as eth0 

cheers
Dan
Title: Re: realtek 8168 driver issue
Post by: purps on February 03, 2011, 02:03:06 pm
And what is the 2nd card?
Title: Re: realtek 8168 driver issue
Post by: magner on February 03, 2011, 02:21:06 pm
Hi,

A Belkin NIC, PCI Card 10/100Base.


 http://www.bargainstock.co.uk/Product.asp?pid=611


Cheers
Dan
Title: Re: realtek 8168 driver issue
Post by: purps on February 03, 2011, 02:52:39 pm
In that case, try blacklisting the r8169 first...
Code: [Select]
nano etc/modprobe.d/blacklist

Add "blacklist r8169". Then update the list with...
Code: [Select]
update-initramfs -k all -u
Remove the r8169 module with...
Code: [Select]
rmmod r8169
And then try installing the 8.021.00 version of the r8168 driver from the Realtek site. When I did it there was just a single command to run that did it all, no frigging about with makes and things http://218.210.127.131/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false

Hope it works.

Cheers,
Matt.



Title: Re: realtek 8168 driver issue
Post by: magner on February 04, 2011, 08:22:03 am
Thanks for the help matt.

I followed your method and still getting no connection for the internal network.

I have noticed when I rmmod r8169, the file still exists within the lib/modules/2.6.27-17-generic/kernel/drivers/net/ file. When I search for it through terminal, then "ls"(list) the net folder.

My 1st attempt at following the Wiki, I downloaded and installed the r8169 file. It was only when I read the Wiki a 2nd time I realized that I had downloaded the wrong file, so then proceeded to download the r8168 from the site you recommended and install. I then tried to delete the r8169 file. After deletion I noticed by using the ls method in terminal that the 2 files are the only 2 highlighted in bright yellow.(whatever that means)

Just wondering if I have maybe corrupted something by my mistake?

Also wondering if there is a brute force way in deleting the r8169 file before I go down the dreaded reformat route...

Thanks for your time mate.

Dan
Title: Re: realtek 8168 driver issue
Post by: purps on February 04, 2011, 11:23:43 am
Just to confirm, it is the r8168 you are downloading from Realtek and trying to use. We are trying to remove and blacklist the r8169, which is known to be problematic for newer motherboards.

Try removing it with "modprobe -r r8169" instead? No idea what the yellow means. You could also try adding "sudo blacklist r8169" to the blacklist file instead of "blacklist r8169", might make a difference. Remember to update list again.

Regarding the reformat; was it working before then? And it randomly stopped? If so, do a...
Code: [Select]
sudo ifconfig eth0 down && sudo ifconfig eth0 up...and post the result of...
Code: [Select]
sudo dhclient eth0(Also check to see if that fixes it!)

Cheers,
Matt.
Title: Re: realtek 8168 driver issue
Post by: magner on February 04, 2011, 09:03:26 pm
Hi,

I followed your advise, but still no luck.

So I mv the two 8168/8169 files into my documents folder. downloaded 8168 again which installed the 8168 back into my net folder.

Now when I do a lshw -C Network i get:

network UNCLAIMED
       description: Ethernet controller
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:01:00.0
       version: 06
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list
       configuration: latency=0
  *-network DISABLED
       description: Ethernet interface
       physical id: 1
       logical name: pan0
       serial: 66:4e:9a:f2:6f:a1
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A link=yes multicast=yes

says network disabled, any ideas how do I activate it?

now when I  ifconfig

it only shows information for eth 0, not to sure what lo info is representing?

th0      Link encap:Ethernet  HWaddr 00:30:bd:6d:61:68
          inet addr:192.168.0.4  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::230:bdff:fe6d:6168/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7243 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10781 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7656097 (7.6 MB)  TX bytes:997962 (997.9 KB)
          Interrupt:22 Base address:0xd800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:3147 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3147 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1395299 (1.3 MB)  TX bytes:1395299 (1.3 MB)

output to sudo dhclient eth0

Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:30:bd:6d:61:68
Sending on   LPF/eth0/00:30:bd:6d:61:68
Sending on   Socket/fallback
DHCPREQUEST of 192.168.0.4 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.0.4 from 192.168.0.1
bound to 192.168.0.4 -- renewal in 34768 seconds.

and

sudo dhclient eth1
There is already a pid file /var/run/dhclient.pid with pid 2211
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

SIOCSIFADDR: No such device
eth1: ERROR while getting interface flags: No such device
eth1: ERROR while getting interface flags: No such device
Bind socket to interface: No such device



The NIC has never worked. When all else fails I usually reformat. Only way I can be sure there is no corruption going on.

Dan
Title: Re: realtek 8168 driver issue
Post by: purps on February 04, 2011, 10:39:50 pm
Is it me, or does that all look OK?? Have you tried plugging a laptop or something directly into the Internet, just to check the connection is working?

Are you happy that the r8169 module is properly removed?

Sorry man, I am running out of ideas.
Title: Re: realtek 8168 driver issue
Post by: magner on February 05, 2011, 01:28:24 pm
Hi thanks ever so much for your help so far.

Had enough and reformatted the machine this morning. Hopefully bring me more luck...

Will it be possible to send me your results for any terminal commands you can think of in which I can use to compare. This will enable me to have a better idea of when I have the card working.

Thanks again for your help.

Cheers
DAniel
Title: Re: realtek 8168 driver issue
Post by: purps on February 06, 2011, 02:43:41 pm
http://pastebin.com/RE0qg2WJ

http://pastebin.com/QMQeLXGr

http://pastebin.com/zjupq1Cs

http://pastebin.com/sJZx9es6

Let me know if there's anything else that would be useful.

I'm sure you've worked this out, but referring to my first post about black listing, it should be...

Code: [Select]
nano /etc/modprobe.d/blacklist
...not...
Code: [Select]
nano etc/modprobe.d/blacklist
...sorry about that. The latter would just open up a new blank file.

Cheers,
Matt.
Title: Re: realtek 8168 driver issue
Post by: magner on February 12, 2011, 06:23:09 pm
How you doing again Mat.

Thanks for the last email. I needed time away from my PC. doing my head in.

Back now to try sort this card out.

When you say :
Remove the r8169 module with...
Code:

rmmod r8169

are you changing directory before entering the command or are you entering it from your home folder.

also is it possible to see your ls (list) for :

/lib/modules/2.6.27-7-generic/kernel/drivers/net
and
/lib/modules/2.6.27-17-generic/kernel/drivers/net

just want to see if r8169.ko is still present in your net file after rmmod r8169.

Thanks again

Dan 
Title: Re: realtek 8168 driver issue
Post by: phenigma on February 12, 2011, 07:52:13 pm
magner, I'll try to give you a hand here...

The onboard NIC is a Realtek 8111e.  Driver source is available for this card from Realtek: http://218.210.127.131/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#2

Because I was having trouble downloading the driver this morning I have attached the one I built for use with this motherboard.  This is the r8168.ko file built from the above mentioned sources on kernel 2.6.27-17-generic (the latest, and current, 0810 kernel).

Copy r8168.ko to /lib/modules/2.6.27-17-generic/kernel/drivers/net/ and replace the existing file of the same name.  You may need to blacklist the 8169 driver, to do this add a line 'blacklist r8169' to the file /etc/modprobe.d/blacklist (the r8169.ko file will still exist in the /lib/modules/2.6.27-17-generic/kernel/drivers/net/ directory) and reboot your system.

Try that out.  :)

J

PS, ah, after reading your posts again it seems you're having trouble blacklisting the r8169 driver.  I think I actually built a new r8169 driver from the sources at realtek and placed that in my .../drivers/net/ directory.  The problem is that the PCI device ID already exists in the old r8169 driver and the kernel picks it before the new r8168 driver.  Building a new r8169 driver from the realtek sources should fix this.
Title: Re: realtek 8168 driver issue
Post by: phenigma on February 12, 2011, 08:12:30 pm
Here's the r8169.ko I am using.  I had to compress it so 'tar xvf r8169.tar.bz2' to uncompress it and copy the file to the kernel drivers directory as states previously. 

If you use this file you shouldn't have to blacklist the r8169 driver, I don't.

J.
Title: Re: realtek 8168 driver issue
Post by: magner on February 16, 2011, 12:02:06 am
Hi phenigma,

Thank you very much for the information. Sorry I have taken so log to follow up your advise. I was having trouble getting onto web admin and after 3 different linuxmce mirrors have finally get my system up and running.

I followed your instructions, managed to download the file from the web site you suggested, tar, make, into net folder but still no connection.

I have also tried swapping eth 0 and eth1 in the web admin network settings. Now the onboard NIC is external eth1. I have plugged my internet cable into the onboard NIC and cannot connect to the net.

I have also tried disabling the firewall through web admin settings, still no connection...

Sorry I missed the 8169 file you uploaded. Will it be possible to make it available again.

Thanks for everything.

Dan
Title: Re: realtek 8168 driver issue
Post by: phenigma on February 16, 2011, 04:28:51 am
The files look like they're still attached to my posts.  You should be able to grab them.  You should make sure your 8139 card/driver are not interfering.

You should get the ethernet cards working in kubuntu before you attempt to install LMCE otherwise you may not get a connection through the cards.

J.

Title: Re: realtek 8168 driver issue
Post by: purps on February 16, 2011, 11:29:01 am
Sorry for my lack of replies, Dan. My core decided to destroy itself with no MDs or orbiters working, so I am having a week or so away from it for the sake of my mental health.

Cheers,
Matt.
Title: Re: realtek 8168 driver issue
Post by: phenigma on February 16, 2011, 06:58:24 pm
Sorry for my lack of replies, Dan. My core decided to destroy itself with no MDs or orbiters working, so I am having a week or so away from it for the sake of my mental health.

Ahh...  the ol' blew up the core mental health break...  I have taken a few.   ;-)

J.
Title: Re: realtek 8168 driver issue
Post by: purps on February 16, 2011, 07:00:40 pm
Ahh...  the ol' blew up the core mental health break...  I have taken a few.   ;-)

J.

Yeah I have just given up smoking as well, which made it so much more enjoyable.
Title: Re: realtek 8168 driver issue
Post by: phenigma on February 16, 2011, 07:12:18 pm
Hi phenigma,

Thank you very much for the information. Sorry I have taken so log to follow up your advise. I was having trouble getting onto web admin and after 3 different linuxmce mirrors have finally get my system up and running.

I followed your instructions, managed to download the file from the web site you suggested, tar, make, into net folder but still no connection.

Dan, good to see you're still puligging away at it.  To make things easier all around I recommend you start from scratch and use the drivers I provided for now.

To avoid any conflicts between cards I suggest that you proceed as follows:

Remove your 2nd NIC from the machine.
Do a fresh install of kubuntu from a snapshot dvd.
Put the 8168 AND the 8169 driver I provided in earlier posts in the drivers/net directory. 
You will have to use the 8169 driver I posted or blacklist the 8169 driver that kubuntu provides. (They will conflict).
Reboot your machine.
Your NIC should be detected by kubuntu and work in kubuntu at this point.
If it doesn't work then you should not proceed any further.  Stop here and get this NIC to work before proceeding.

Once the onboard NIC is working shut down the machine and install your 2nd NIC.
Boot the machine and, if the drivers are correct for the 8139, your 2nd NIC should also be active.
If your 8139 doesn't get detected properly you may need to DL & build newer drivers for it as well (I have no experience with the 8139).

Don't proceed with installing LMCE until both NICs are functioning and working in kubuntu.

Let us know how you make out.

J.
Title: Re: realtek 8168 driver issue
Post by: phenigma on February 16, 2011, 07:13:58 pm
Yeah I have just given up smoking as well, which made it so much more enjoyable.

I think I started smoking from my ears at that point.

J.
Title: Re: realtek 8168 driver issue
Post by: purps on February 16, 2011, 09:33:34 pm
Dan, good to see you're still puligging away at it.  To make things easier all around I recommend you start from scratch and use the drivers I provided for now.

To avoid any conflicts between cards I suggest that you proceed as follows:

Remove your 2nd NIC from the machine.
Do a fresh install of kubuntu from a snapshot dvd.
Put the 8168 AND the 8169 driver I provided in earlier posts in the drivers/net directory. 
You will have to use the 8169 driver I posted or blacklist the 8169 driver that kubuntu provides. (They will conflict).
Reboot your machine.
Your NIC should be detected by kubuntu and work in kubuntu at this point.
If it doesn't work then you should not proceed any further.  Stop here and get this NIC to work before proceeding.

Once the onboard NIC is working shut down the machine and install your 2nd NIC.
Boot the machine and, if the drivers are correct for the 8139, your 2nd NIC should also be active.
If your 8139 doesn't get detected properly you may need to DL & build newer drivers for it as well (I have no experience with the 8139).

Don't proceed with installing LMCE until both NICs are functioning and working in kubuntu.

Let us know how you make out.

J.

I have a Realtek RTL-8139/8139C/8139C+ and it worked out of the box for me.

Cheers,
Matt.
Title: Re: realtek 8168 driver issue
Post by: magner on February 17, 2011, 09:35:25 am
Hi folks,

I have just

Stripped the PCI NIC out of my core.
Reformatted PC.
Reinstalled Kubuntu
tested card by trying to connect to the internet . no joy...

Copied r8168 AND r1869 into the /lib/modules/2.6.27-17-generic/kernel/drivers/net folder

Just to confirm the method I used to copy r8168 and 9 was:

 "cp r8169.file.location  /lib/modules/2.6.27-17-generic/kernel/drivers/net"

I checked the r8169 file before and after with nano. the file you supplied J has a lot more lines. can confirm the r8169 file was succussfully copied.

Restarted PC tested internet connection. still no joy.

Followed method of blaclisting r8169 of :

added r8169 to blacklist
update-initramfs -k all -u
rmmod r8169

Restarted PC still no joy.

Recon I must have a dud onboard NIC.

Mat I feel your pain with having to go through the entire reformat route...
I am fresh as fresh can be with the process of reinstalling. if there are any tasks you might be rusty on let me know.

Cheers Lads
 
Dan

p.s just to confirm when I  ifconfig

it shows me an eth0 connection, so the pc is recognizing the card.



Title: Re: realtek 8168 driver issue
Post by: phenigma on February 18, 2011, 12:54:39 am
Just to confirm the method I used to copy r8168 and 9 was:

 "cp r8169.file.location  /lib/modules/2.6.27-17-generic/kernel/drivers/net"

Okay, the files should be 'r8169.ko' and 'r8168.ko' not 'r8169.file.location', can you confirm that?  And yes, the file would appear to have more 'lines' when viewed in nano.  Instead of using nano to compare file sizes you can use the 'ls' command.  Type 'ls -l' at a command prompt to get a listing of files in the current directory and it will show you exact file sizes counted in bytes, among other things.  Try 'ls --help' or 'man ls' for more information on using ls for file listings, it's very handy.

Back to the issue at hand:
When you plug the ethernet cable in to your on-board NIC do you see the LEDs light up next to the connector?

Have you tried a different Ethernet cable?
I have a cable that works with 100Mb cards but not 1000Mb cards (damaged pair in the cable).

J.
Title: Re: realtek 8168 driver issue
Post by: magner on February 18, 2011, 09:20:35 am
Hi J,

Thank you for the tip on ls, given me food for thought there. Next job on my list of many is to learn the power of the letters and signage after commands. The joys of being a newbie... ;D   

I can confirm r8168.ko and r8169.ko files.

Yes the LED lights up.

I have checked the ethernet switch by connecting switch to my wireless sky broadband router with an ethernet cable, then connecting my laptop to 1 of the 5 ports on the switch with a 2nd ethernet cable. I receive an internet connection.

The cable I use connects to my laptop which has gigbit ethernet and supplies internet connection no problem. Have tried a 2nd cable, all good.

Just want to make sure I have explored all options from command line with making sure everything is working ok.

Is there any other command results we can look at: 

lshw -C Network
ifconfig
lspci -nn
sudo dhclient eth0

Cheers
Dan

Title: Re: realtek 8168 driver issue
Post by: phenigma on February 18, 2011, 06:42:57 pm
Most commands followed by '--help' will show you all the usage methods.  man is your friend as well it will show you 'Manual' pages relating to the command/software you specify.

What is the result of the 'dhclient' command?

Do you have a dhcp server active on your router to provide an IP?  I assume you can connect other devices and they receive an IP address properly.

Have you tried setting a static IP (on your local subnet) through kubuntu?

J.
Title: Re: realtek 8168 driver issue
Post by: magner on February 18, 2011, 07:47:31 pm
Alright mate,

yea dhcp is active on my router.

lshw -C Network

*-network UNCLAIMED
       description: Ethernet controller
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:01:00.0
       version: 06
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list
       configuration: latency=0
  *-network DISABLED
       description: Ethernet interface
       physical id: 1
       logical name: pan0
       serial: 82:d0:a2:f0:85:3f
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A link=yes multicast=yes

 ifconfig

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:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1000 (1000.0 B)  TX bytes:1000 (1000.0 B)

 dhclient eth0

Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
eth0: ERROR while getting interface flags: No such device
Bind socket to interface: No such device

cheers
Dan
Title: Re: realtek 8168 driver issue
Post by: magner on February 18, 2011, 08:17:34 pm
I notice using lshw -C Network it states version 6. While Mat's lshw -C Network states version 3. I wonder if the difference in versions mean the need for different drivers?

Also the obvious of ifconfig not showing an interface connection for eth0.

Also these are the steps I took through terminal:
                              
                                          
   13  cd /home/daniel/Documents                                  
   14  ls                                                        
   15  tar xvf r8169.tar.bz2                                      
   16  ls                                                        
   17  nano r8169.ko                                                                  
   20  cp /home/daniel/Documents/r8169.ko /lib/modules/2.6.27-17-generic/kernel/drivers
   21  cd                                                                              
   22  cd /lib/modules/2.6.27-17-generic/kernel/drivers                                
   23  ls
   24  nano r8169.ko
   25  ifconfig
   26  cp /home/daniel/Documents/r8168.ko /lib/modules/2.6.27-17-generic/kernel/drivers
   27  cd /lib/modules/2.6.27-17-generic/kernel/drivers
   28  ls
   31  cd /etc
   33  cd modprobe.d
   34  ls
   35  nano blacklist
   36  update-initramfs -k all -u
   37  rmmod r8169

Just incase there is user error.

cheers

just noticed I copied file in drivers folder not net folder.

watch this space.....
Title: Re: realtek 8168 driver issue
Post by: phenigma on February 18, 2011, 09:57:40 pm
If you open the driver files with nano and save them when you exit you could alter the driver so it doesn't function.  Don't open the .ko files with nano.  nano is for editing text files only.

This is from mine:

lshw -C Network

Code: [Select]
*-network
       description: Ethernet interface
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: eth0
       version: 06
       serial: e0:cb:4e:ce:ce:28
       size: 1GB/s
       capacity: 1GB/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.019.00-NAPI duplex=full ip=10.10.42.101 latency=0 link=yes module=r8168 multicast=yes port=twisted pair speed=1GB/s

Hmm, it looks like it's not associating your card with the driver, notice the driver= and module= parameters in configuration on mine.   Notice my version is 06.  Can you post the output of 'lspci -nn' (two n's) and 'dmesg | grep -i eth'.

J.
Title: Re: realtek 8168 driver issue
Post by: magner on February 19, 2011, 12:15:35 am
hi,

just to confirm, I am putting 8168 & 8169 into net folder. I have not blacklisted 8169 nor have I rmmod 8169.
I see what you mean, your ishw Network -C  shows 8168. have you blacklisted or rmmod 8169?

using ls -l now instead to check file size. I do not open file with nano. Thanks for that tip.

before installing your 8169.ko

lshw -C Network
  *-network                            
       description: Ethernet interface
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.                      
       physical id: 0                                                
       bus info: pci@0000:01:00.0                                    
       logical name: eth0                                            
       version: 06                                                  
       serial: 48:5b:39:ee:ac:76                                    
       size: 1GB/s                                                  
       capacity: 1GB/s                                              
       width: 64 bits                                                
       clock: 33MHz                                                  
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical fibre 1000bt-fd autonegotiation                        
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full latency=0 link=no module=r8169 multicast=yes port=fibre speed=1GB/s                                        
  *-network DISABLED                                                  
       description: Ethernet interface                                
       physical id: 1                                                  
       logical name: pan0                                              
       serial: b2:3d:f6:6c:2c:22                                      
       capabilities: ethernet physical                                
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A link=yes multicast=yes

eth0      Link encap:Ethernet  HWaddr 48:5b:39:ee:ac:76
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:24 errors:0 dropped:67233711 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1440 (1.4 KB)  TX bytes:0 (0.0 B)
          Interrupt:218 Base address:0xa000

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:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1000 (1000.0 B)  TX bytes:1000 (1000.0 B)


client eth0
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/48:5b:39:ee:ac:76
Sending on   LPF/eth0/48:5b:39:ee:ac:76
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

AFTER INSTALLING YOUR 8169.ko

-C Network   *-network                            
       description: Ethernet interface
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller                                                            
       vendor: Realtek Semiconductor Co., Ltd.                  
       physical id: 0                                            
       bus info: pci@0000:01:00.0                                
       logical name: eth0                                        
       version: 06                                              
       serial: 48:5b:39:ee:ac:76                                
       size: 1GB/s
       capacity: 1GB/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical fibre 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full latency=0 link=no module=r8169 multicast=yes port=fibre speed=1GB/s
  *-network DISABLED
       description: Ethernet interface
       physical id: 1
       logical name: pan0
       serial: 5a:f5:2b:41:fc:d8
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A link=yes multicast=yes

ifconfigeth0      Link encap:Ethernet  HWaddr 48:5b:39:ee:ac:76
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:76806901 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:218 Base address:0xe000

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:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1000 (1000.0 B)  TX bytes:1000 (1000.0 B)

dhclient eth0Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/48:5b:39:ee:ac:76
Sending on   LPF/eth0/48:5b:39:ee:ac:76
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

dmesg | grep -i eth
[    5.751139] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    5.751405] eth0: RTL8169 at 0xf884e000, 48:5b:39:ee:ac:76, XID 2c100000 IRQ 218
[    6.585154] Driver 'sd' needs updating - please use bus_type methods
[    6.586990] Driver 'sr' needs updating - please use bus_type methods
[   18.516329] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   22.881197] r8169: eth0: link down
[   61.221492] hda-intel: Invalid position buffer, using LPIB read method instead.
[  378.861548] r8169: eth0: link down


root@DAn-PC:/home/dan# lspci -nn                                          
00:00.0 Host bridge [0600]: ATI Technologies Inc RX780/RX790 Chipset Host Bridge [1002:5957]                                                                
00:02.0 PCI bridge [0604]: ATI Technologies Inc RD790 PCI to PCI bridge (external gfx0 port A) [1002:5978]                                                  
00:09.0 PCI bridge [0604]: ATI Technologies Inc RD790 PCI to PCI bridge (PCI express gpp port E) [1002:597e]                                                
00:0a.0 PCI bridge [0604]: ATI Technologies Inc RD790 PCI to PCI bridge (PCI express gpp port F) [1002:597f]                                                
00:11.0 SATA controller [0106]: ATI Technologies Inc SB700/SB800 SATA Controller [IDE mode] [1002:4390] (rev 40)                                            
00:12.0 USB Controller [0c03]: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller [1002:4397]                                                            
00:12.2 USB Controller [0c03]: ATI Technologies Inc SB700/SB800 USB EHCI Controller [1002:4396]                                                            
00:13.0 USB Controller [0c03]: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller [1002:4397]                                                            
00:13.2 USB Controller [0c03]: ATI Technologies Inc SB700/SB800 USB EHCI Controller [1002:4396]                                                            
00:14.0 SMBus [0c05]: ATI Technologies Inc SBx00 SMBus Controller [1002:4385] (rev 41)                                                                      
00:14.1 IDE interface [0101]: ATI Technologies Inc SB700/SB800 IDE Controller [1002:439c] (rev 40)                                                          
00:14.2 Audio device [0403]: ATI Technologies Inc SBx00 Azalia (Intel HDA) [1002:4383] (rev 40)                                                            
00:14.3 ISA bridge [0601]: ATI Technologies Inc SB700/SB800 LPC host controller [1002:439d] (rev 40)                                                        
00:14.4 PCI bridge [0604]: ATI Technologies Inc SBx00 PCI to PCI Bridge [1002:4384] (rev 40)                                                                
00:14.5 USB Controller [0c03]: ATI Technologies Inc SB700/SB800 USB OHCI2 Controller [1002:4399]                                                            
00:15.0 PCI bridge [0604]: ATI Technologies Inc Device [1002:43a0]            
00:16.0 USB Controller [0c03]: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller [1002:4397]                                                            
00:16.2 USB Controller [0c03]: ATI Technologies Inc SB700/SB800 USB EHCI Controller [1002:4396]                                                            
00:18.0 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h [Opteron, Athlon64, Sempron] HyperTransport Configuration [1022:1200]                  
00:18.1 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h [Opteron, Athlon64, Sempron] Address Map [1022:1201]                                    
00:18.2 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h [Opteron, Athlon64, Sempron] DRAM Controller [1022:1202]                                
00:18.3 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h [Opteron, Athlon64, Sempron] Miscellaneous Control [1022:1203]                          
00:18.4 Host bridge [0600]: Advanced Micro Devices [AMD] Family 10h [Opteron, Athlon64, Sempron] Link Control [1022:1204]                                  
01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 06)              
02:08.0 FireWire (IEEE 1394) [0c00]: VIA Technologies, Inc. VT6306 Fire II IEEE 1394 OHCI Link Layer Controller [1106:3044] (rev c0)                        
03:00.0 USB Controller [0c03]: NEC Corporation Device [1033:0194] (rev 03)    
04:00.0 SATA controller [0106]: JMicron Technologies, Inc. JMB361 AHCI/IDE [197b:2361] (rev 02)
04:00.1 IDE interface [0101]: JMicron Technologies, Inc. JMB361 AHCI/IDE [197b:2361] (rev 02)
05:00.0 VGA compatible controller [0300]: nVidia Corporation NV44 [GeForce 6200 LE] [10de:0163] (rev a1)


Sorry dont know if you caught the end of my last post. reformatted sincce then and saved .ko into correct path location.



cheers dan
Title: Re: realtek 8168 driver issue
Post by: phenigma on February 19, 2011, 05:43:30 am
Well, your NIC is exactly the same pci id as mine if we properly install the net drivers this should all work.

Your output for 'lshw -C Network' is the same both times and shows the 8169 driver is being used.  Your dmesg output also shows the 8169 driver being loaded.  You system is still trying to use the 8169 driver, if my updated driver was in place it shouldn't do this.   I have not blacklisted the 8169 on my machine, I altered it and removed the 8111's pci id so it wouldn't match and therefor not load.  I could just as easily blacklist it though.

Lets specifically unload the 8169 driver and manually load the 8168 driver in it's place. 
Code: [Select]
rmmod r8169
modprobe r8168

Run 'lsmod' or 'lsmod | grep r816' to see if the 8168 or 8169 drivers are loaded.  If the 8168 is loaded then re-run all the previous commands to see if the 8168 driver is working.  If you don't have success then you can try rebuilding your initramfs and reboot your machine. 

You may want to try blacklisting the 8169 driver at this point. 
Code: [Select]
echo "blacklist 8169" >> /etc/modprobe.d/blacklist

Then, type 'cat /etc/modprobe.d/blacklist' to display the file on your text console and make sure the 'blacklist r8169' line shows at the end of the file.  Then rebuild your initramfs.
Code: [Select]
update-initramfs -u -k `uname -r`

These changes only occur on reboot so... Reboot and re-run the earlier tests.  If you're using the driver I provided then this should work.  Good luck and let me know how it goes!

J.
Title: Re: realtek 8168 driver issue
Post by: magner on February 19, 2011, 09:20:12 am
Hi J,

i do a rmmod r8169.

run

lshw -C Network                               
  *-network UNCLAIMED                                         
       description: Ethernet controller                       
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:01:00.0
       version: 06
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd cap_list
       configuration: latency=0
  *-network DISABLED
       description: Ethernet interface
       physical id: 1
       logical name: pan0
       serial: de:be:c7:b8:ac:fe
       capabilities: ethernet physical
       configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A link=yes multicast=yes

NO sign of r8169 under configuration...

run
dmesg | grep -i eth
[    6.596595] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    6.596871] eth0: RTL8169 at 0xf899c000, 48:5b:39:ee:ac:76, XID 2c100000 IRQ 218
[    7.420062] Driver 'sr' needs updating - please use bus_type methods
[    7.422768] Driver 'sd' needs updating - please use bus_type methods
[   19.442655] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   23.780659] r8169: eth0: link down
[   54.221757] hda-intel: Invalid position buffer, using LPIB read method instead.

Still shows r8169 is loaded ?

modprobe r8168
FATAL: Module r8168 not found.

thought this might be because i opened it in nano. Copied a fresh copy from this forum. copied into net folder. Still same result...


Thought id show this, privileges seem different for the 2 files?

/lib/modules/2.6.27-17-generic/kernel/drivers/net# ls -l       
-rwxr-xr-x  1 root root 156712 2011-02-18 23:38 r8168.ko         
-rw-r--r--  1 root root 317338 2011-02-18 22:50 r8169.ko         

I blacklisted  r8169 

then ran:

cat /etc/modprobe.d/blacklist                                     
blacklist 8169                       

update-initramfs -k all -u
update-initramfs: Generating /boot/initrd.img-2.6.27-17-generic
update-initramfs: Generating /boot/initrd.img-2.6.27-7-generic

ran Mats initramfs update, I could not get yours to run

update-initramfs -u -k `uname -r` is uname = my user name? or do I type in word for word?



even after blacklisting r8169, it still shows up here:

root@DAn-PC:~# dmesg | grep -i eth
[    6.596595] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    6.596871] eth0: RTL8169 at 0xf899c000, 48:5b:39:ee:ac:76, XID 2c100000 IRQ 218
[    7.420062] Driver 'sr' needs updating - please use bus_type methods
[    7.422768] Driver 'sd' needs updating - please use bus_type methods
[   19.442655] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   23.780659] r8169: eth0: link down
[   54.221757] hda-intel: Invalid position buffer, using LPIB read method instead.


Thanks again for all your help J.

Dan
Title: Re: realtek 8168 driver issue
Post by: phenigma on February 19, 2011, 04:25:44 pm
You need to blacklist 'r8169' not '8169'.  Once properly blacklisted you should not be see the r8169 driver loading at boot.  Blacklisting only prevents the driver from being loaded on boot, it doesn't remove it from the currently running kernel, rmmod does that.  If you blacklist the driver, build the new initramfs and reboot then then driver should not load.  If it does it is not blacklisted properly.

You may need to run the command 'depmod' after installing the new driver files, before modprobe.  If modprobe can't load the r8168 driver then nothing will, this is the place you should concentrate on getting to work.

dmesg shows all device and driver notifications since boot so the r8169 will show in dmesg if it loaded during boot.  rmmod will remove the driver from the kernel but dmesg still shows the messages from when it loaded on boot.

At this point it is not using new r8168 driver and the file size on the r8169 looks like the original file.  At any time you should be able to 'rmmod r8169' and then 'modprobe r8168', until this works the kernel is unable to find your driver.

Change the blacklist entry and could you run 'uname -r' by itself at the command line.  This will tell us which kernel you are running.  The update-initramfs -u -k `uname -r` would update the initramfs for the currently running kernel only, rather than all kernels on your system, I'm concerned that this didn't work.

J.
Title: Re: realtek 8168 driver issue
Post by: magner on February 20, 2011, 03:00:11 pm
Hi J.

That worked a treat. Now have connection with that NIC. Thanks ever so much for all your help and guidance over the last week, you to Mat, good luck with getting that core up and running again. Much appreciated for all your efforts.

With all the headaches I have learn quite a lot on commands through terminal.

Nice one

Dan  
Title: Re: realtek 8168 driver issue
Post by: phenigma on February 20, 2011, 07:40:38 pm
Dan, great to hear it's working!!  Congratulations!

The best piece of advice I can give you now is to put the .ko file(s) aside in case you ever need to do a re-install, I keep them on a usb stick so they're easy to copy over without networking.

You can put your 2nd NIC in, verify it's working, and continue on with the LMCE install now!

Have fun!!

J.
Title: Re: realtek 8168 driver issue
Post by: purps on February 20, 2011, 08:24:42 pm
Hi J.

That worked a treat. Now have connection with that NIC. Thanks ever so much for all your help and guidance over the last week, you to Mat, good luck with getting that core up and running again. Much appreciated for all your efforts.

With all the headaches I have learn quite a lot on commands through terminal.

Nice one

Dan  

Fantastic news, glad it is finally working.

My core is up and running again *dances* - I had set up my Netgear router (being used as a WAP) in a stupid way and it was bollocksing everything up.

Cheers,
Matt.