r8168 Not Detected At Startup

Questions about cabled networking
Forum rules
Before you post please read this

r8168 Not Detected At Startup

Postby bweinberg on Wed Feb 08, 2012 4:35 am

OS: Linux Mint 12 KDE
Laptop: Lenovo Thinkpad X100e
Realtek Ethernet: RTL8111/8168B PCI Express Gigabit Ethernet

Since I installed Linux Mint 12 KDE last week, my laptop's ethernet has never detected at startup. That is, it's not in my lspci.

I tried installing the official/proprietary Realtek ethernet drivers, however, it won't let me run the MAKE command.

Websites said to blacklist the r8169 driver, which I did, but after restarting it sadly didn't do anything.

The wireless works fine, and if MATLAB didn't require ethernet I wouldn't even be posting this.

Much appreciated if anybody can get me going. I expect to do a little manual work each kernel upgrade, I just need to know how. Thanks
bweinberg
Level 1
Level 1
 
Posts: 10
Joined: Wed Feb 08, 2012 4:19 am
Location: East Sacramento, California

Linux Mint is funded by ads and donations.
 

Re: r8168 Not Detected At Startup

Postby mads on Wed Feb 08, 2012 5:56 am

Steps to install Realtek r8168 driver says:
Some people notice r8169 driver returning after reboots. To prevent this you might need to clean the cache using the following command:
update-initramfs -u
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Re: r8168 Not Detected At Startup

Postby bweinberg on Wed Feb 08, 2012 6:39 am

hey mads,

unfortunately it doesn't let me make. i should have put this before

with the official/proprietary realtek drivers, i'll do a sudo ./autorun.sh

problem at "make" command

Check old driver and unload it.
Build the module and install
make: *** /lib/modules/3.0.0-12-generic/build: No such file or directory. Stop.
make[1]: *** [modules] Error 2
make: *** [modules] Error 2
bweinberg
Level 1
Level 1
 
Posts: 10
Joined: Wed Feb 08, 2012 4:19 am
Location: East Sacramento, California

Re: r8168 Not Detected At Startup

Postby mads on Wed Feb 08, 2012 7:13 am

Hi! You need to install 'build-essential' before making.
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Re: r8168 Not Detected At Startup

Postby bweinberg on Wed Feb 08, 2012 7:29 am

got same "Make" command error after running build-essential

i ran build-essential twice to make sure it ran, said already complete

so oi restarted, just in case but no difference

i don't know why matlab couldn't just assign itself to my wireless adapter instead of my (missing) ethernet one
bweinberg
Level 1
Level 1
 
Posts: 10
Joined: Wed Feb 08, 2012 4:19 am
Location: East Sacramento, California

Re: r8168 Not Detected At Startup

Postby mads on Wed Feb 08, 2012 7:38 am

I agree. Blacklisting should be enough.
Did you update initramfs after blacklisting?
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Re: r8168 Not Detected At Startup

Postby bweinberg on Wed Feb 08, 2012 7:55 am

i thought so too but same error after that as well

just ran a sudo update-initramfs -u

and then restarted
bweinberg
Level 1
Level 1
 
Posts: 10
Joined: Wed Feb 08, 2012 4:19 am
Location: East Sacramento, California

Re: r8168 Not Detected At Startup

Postby mads on Wed Feb 08, 2012 8:16 am

Ok, I think I figured it out why make doesn't complete.
/lib/modules/3.0.0-12-generic/build is a symlink to /usr/src/linux-headers-3.0.0-12-generic.
So I was thinking if you could change the KDIR line in the Makefile from /lib/modules/$(KVER)/build to /usr/src/linux-headers-$(KVER), it might work.
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Re: r8168 Not Detected At Startup

Postby bweinberg on Wed Feb 08, 2012 8:27 am

Nope but awesome idea

I changed the KDIR line in the make file to /usr/src/linux-headers-$(KVER)

Saved, and got same error running make

Even if we can't figure this out, thanks for your help, much appreciated
bweinberg
Level 1
Level 1
 
Posts: 10
Joined: Wed Feb 08, 2012 4:19 am
Location: East Sacramento, California

Re: r8168 Not Detected At Startup

Postby mads on Wed Feb 08, 2012 8:39 am

:) As a last shot, there is another file there: Makefile_linux24x.
What happened if you changed the KSRC line in that file from /lib/modules/$(shell uname -r)/build to /usr/src/linux-headers-$(shell uname -r)?

One more thing. I am sure they are, but could you check if 'linux-headers-3.0.0-12' and 'linux-headers-3.0.0-12-generic' packages are installed.
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Re: r8168 Not Detected At Startup

Postby bweinberg on Wed Feb 08, 2012 8:55 am

gonna catch some z's but will do both those later today

thanks mads
bweinberg
Level 1
Level 1
 
Posts: 10
Joined: Wed Feb 08, 2012 4:19 am
Location: East Sacramento, California

Re: r8168 Not Detected At Startup

Postby bweinberg on Thu Feb 09, 2012 6:38 pm

