How install r8168 ethernet driver when can't connect?

Hello:

I have just installed a “new” Gigabyte motherboard, which I chose for the floppy drive port which seems to have disappeared from every other board on the planet.

Unfortunately, this board uses the Realtek RRTL8111/8168B PCI Express Ethernet controller (rev 06), and the kernel-supplied driver is r8169, which does not work with this controller.

So I have no way to go online with this machine to “update” or install an r8168 driver.

I have downloaded the r8168-8.037.00.tar.bz2 file,
Realtek
using my son’s XP box, but other than “un-tarring” it, don’t know what to do with it.

I found some instructions:
The pain of an Realtek (RTL8111/RTL8168) ethernet card | unixblogger
but they seem to be specifically for Ubuntu or Debian. Since I know just enough to know that different flavors of Linux use differently named files and store them in different locations, I am just lost, “dead in the water”.

After installing the motherboard (with the help of a computer tech in the neighborhood) I have done a clean install of opensuse 12.3 from a live CD, but of course no additonal files can be downloaded, so no “Yast”.

I know just enough to navigate and follow instructions, but other than that, pretty much depend on the gui, so the question is:

How do I use the cli in opensuse to install the r8168 driver with default functions supplied by the “live” CD?

Is there an already existing step-by-step stupid-proof guide for this operation?

O Obi Wans, you are my only hope…

Athlon II X4 640 3.0GHz, Gigabyte GA-880GA-UD3H, 8GB DDR3-1333,
openSUSE-12.3-KDE-x86_64, KDE 4.1, sda=80GB Ext4, sdb=500GB Ext4.
I do not know the kernel version.

Hello,

well it is no to much complicated,

  1. open terminal and type
sudo zypper in -t pattern  devel_basis devel_C_C++ devel_kernel
  1. when installation was finish follow instruction from your post, EXCEPT pt.8!
  2. if no errors, you are done, restart computer and enjoy with openSuse

regards

Czeslaw M

Hi cmruk/Czeslaw (?):

The kernel provides the r8169 driver, which doesn’t work.

Also, the suse nic repository only provides old versions.

I thought zypper was dependent on configured repositories; I can’t even see my router.

No Yast, no zypper.

I need the steps for installation from an already downloaded r8168 driver file in the opensuse cli.

Sigh…

Hi,

have you finish install openSuse??
you don’t need go online, installer add automatically local repositories from installation source and you are able to install building/developing tools from this media.

You already post step instruction inside your first post :slight_smile: ahh the ‘zypper’ command is replaced p2. ‘apt-get’ from this instruction, i mean code posted inside my first reply is replace p2 from this guide.

Regards

Czeslaw M.

Hello,

you have to download using XP box DVD iso, not a Live iso version, sorry i dont read carefully your first post.

Regards

Czeslaw M.

Hi Czeslaw:

Well, duh! - I completely forgot about the DVD iso option!

I’m currently in the middle of 2nd try at downloading the opensuse 13.1 DVD - the downloader says I have about 12 more hours to go - again.

Meanwhile, do you say that the instructions given in The pain of an Realtek (RTL8111/RTL8168) ethernet card | unixblogger for Ubuntu/Debian, with commands like “apt-get install build-essential”, etc. are the same as, and will work the same, in openSUSE?

I don’t know if commands are common to all distibution flavors or not, and want to be sure I’m doing things the correct way for openSUSE.

Again, thank you for the advice and for “hanging in” with me. I’ll be back here again when I finish getting a good download and have installed v13.1. It’ll have to be another clean install since the opensuse page no longer provides 12.3.

Hello,

i adopt this instruction to step by step for opensuse

**1. Get root **privileges, open terminal, type “su” ‘enter’ root pass ‘enter’ you will see red leather in command prompt
2. Get the requirements
To build and install the driver, we need the kernel headers and the build tools like gcc. To get them, just easily type in a terminal:zypper in -t pattern devel_basis devel_C_C++ devel_kernel
3. Get the driver
Now, go to the official download page from Realtek for the Linux/UNIX Driver for the RTL8111/RTL8168 ethernet card and download the latest driver version.
Link: Realtek Download Page
4. Untar the archive
The driver is compressed to an archive. So uncompress it with the following command:tar xfvj r8168-8.025.00.tar.bz2

