Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Realtek 8168 NIC problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
SYNeR
n00b
n00b


Joined: 10 Jul 2004
Posts: 11
Location: Australia

PostPosted: Thu Oct 05, 2006 9:37 am    Post subject: [SOLVED] Realtek 8168 NIC problem Reply with quote

Hi all,

I finally got a new laptop and decided to install Gentoo on it. Well, I've done a basic networkless install using the 2006.1 Live CD. Now I'm trying to get the RTL8168 NIC in my laptop (Asus W3J) working, but with no luck thus far :(
I've downloaded the driver from the Realtek site, and have got it to compile and run - lsmod shows the module is running (r1000). This is all after downloading the vanilla 2.6.18 kernel, doing a kernel build, booting new kernel, compiling driver and running 'modprobe r1000'.

Now, the following are the only things I've tried to get networking going, I haven't used gentoo (or linux at all for that matter) for a few years, and I am quite rusty. So please excuse me if this is a stupid question and I've missed out on something obvious ;) . I have however searched around but only found references to the r1000 driver not compiling (which I was able to sort out).

I'm running an ADSL Router (192.168.0.1) with DHCP enabled. At first, I tried just doing /etc/init.d/net.eth0 start, but got an error saying "No DHCP Client installed".
So, I tried tried adding into /etc/init.d/net.eth0:

config_eth0=( "192.168.0.7 netmask 255.255.255.0" )
routes_eth0=( "default gw 192.168.0.1" )

to give it a static IP, using 'route add default gw 192.168.0.1', then running /etc/init.d/net.eth0 start.
ifconfig shows eth0 is up with the static IP of 192.168.0.7, but I can't access anything - Destination Unreachable errors.

Ideally, I would like to at least get a static IP working, so I can at least get online and install dhcpcd and then change over to dhcp after having installed dhcpcd.

So basically ifconfig shows eth0 with the static IP, but I can't access anything. Do I need to bind the r1000 driver to eth0 or something else obvious, or this some other weird problem?

Thankyou

Edit: lspci output may be useful:

Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

(I build PCI Express support into the 2.6.18 kernel)


Last edited by SYNeR on Sun Oct 08, 2006 4:44 am; edited 1 time in total
Back to top
View user's profile Send private message
curian
n00b
n00b


Joined: 03 Jun 2004
Posts: 21
Location: The depths of Hungary

PostPosted: Thu Oct 05, 2006 2:38 pm    Post subject: Reply with quote

same problem with a 8111B card.
dmesg says after loading the r1000 module that everything's fine, link up, etc, only problem is that practically it's dead.
it really drives me nuts.
Back to top
View user's profile Send private message
ericcartman
n00b
n00b


Joined: 26 May 2004
Posts: 33
Location: Salzburg

PostPosted: Thu Oct 05, 2006 2:49 pm    Post subject: Reply with quote

Hi Syner,

I have the same problem as you.
I found out that the NIC doesn't recognize the link (doesn't see a cable attached) and thus doesn't negotiate speed/duplex mode :( You can look at the output of dmesg after inserting the module. My dmesg says something like "No Link" (don't have the ouput here to copy/paste). According to the readme it should be possible to set speed/duplex manually but somehow I can't get this functioning either (unkown param error). : (
The frustrating thing is, that the NIC was functioning a few days ago and I surely didn't change anything since that.

So maybe someone can help us both :)

greetz ericcartman
_________________
Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin, Historical Review of Pennsylvania 1759
Back to top
View user's profile Send private message
SYNeR
n00b
n00b


Joined: 10 Jul 2004
Posts: 11
Location: Australia

PostPosted: Fri Oct 06, 2006 1:07 am    Post subject: Reply with quote

Hi,
My dmesg output is the same as yours:

Realtek RTL8168/8111 Family PCI-E Gigabit Ethernet Network Adapter
Driver version: 1.04
Released Date: 2006/07/07
Link Status: Not Linked

I think I remember reading somewhere someone patching the r8169 driver to include 8168 support?
Is this part of the vanilla kernel, or some other branch? I might have to give it a go either way if I run out of ideas
and fail to get this NIC working.

