# realtek 8139 driver issue after installation of gentoo

## pd_incubus

the drivers used by the live cd appear to work fine, and i can access the internet   :Smile: 

when i have installed and copied the os and rebooted, gentoo seems to be using a driver that doesnt work.

anyone know which driver it should be using because the 8139too driver doesnt seem to work either   :Crying or Very sad: 

any ideas ?

----------

## Private_X

Have a look what 

```
lspci
```

 says.

In this listing you can see what PCI cards you have and what kind of chips are on them. I my case 

```
02:07.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 0c)
```

 I can see that I need to compile my kernel with the support for an Intel Ethernet Pro 100. Hope this helps.

----------

## pd_incubus

thanks for the reply...  :Smile: 

i have tried that... the card is a realtek 8139, and the two choices of drivers i have are either 8139cp or 8139too, neither seem to work! 

 :Confused: 

----------

## Morgrog

I have the exact same problem and I would love to know how to fix it

It's really driving me nuts  :Crying or Very sad: 

my net conf was good and ifconfig too (route add too might I add)

I can ping my lo address and my network ip address, but I can't ping the router nor (of course) the outside web)

 :Crying or Very sad: 

*switches the auto notification on*

Oh great Gods, please hear my prayer  :Wink: 

----------

## pd_incubus

its not just a gentoo problem either!   :Evil or Very Mad: 

i've had the same problem on SuSE8.2

must be a crappy revision of the 8139 chipset we've got... i think th eone i have is 8139D revision...

anyone out there know how to fix this!?!   :Sad: 

----------

## barbar

I had a simliar problem and worked around with starting the kernel with pci=noapic.

Later I found out I misconfigured the kernel (SMP was enabled).

I would boot from the Live CD and check with lsmod if it is definitely a 8139too. (Did you compile it directly into the kernel, if not did you load the module -> check with modprobe). Then compile the kernel with the right module.

If the Live CD works you can also use the genkernel package to configure your kernel at boot time (although I have no experiences with this).

----------

## Morgrog

Bah, I'll do a lsmod then manually compile the kernel (using make menuconfig) and hopefully I won't get lost during the process...  :Smile: 

Maybe I'll try with a newer version of the 8139 driver

As to the noacpi thingy I'm not sure how this would impact my networking but shouldn't I just have to put a line pci=noacpi in my grub.conf?

I'm such a noob </3

----------

## barbar

If you want to boot the kernel with the noapic option you have to add 

```
kernel (hd0,0)/boot/bzImage root=/dev/hda3 pci=noapic
```

in your grub.conf. I am not sure what it exactly does (apic has something to do with irq and interrupt handling as far as I know).

As I mentioned it was a workaround for a bad configured kernel and I would go for a properly configured one.

I would also give the option to boot from cd and find out which module is used a try.

If this doesn´t work or it takes too long you can still opt for the genkernel.

----------

## Morgrog

tried genkernel and ended up with the problems mentionned above...

I'll manually configure it after writting down the working modules of the LiveCD (using `lsmod`)

And I'll start from there

One thing is for sure, I'm not giving up!  :Smile: 

----------

## barbar

Just a thought: Did you use dhcp with the Live CD and if so did you edit the /etc/conf.d/net correctly ?

http://www.gentoo.org/doc/en/gentoo-x86-install.xml

Post the output of lsmod.

----------

## Morgrog

I'm behind a router with dhcp disabled...

I ran net-config eth0 (or was it net-setup eth0 anyhoo) and configured my settings manually (static lan ip address, router address and dns address)

I'm gonna save the output of lsmod when I have the time (currently at work atm) and I'll probably build the kernel based on these modules

Are there any ways I can save my LiveCD network config and then overwrite the one with that backup?

----------

## barbar

Well you could write the output of lsmod in a file (lsmod > module). Make sure you chrooted first.

When you compile a new kernel do not forget to mount /boot before copying the kernel.

I found a topic which can be interesting for you:

https://forums.gentoo.org/viewtopic.php?t=80627

Your manual IP configurations worked with the Live CD?

----------

## Morgrog

yes it did (I did after all manage to download / install Gentoo)  :Wink: 

edit: fixed a typo (yes in one sentence, woe is me)

----------

## Morgrog

recompiled the kernel manually and now I can access the network!

it's time to download a WM now  :Smile: 

----------

## nadamsieee

Your problem probably has something to do with unwanted APIC and/or ACPI support.

Do a genkernel --config or a make menuconfig and unselect the following options

```
Processor Type and Features

  [ ] APIC support on uniprocessors

  [ ] IO-APIC support on uniprocessors

General Setup

  ACPI Support--->

    [ ](unselect everything)
```

If you are using genkernel, everything will compile and be copied into your /boot partition for you. Otherwise finish compiling and copy over your new kernel per the install instructions.

Now add some kernel boot parameters to make darn sure you've turned off APIC and ACPI support:

If you are booting with Grub add noapic acpi=off pci=noacpi to the kernel line in /boot/grub/grub.conf to look something like this:

```
title=My example Gentoo Linux (genkernel)

root (hd0,0)

kernel (hd0,0)/boot/kernel-KV root=/dev/hda3 acpi=off pci=noacpi

initrd (hd0,0)/boot/initrd-KV
```

If you are booting with LILO, do something similiar to /etc/lilo.conf:

```
image=/boot/kernel-KV

   label=gk_linux

   root=/dev/hda3

   initrd=/boot/initrd-KV

   append="acpi=off pci=noacpi"
```

I hope this helps   :Very Happy: 

References

ACPI-HOWTO

BootPrompt-HOWTO

Kernel-HOWTO

LILO mini-HOWTO

Edit: Correct the kernel parameters. 'noapic' is invalid by itself.

----------

## e2ka

I'm having similar problems with my setup.  I have a 3.06 HT processor so eventually I do want SMP enabled (and thus APIC must be enabled???), but for now I would be happy with a kernel that A) doesn't freeze, B) gives my network card the right IRQ so that I can use it.

I've tried so many things with compiling the kernel I've lost track.  All I know is that it is tricky to have the right settings so that you can even see the APIC choices.  If SMP is disabled, there is an "apic for uniprocessor" option that appears.  Otherwise it's not there.  I'm not sure where the IOAPIC option is, I can't find it anymore although I'm sure I had seen it in processor setup yesterday around my 253rd kernel compilation.  Finally, reading through .config I see there is a CONFIG_X86_GOOD_APIC option that I can't find ANYWHERE though I noticed that if I choose "386" as the processor family instead of "Pentium 4" that option turns off too.

So far I haven't gotten anything to work yet, so who cares.

Here's an experment I did with the livecd though:

Gentoo Live CD 1.4 boot options :  result

smp-acpi : see two processors, IRQs screwed

smp-acpi noapic : freeze at usb detection

smp : freeze immediately

smp noapic : 1 processor shown, good IRQ

no options : 1 processor, good IRQs (everything works)

SO if anyone has any clues on how to make a working setup, that'd be great.

----------

## e2ka

I'm having similar problems with my setup.  I have a 3.06 HT processor so eventually I do want SMP enabled (and thus APIC must be enabled???), but for now I would be happy with a kernel that A) doesn't freeze, B) gives my network card the right IRQ so that I can use it.

I've tried so many things with compiling the kernel I've lost track.  All I know is that it is tricky to have the right settings so that you can even see the APIC choices.  If SMP is disabled, there is an "apic for uniprocessor" option that appears.  Otherwise it's not there.  I'm not sure where the IOAPIC option is, I can't find it anymore although I'm sure I had seen it in processor setup yesterday around my 253rd kernel compilation.  Finally, reading through .config I see there is a CONFIG_X86_GOOD_APIC option that I can't find ANYWHERE though I noticed that if I choose "386" as the processor family instead of "Pentium 4" that option turns off too.

So far I haven't gotten anything to work yet, so who cares.

Here's an experment I did with the livecd though:

Gentoo Live CD 1.4 boot options :  result

smp-acpi : see two processors, IRQs screwed

smp-acpi noapic : freeze at usb detection

smp : freeze immediately

smp noapic : 1 processor shown, good IRQ

no options : 1 processor, good IRQs (everything works)

SO if anyone has any clues on how to make a working setup, that'd be great.

----------

