Author Topic: realtek 8168 driver issue  (Read 19373 times)

magner

  • Veteran
  • ***
  • Posts: 81
    • View Profile
realtek 8168 driver issue
« 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
« Last Edit: February 03, 2011, 09:08:45 am by magner »

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: realtek 8168 driver issue
« Reply #1 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.
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

magner

  • Veteran
  • ***
  • Posts: 81
    • View Profile
Re: realtek 8168 driver issue
« Reply #2 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

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: realtek 8168 driver issue
« Reply #3 on: February 03, 2011, 02:03:06 pm »
And what is the 2nd card?
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

magner

  • Veteran
  • ***
  • Posts: 81
    • View Profile
Re: realtek 8168 driver issue
« Reply #4 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

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: realtek 8168 driver issue
« Reply #5 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.



1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

magner

  • Veteran
  • ***
  • Posts: 81
    • View Profile
Re: realtek 8168 driver issue
« Reply #6 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

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: realtek 8168 driver issue
« Reply #7 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.
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

magner

  • Veteran
  • ***
  • Posts: 81
    • View Profile
Re: realtek 8168 driver issue
« Reply #8 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

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: realtek 8168 driver issue
« Reply #9 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.
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

magner

  • Veteran
  • ***
  • Posts: 81
    • View Profile
Re: realtek 8168 driver issue
« Reply #10 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

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: realtek 8168 driver issue
« Reply #11 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.
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

magner

  • Veteran
  • ***
  • Posts: 81
    • View Profile
Re: realtek 8168 driver issue
« Reply #12 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 

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: realtek 8168 driver issue
« Reply #13 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.
« Last Edit: February 12, 2011, 07:58:59 pm by phenigma »

phenigma

  • LinuxMCE God
  • ****
  • Posts: 1758
    • View Profile
Re: realtek 8168 driver issue
« Reply #14 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.