NOTE: Please do not forget to replace the “r8168-8.025.00.tar.bz2″ with the driver version which you have downloaded!
5. Blacklist old driver
We have to blacklist the old driver (r8169) to prevent the system to load it. To do this, easily set a new entry in “/etc/modprobe.d/99-local.conf” which is called:blacklist r8169

or just enter in the terminal againecho “blacklist r8169″ >> /etc/modprobe.d/99-local.conf

to do this in only one command.
6. Build and install the new driver
Now, the whole requirements to install the new driver are done. Let us now change in the driver directory, which we have uncompressed in a few steps before:cd r8168-8.025.00

NOTE: Again, please do not forget, to change “r8168-8.025.00″ to the version which you have downloaded.
The only think we have to do now is, to build the driver and install it. To build it, just type:make clean modules

after a few seconds (depending on your CPU), the driver is build and you can install it with:make install

7. Welcome r8168
One of our last steps is, to let the system know about the r8168 driver. With the commanddepmod -a

you rebuild the kernel module dependencies
8. type exit ‘enter’ to close terminal

when all steps run without error’s, reboot Pc and your net comes up (lest hope)

regards

Czeslaw M.

Czeslaw:

Thank you so much! When I get the download completed & the new version loaded, I’ll let you know how (and if) everything worked out.

O.K.: I have installed a fresh copy of opensuse 13.1 from the DVD and begun the process of changing the nic driver. I got to the the step:

make clean modules

and got:

If 'make' is not a typo you can use command-not-found to look up the package that contains it, like this: 
cnf make

The program 'make' can be found in the following package:
  * make [path: /usr/bin/make, repository: zypp (opensuse-13-1-1.1)]

Try installing with:
    zypper install make

Since I have no connection, so no zypper, I set the install DVD up as a repo and used Yast to install “make”. When I tried:

make clean modules

I got:

make: *** No rule to make target 'clean'.  Stop.

So no connection, no zypper, no “rule to make target ‘clean’”.

Arrgh.

What can I do? Does a place exist where I can download the functions that I need to do this, that I could set as a local repo?

Seeing you go through all this, knowing that 13.1 has a quite recent kernel, I’d like to make sure that you’re on the right path. Please post output of

lspci -nnk

Honestly, I see too many driver compile attempts where it’s no more than a matter of proper configuration.

EDIT:
BTW, it should be

make

or

make modules

or something like that, not

make clean modules

Hi,

compilation the latest version r8168-8.037.00 works well

suse131:/home/cmruk/Downloads # cd r8168-8.037.00
suse131:/home/cmruk/Downloads/r8168-8.037.00 # make clean modules
make -C src/ clean
make[1]: Entering directory /home/cmruk/Downloads/r8168-8.037.00/src' make -C /lib/modules/3.11.6-4-desktop/build SUBDIRS=/home/cmruk/Downloads/r8168-8.037.00/src clean make[2]: Entering directory /usr/src/linux-3.11.6-4-obj/x86_64/desktop’
CLEAN /home/cmruk/Downloads/r8168-8.037.00/src/.tmp_versions
CLEAN /home/cmruk/Downloads/r8168-8.037.00/src/Module.symvers
make[2]: Leaving directory /usr/src/linux-3.11.6-4-obj/x86_64/desktop' make[1]: Leaving directory /home/cmruk/Downloads/r8168-8.037.00/src’
make -C src/ modules
make[1]: Entering directory /home/cmruk/Downloads/r8168-8.037.00/src' make -C /lib/modules/3.11.6-4-desktop/build SUBDIRS=/home/cmruk/Downloads/r8168-8.037.00/src modules make[2]: Entering directory /usr/src/linux-3.11.6-4-obj/x86_64/desktop’
CC [M] /home/cmruk/Downloads/r8168-8.037.00/src/r8168_n.o
CC [M] /home/cmruk/Downloads/r8168-8.037.00/src/r8168_asf.o
CC [M] /home/cmruk/Downloads/r8168-8.037.00/src/rtl_eeprom.o
CC [M] /home/cmruk/Downloads/r8168-8.037.00/src/rtltool.o
LD [M] /home/cmruk/Downloads/r8168-8.037.00/src/r8168.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/cmruk/Downloads/r8168-8.037.00/src/r8168.mod.o
LD [M] /home/cmruk/Downloads/r8168-8.037.00/src/r8168.ko
make[2]: Leaving directory /usr/src/linux-3.11.6-4-obj/x86_64/desktop' make[1]: Leaving directory /home/cmruk/Downloads/r8168-8.037.00/src’
suse131:/home/cmruk/Downloads/r8168-8.037.00 # make install
make -C src/ install
make[1]: Entering directory /home/cmruk/Downloads/r8168-8.037.00/src' make -C /lib/modules/3.11.6-4-desktop/build SUBDIRS=/home/cmruk/Downloads/r8168-8.037.00/src INSTALL_MOD_DIR=kernel/drivers/net/ethernet/realtek modules_install make[2]: Entering directory /usr/src/linux-3.11.6-4-obj/x86_64/desktop’
INSTALL /home/cmruk/Downloads/r8168-8.037.00/src/r8168.ko
DEPMOD 3.11.6-4-desktop
make[2]: Leaving directory /usr/src/linux-3.11.6-4-obj/x86_64/desktop' make[1]: Leaving directory /home/cmruk/Downloads/r8168-8.037.00/src’
suse131:/home/cmruk/Downloads/r8168-8.037.00 # depmod -a