Edit: tried r8169 driver in vanilla kernel - didn't work 'No device found' when ifconfig eth0. (it's only part of -mm?)

I also got a copy of dhcpcd, put into my /usr/portage/distfiles and emerge net-misc/dhcpcd. But when running /etc/init.d/net.eth0 start , it sees the newly installed dhcpcd, but I get the error:
"Error, timed out waiting for a valid DHCP server response"
Back to top
View user's profile Send private message
SYNeR
n00b
n00b


Joined: 10 Jul 2004
Posts: 11
Location: Australia

PostPosted: Fri Oct 06, 2006 7:30 am    Post subject: Reply with quote

The only idea I can think of, which I'm going to try (as soon as the download finishes) is to try booting an Ubuntu live cd, and see
what kernel version, NIC driver, etc.. it uses, because apparently it supports the RTL8168 out of the box. And maybe, if it's possible to get
the networking going, I'll try a gentoo install from Ubuntu.

Beyond that, unless anyone else has any other ideas, I can't see what else to try beyond trashing my root partition and re-installing, except for
maybe trying the -mm branch.
Back to top
View user's profile Send private message
wynn
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2421
Location: UK

PostPosted: Fri Oct 06, 2006 10:45 am    Post subject: Reply with quote

Here is a post https://forums.gentoo.org/viewtopic-p-3616274.html#3616274 in which the poster says "The RTL8168 works just fine with Realtek's driver (r1000)"
_________________
The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details.
Back to top
View user's profile Send private message
par4noia
n00b
n00b


Joined: 18 Sep 2006
Posts: 26
Location: Coimbra, Portugal

PostPosted: Fri Oct 06, 2006 11:02 am    Post subject: Reply with quote

That r1000_v1.04 works just great with Realtek 8168, in fact, I'm using it right now!

THe thing is that it in order to work, you can only install it after finishing the installation...

What I did was install Gentoo from an Ubuntu Live CD...then after finishing the install I booted up Gentoo and installed the driver...

You have to notice though, that with kernels 2.6.17+ I think, you have to change one of the files from the driver...

Go to THIS wiki entry for a complete guide on how to get this card to work.
Back to top
View user's profile Send private message
ericcartman
n00b
n00b


Joined: 26 May 2004
Posts: 33
Location: Salzburg

PostPosted: Fri Oct 06, 2006 11:47 am    Post subject: Reply with quote

Thanx for replying, but the problem is not to get a driver for the card but to get the card recognize the attached patch cable :(

In fact I already tried Realteks r1000 1.03 AND 1.04 as well as only today I patched my 2.6.17-suspend2 kernel with the r8169 driver patches for the r8168. But as you can imagine: no luck, no link...

Have you (the ones that got the card running) done anyting special that you can remember to let the chip see the link? Or could you possibly post the output of
Code:
ethtool eth0
(a tool that can be emerged and displays/sets driver/card properties), so that I and Syner can compare it with ours? Maybe there is something I am missing.

greetz ericcartman
_________________
Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin, Historical Review of Pennsylvania 1759
Back to top
View user's profile Send private message
par4noia
n00b
n00b


Joined: 18 Sep 2006
Posts: 26
Location: Coimbra, Portugal

PostPosted: Fri Oct 06, 2006 12:58 pm    Post subject: Reply with quote

ericcartman wrote:
Thanx for replying, but the problem is not to get a driver for the card but to get the card recognize the attached patch cable :(

In fact I already tried Realteks r1000 1.03 AND 1.04 as well as only today I patched my 2.6.17-suspend2 kernel with the r8169 driver patches for the r8168. But as you can imagine: no luck, no link...

Have you (the ones that got the card running) done anyting special that you can remember to let the chip see the link? Or could you possibly post the output of
Code:
ethtool eth0
(a tool that can be emerged and displays/sets driver/card properties), so that I and Syner can compare it with ours? Maybe there is something I am missing.

greetz ericcartman


Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on


Maybe try ifplugd?
Back to top
View user's profile Send private message
SYNeR
n00b
n00b


Joined: 10 Jul 2004
Posts: 11
Location: Australia

PostPosted: Sat Oct 07, 2006 1:47 pm    Post subject: Reply with quote

par4noia wrote:
That r1000_v1.04 works just great with Realtek 8168, in fact, I'm using it right now!

THe thing is that it in order to work, you can only install it after finishing the installation...

What I did was install Gentoo from an Ubuntu Live CD...then after finishing the install I booted up Gentoo and installed the driver...

You have to notice though, that with kernels 2.6.17+ I think, you have to change one of the files from the driver...

Go to THIS wiki entry for a complete guide on how to get this card to work.


I'm going to try installing Gentoo from an Ubuntu Live CD to see if it makes a difference (I can't see how it would though)... Which install guide did you follow, if any?
Also, you said you got version 1.04 of the driver working, is this with vanilla kernel sources, or gentoo kernel sources, and which kernel version?

Did you do a kernel rebuild and add anything special in? From what I can see, the only thing really needed is PCI-Express support.

Thanks ;)
Back to top
View user's profile Send private message
SYNeR
n00b
n00b