nice work mads!

Still small issue but you solved the big problem I think

I had neither of those headers packages installed... so I installed both headers packages, ran a sudo make install (completed), restarted

what should i do with this?

sudo ./autorun.sh
[sudo] password
Check old driver and unload it.
Build the module and install
[: 48: r8168: unexpected operator
Depending module. Please wait.
load module r8168
WARNING: /etc/modprobe.d/blacklist.conf line 58: ignoring bad line starting with '„blacklist'
FATAL: Module r8168 not found.
Completed.
bweinberg
Level 1
Level 1
 
Posts: 10
Joined: Wed Feb 08, 2012 4:19 am
Location: East Sacramento, California

Re: r8168 Not Detected At Startup

Postby mads on Thu Feb 09, 2012 7:45 pm

bweinberg wrote:nice work mads!

Still small issue but you solved the big problem I think

I had neither of those headers packages installed... so I installed both headers packages, ran a sudo make install (completed), restarted

what should i do with this?

sudo ./autorun.sh
[sudo] password
Check old driver and unload it.
Build the module and install
[: 48: r8168: unexpected operator
Depending module. Please wait.
load module r8168
WARNING: /etc/modprobe.d/blacklist.conf line 58: ignoring bad line starting with '„blacklist'
FATAL: Module r8168 not found.
Completed.

Two possible solutions are provided here. Try them both.

Another thing is to check your blacklist.conf and see if there is a "„blacklist" at the end of the file and change it to "blacklist".
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Re: r8168 Not Detected At Startup

Postby bweinberg on Thu Feb 09, 2012 7:53 pm

hey mads,

just caught your message about reverting "Makefile" to default. just did that, ran a make install but it says Module r8168 not found.

(if needed, details below)

---

make[1]: Entering directory `/home/*/r8168-8.023.00/src'
install -m 744 -c r8168.o /lib/modules/3.0.0-12-generic/kernel/drivers/net/
make[1]: Leaving directory `/home/*/r8168-8.023.00/src'

so it looks like it worked

but then i run the sudo ./autorun.sh and get this

Check old driver and unload it.
Build the module and install
[: 48: r8168: unexpected operator
Depending module. Please wait.
load module r8168
FATAL: Module r8168 not found.
Completed.
bweinberg
Level 1
Level 1
 
Posts: 10
Joined: Wed Feb 08, 2012 4:19 am
Location: East Sacramento, California

Re: r8168 Not Detected At Startup

Postby mads on Fri Feb 10, 2012 4:22 am

bweinberg wrote:...but then i run the sudo ./autorun.sh and get this

Check old driver and unload it.
Build the module and install
[: 48: r8168: unexpected operator
Depending module. Please wait.
load module r8168
FATAL: Module r8168 not found.
Completed.

It seems that it is possible, but a bit difficult to make r8168 work, specially having kernel 3.

1) There are two important posts in the Comments section of the tutorial you are using:
- scottman1987 08:02 PM 09-13-2011
- foxhop 10:33 AM 10-15-2011
Please read the above comments, specially the second one which is from the author of the tutorial.

2) [SOLVED] Need Realtek r8168 driver in Oneiric is another interesting thread. Please read the last two posts by 'AndresChort' and 'stombi'. As you see 'stombi' is saying the same as 'foxhop' above, that one needs to modify the src/Makefile file to make it compatible with kernel 3.

3) [SOLVED] r8168 on Ubuntu 11.10 Kernel 3.x.x is perhaps the most interesting one. If you see the title it goes straight to kernel 3. Last post by 'vikketorr' gives a link to download a script which is easy to install (sudo ./switchmods) and should work out of the box.

If you still can't make it work, I would suggest that you start a new thread to draw attention from more experienced users. :)
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Re: r8168 Not Detected At Startup

Postby bweinberg on Fri Feb 10, 2012 6:45 am

I tried them all to no avail, each time getting excited...

i feel the precious hairs removing and am instead gonna give up, at least for a few days

the only reason i need an ethernet device is to activate matlab (has to assign to ethernet device)

i'm a bit afraid to try their recommended approach, but maybe i'll give it a go http://www.mathworks.com/support/soluti ... n=1-661QJD

mads, i appreciate your help. if Linux Mint has this good community support as you provided here, on this my first post on forums.linuxmint, I'll end up adding some of these forums to Google Reader which I'm using alot these days

thanks again
bweinberg
Level 1
Level 1
 
Posts: 10
Joined: Wed Feb 08, 2012 4:19 am
Location: East Sacramento, California

Re: r8168 Not Detected At Startup

Postby mads on Fri Feb 10, 2012 7:16 am

Hehe... thank you. :D
I would have felt much better if we could get it to work. Hope you'll find a a suitable workaround. :)
User avatar
mads
Level 6
Level 6
 
Posts: 1302
Joined: Wed Nov 03, 2010 3:44 pm

Linux Mint is funded by ads and donations.
 

Return to Ethernet

Who is online

Users browsing this forum: No registered users and 2 guests