and its run without any issue

[12047.877763] device enp4s0 left promiscuous mode
[12047.877766] br0: port 1(enp4s0) entered disabled state
[12081.362872] r8168 Gigabit Ethernet driver 8.037.00-NAPI loaded
[12081.363013] r8168 0000:04:00.0: irq 50 for MSI/MSI-X
[12081.363654] eth%d: 0xffffc9000184c000, 6c:f0:49:e7:07:c0, IRQ 50
[12081.363843] r8168: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
[12081.363847] r8168 Copyright (C) 2013 Realtek NIC software team nicfae@realtek.com
This program comes with ABSOLUTELY NO WARRANTY; for details, please see http://www.gnu.org/licenses/.
This is free software, and you are welcome to redistribute it under certain conditions; see http://www.gnu.org/licenses/.
[12081.393738] systemd-udevd[24278]: renamed network interface eth0 to enp4s0
[12082.079797] IPv6: ADDRCONF(NETDEV_UP): enp4s0: link is not ready
[12087.091568] r8168: enp4s0: link up
[12087.091623] IPv6: ADDRCONF(NETDEV_CHANGE): enp4s0: link becomes ready
[12104.690646] LVM: Activation generator successfully completed.

remember you have to replace from guide proper version/name of this driver file.

P.4 decompress source

tar xfvj r8168-8.025.00.tar.bz2

P.6 Compiling - installing

cd r8168-8.025.00

that all, good luck,
BTW you are able install/remove software using zypper or just Yast->Software management;)

regards

Czeslaw M.

Hi Czeslaw, and Hi Knurpht - Thanks for stepping in…

Again - my only repository is the 13.1 install DVD.

Now I REALLY have problems. I just wiped a bad hard drive and removed it.
Now the machine won’t even boot! It gets through most of the sequence,
then does this:

[TIME] Timed out waiting for device dev-disk-by\x2did-ata\x2dST3500630NSBLAHBLAH\x2dpart1,device.
[DEPEND] Dependency failed for /home/sdc1
[DEPEND] Dependency failed for local file systems
Welcome to Emergency mode! After logginng in, type “journalctl -xb” to view
system logs, 'systemctl reboot" to reboot, 'systemctl default" to try again
to boot into default mode.
Welcome to Emergency mode! After logginng in, type “journalctl -xb” to view
system logs, 'systemctl reboot" to reboot, 'systemctl default" to try again
to boot into default mode.
Welcome to Emergency mode! After logginng in, type “journalctl -xb” to view
system logs, 'systemctl reboot" to reboot, 'systemctl default" to try again
to boot into default mode.
Welcome to Emergency mode! After logginng in, type “journalctl -xb” to view
system logs, 'systemctl reboot" to reboot, 'systemctl default" to try again
to boot into default mode.
etc. ad nauseum.

It seems to be in a loop now, never actually gives me a log-in dialog to
respond to the suggestions.

Please correct me if there is another way, but I think this is because fstab
is prompting to fsck and re-mount a drive (sdc) that no longer exists. I
think I have to re-install again with only sda and sdb connected…?

This on top of the nic driver problem … I’m tearing hair here.