Joined: 10 Jul 2004
Posts: 11
Location: Australia

PostPosted: Sat Oct 07, 2006 3:18 pm    Post subject: Reply with quote

Ok, now this is very weird and has just confused the hell out of me.
After seeing the NIC worked in Ubuntu, I rebooted back into my gentoo networkless install.
I didn't really mess with any settings.. I just looked around a little with modinfo, lspci, dmesg, and after looking
at the driver readme file, I tried:

#modprobe r1000 speed=100 duplex=1 autoneg=1

Which didn't work anyway (it gave me a fatal error). So I just did 'modprobe r1000', and as usual didn't expect
it to work. But it did! It got an IP off my ADSL router's DHCP, and I seem to be able to access the net fine. I even did a reboot and checked it was still working - and yep ;)

Now, as I said, I didn't really change any settings or anything in either Ubuntu Live CD, or in my installed gentoo system. The only thing I really did was execute the line above. Could those modprobe parameters have possibly fixed it? (I couldn't see anywhere in either the driver README or gentoo-wiki that said those parameters needed to be used to get the driver working.. so I'm confused about how it decided to work magically).

ericcartman: try the above out and see if it solves your problem or not.

Anyway, thanks for the help all ;)
Back to top
View user's profile Send private message
ericcartman
n00b
n00b


Joined: 26 May 2004
Posts: 33
Location: Salzburg

PostPosted: Mon Oct 09, 2006 7:54 am    Post subject: Reply with quote

Hi

Yesterday I had a crazy idea, and it seemed to "correct" my problem:

I am dual-booting my laptop with Windows and Gentoo. Normally I suspend (hibernate) both systems when I change between them because I don't need to access either filesystems on the other system. But yesterday I had to reboot Window$ for a driver update to function and booted into Gentoo to check Syner's solution to the problem. And you can believe me, I was very surprised to see my NIC show
Code:
Link Status: Linked
in dmesg!

It looks like when Windows is hibernating the NIC is unable to wake up properly when booting into Gentoo. When Gentoo is hibernating on the other hand Windows seems to be able to initialize the card correctly. I have to admit I have not done very careful checking in this respect but I will try some hibernating combinations today or tomorrow to see if my guess was right.

Maybe anyone else is dual-booting and can confirm this behaviour?

greetz ericcartman
_________________
Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin, Historical Review of Pennsylvania 1759
Back to top
View user's profile Send private message
HemiPower
n00b
n00b


Joined: 06 Feb 2007
Posts: 1
Location: Göteborg

PostPosted: Tue Feb 06, 2007 5:09 pm    Post subject: Reply with quote

to ericcartman: Dead on!

I have been wrestling with the RTL8168 problem for most of the day today... I consider myself fairly adept at Linux/Gentoo and I tried every possible approach I could think of and the ones I found in forums. When I found this thread I thought "Exactly my sympthoms".

I have a habit of hibernating my XP when switching to Linux, and as you suggested when I shut XP down properly and booted Gentoo the built-in r8169 driver worked like a charm.

Thank's a lot!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum