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

magner

  • Veteran
  • ***
  • Posts: 81
    • View Profile
Re: realtek 8168 driver issue
« Reply #30 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
« Last Edit: February 19, 2011, 12:49:56 am by magner »

phenigma

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1015
    • View Profile
Re: realtek 8168 driver issue
« Reply #31 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.

magner

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

phenigma

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1015
    • View Profile
Re: realtek 8168 driver issue
« Reply #33 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.

magner

  • Veteran
  • ***
  • Posts: 81
    • View Profile
Re: realtek 8168 driver issue
« Reply #34 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  
« Last Edit: February 20, 2011, 03:07:38 pm by magner »

phenigma

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1015
    • View Profile
Re: realtek 8168 driver issue
« Reply #35 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.

purps

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