Also - I really don’t understand this forum; up until now I had a decent-sized
dialog in which to edit, and choice whether to preview, post or continue to edit.
Now, suddenly, no matter what I do I am in “Quick Reply”. “Go Advanced”
brought me to the Log-In page (am I not already logged in?), and that dumped
me to a blank page that did nothing.

Seems like no matter what I do, it’s wrong…

O.K.; I just used an opensuse 12.3 “live” disk to access fstab & erase the
line that calls on disk sdc. Will now print your directions (again) and
(from XP) - will report result…

Meanwhile, thanks guys. Nice to know I’m not alone…

O.K. - trying “make” again:

Pegasus:/home/chuck/downloads/r8168-8.037.00 # make clean modules
make -C src/ clean
make[1]: Entering directory '/home/chuck/downloads/r8168-8.037.00/src'
make -C /lib/modules/3.11-6-4-desktop/build SUBDIRS=/home/chuck/downloads/r8168-8.037.00/src clean
make: Entering an unknown directory
make: *** /lib/modules/3.11-6-4-desktop/build: No such file or directory. Stop.
make: Leaving an unknown directory
make[1]: *** [clean] Error 2
make[1]: Leaving directory '/home/chuck/downloads/r8168-8.037.00/src'
make: *** [clean] Error 2
Pegasus:/home/chuck/downloads/r8168-8.037.00 # 

So I don’t seem to have a “/lib/modules/3.11-6-4-desktop/build”,
and “make” isn’t making one, if that’s what it’s supposed to be doing.

I checked with a file manager - that directory truly does not exist on this machine.

[QUOTE=Knurpht;2609515]Seeing you go through all this, knowing that 13.1 has a quite recent kernel, I’d like to make sure that you’re on the right path. Please post output of

lspci -nnk

Hi Knurpht:

output from # lspci -nnk - Too much to copy off screen, but I believe this is the relevant part:

03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co. Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 06)
SUBSYSTEM: Gigabyte Technology Co., Ltd. Motherboard [11458:e000]
kernel modules: r8169

I can’t find a button for “code” in this dialog. What’s happening here?
All I see is one for “quote”

About the openSUSE web-interface:

Yes, it changed considarably. A fall back to earlier times. Very regrettable. It is worked uppon (I hope).
The advanced editor should show the CODE button(#).

03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co. Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 06)
SUBSYSTEM: Gigabyte Technology Co., Ltd. Motherboard [11458:e000]
kernel modules: r8169

Unfortunately, this board uses the Realtek RRTL8111/8168B PCI Express Ethernet controller (rev 06), and the kernel-supplied driver is r8169, which does not work with this controller.

Why does it not work with the Kernel?

alias pci:v000010ECd00008168sv*sd*bc*sc*i* r8169

Should work, ID is build in.

You can also use the r8168 driver from this Repo, depends on your Kernel-Version:
Index of /repositories/home:/Akoellh:/Kernelmodules/openSUSE_13.1_Update

alias pci:v000010ECd00008168sv*sd*bc*sc*i* r8168

But then don´t forget to blacklist the r8169.

Both driver works fine here with:

lspci -nnk | grep -iA2 net
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 09)
        Subsystem: ASUSTeK Computer Inc. P8H77-I Motherboard [1043:8505]
        Kernel driver in use: r8168

Network managed with ifup/Yast.

Hello, If you like play more with compiling module from Realtek source, it’s seems you don’t have installed all necessary developing tools/software, kernel headers and other dev-kernel staf,

goto Yast-> Software management, select View type = pattern, mark ‘development basis’ and ‘development C-C++’ and ‘Kernel Development’ click accept,
Yast will make all necessary links/bindings for you, to compiling modules and kernel development.
Using compiled diver from repository should be a smart move :), but trying make it yourself in my opinion, give you chance to learn a bit :O,good luck.

regards

Czeslaw M.

AFAICS the kernel loads the module. I still don’t see the point of building a driver where the one present should work. On a kernel upgrade you’d have to rebuild the module, and hope that you don’t need any kernell specific patches.
Can you show output of

ip addr

and tell us whether networkmanager or ifup is being used?
Did you already try to configure the card through Yast - Networkdevices - Networksettings. Set it to ifup first (if that’s not already the active config).

Since it is a new board just maybe the controller is simply dead. It does happen.