# [PARTIALLY SOLVED]NIC at work not recognized by gentoo...

## olger901

Hello all,

At our work we've got a server which has a Asus P5B motherboard using a Realtek RTL 8111/8168B PCI-E Network Controller. The problem is that this network controller does not get detected properly. I do have an eth0, but it seems to be some sort of Firewire Controller. 

Things I've tried:

I tried running modprobe r8169, but this had no effect (no eth1 or eth2 device got detected)

I tried using other LiveCDs (System Rescue CD 0.3.5 and Knoppix 5.1.1)  but neither of them was able recognize the NIC either.

That while I tought Gentoo supported the RTL8168B controller since kernel 2.6.18-rx

Note: I did run a lspci and it definitely showed the controller was there.Last edited by olger901 on Sat May 26, 2007 10:16 am; edited 1 time in total

----------

## drescherjm

Have you looked here:

http://gentoo-wiki.com/HARDWARE_RTL8168

----------

## olger901

 *drescherjm wrote:*   

> Have you looked here:
> 
> http://gentoo-wiki.com/HARDWARE_RTL8168

 

No, I did not have a look there. I just visited the site and it states that the 8168B is not supported by the kernel driver, which seems odd to me because the portage log says: 

15 Oct 2006; Daniel Drake <dsd@gentoo.org>

+gentoo-sources-2.6.18-r1.ebuild:

Update to Linux 2.6.18.1. Add support for RTL8168 ethernet. Update sky2 to

version 1.9

Source: http://www.gentoo-portage.com/sys-kernel/gentoo-sources/ChangeLog#ptabs

----------

## drescherjm

Ahh. Sorry. It looks like this was added before the official gentoo kernel support. Have you tried a gentoo 2007.0 disk (even minimal cd)?

----------

## dsd

please post "lspci -n" output

----------

## olger901

 *drescherjm wrote:*   

> Ahh. Sorry. It looks like this was added before the official gentoo kernel support. Have you tried a gentoo 2007.0 disk (even minimal cd)?

 

Yes I actually used the Gentoo 2007.0 mini LiveCD

 *dsd wrote:*   

> please post "lspci -n" output

 

I am afraid I can't do so now right now, because I am not at work, and there is no network connection as soon as I am at work again I'll put the output here.

----------

## neocui

I have an ASUS P5B as well. Here are some tips:

1. The 2007.0 livecd should work. The driver is r8169.

2. Check the ethernet plug on the back of your computer, does it lit up?

3. If it doesn't light up, you are probably dual booting Windows* (am I correct?), and the ethernet card lights up only when you boot into windows.

4. In windows, go to control panel -> system -> hardware -> double click on the r8111b NIC, there are some advance options you can set. Find the one called Wake On Lan, and ENABLE it.

5. Now boot into linux, and it should work automatically!

So my theory is, if you disable Wake On Lan, windows shuts off the NIC when it shuts down. And the NIC has a memory of its own, and doesn't turn back up again until Windows turns it on, even across reboots (ironically if you do turn on wake on lan, the ethernet is on even when your computer is off). So make sure windows doesn't turn the NIC off when it shuts down.

Somehow, the r8169 driver in Linux doesn't know how to turn the NIC back up... Does anyone know another solution?

* If you don't have windows, try clearing the bios.

----------

## olger901

 *neocui wrote:*   

> I have an ASUS P5B as well. Here are some tips:
> 
> 1. The 2007.0 livecd should work. The driver is r8169.
> 
> 2. Check the ethernet plug on the back of your computer, does it lit up?
> ...

 

Okay, thanks for the tip, I will definitely try this!

----------

## drescherjm

Good advice about the NIC lights. I have seen that before with some computers at work and usually booting them to windows activates the card then it works even after a reboot as long as the power does not go out.

Hmm, we seem to be having a little conflicting advice about rebooting. Sorry.

----------

## vyperin

After a few flick-flacks through the forum, I have found this useful post.

The theory behind Windows turning off the network chipset is correct.

My method is somehow easier (and not so elegant) than modifying something in Windows and works just the same.

Let Windows load then hard-reset or hard-shutdown it by any means. So, it will not disable the card.

This can be very useful if you just want to run your live cd with your network card being detected.

Thank you for helping me in this matter, too.   :Laughing: 

----------

## neocui

I'm glad I could help!

Still, it seems like a bug to me that the kernel driver is able to detect the NIC and the interface but doesn't turn it on if Windows had it turned off.  The code to actually turn on the NIC driver is missing, or it doesn't work.

If this is not already a bug filed against Linux it should be.

And this tip should go into a FAQ somewhere, or we can make it a sticky.

----------

## olger901

 *vyperin wrote:*   

> After a few flick-flacks through the forum, I have found this useful post.
> 
> The theory behind Windows turning off the network chipset is correct.
> 
> My method is somehow easier (and not so elegant) than modifying something in Windows and works just the same.
> ...

 

Hmm, this makes me wonder if the following would work as well (and which would be nicer then just pulling the plug in windows  :Razz: ): 

1. Shutting down the entire pc.

2. Remove the power cable from the pc for approx 30 seconds and pressing the power button to make sure all electricity is gone.

3. Cold boot the computer and boot Linux

Note: I will make a bug report of this.

----------

## makenoob

the onboard realtk-chipsets suck... the drivers (*bsd, linux) don't detect it right (oh yeah, there's a card, it starts and i can configure something, but the nic doesn't do anything) and even the driver from realtek itself is very buggy... after many packages (emerge --sync) the card gets stuck and has to be restarted. i have bought an intel card, which works much better and is detected by any os without any problems and doesn't has this problems with many packages or high loads...

----------

## drescherjm

 *makenoob wrote:*   

> the onboard realtk-chipsets suck...

 

I found that realtek nics suck in general so I when I buy a nic I make sure the chip does not have the realtek logo...

----------

## vyperin

 *Quote:*   

> 
> 
> 1. Shutting down the entire pc.
> 
> 2. Remove the power cable from the pc for approx 30 seconds and pressing the power button to make sure all electricity is gone.
> ...

 

I will run your test as soon as I finish compiling Gentoo on my new laptop. I will remove the power cord and the battery. Should do just fine.

Also I will try to compile the network driver into the kernel, not as a module, to see if Gentoo manages to turn on the card after booting in Windows.

Regards.

----------

## olger901

OK, I've got another request of one you guys. I submitted the bug to the kernel developers and they might have a patch that could fix the issue. The problem is that I do not have much time at work, which means I simply do not have the time (at work) to install the kernel, patch it and test it. So I hope one of you guys is willing to test it. You can find the patch here: http://bugzilla.kernel.org/show_bug.cgi?id=8525

----------

## olger901

OK, I tested it at work this morning and I would like to tell you guys that shutting down the server, removing electricity for approx 20 seconds, turning the PC back on and starting Linux right after the cold boot has done the trick...I am still looking for someone that could test the patch though...

----------

## Cor3y

neocui, your solution works perfectly for my RTL8168 NIC on my laptop. Thx and I owe you a beer  :Smile: 

----------

