RTL 8169/8111 problem

Hi,

I have a triple boot, Windows, openSUSE 13.1 and Hackintosh managed by GRUB bootloader (which is fantastic by the way).
If I restart from Hackintosh, the Internet is working, if from Windows, it is not. In order to connect again, I have to reinitiate the ethernet, pppoe etc.
I found some info https://en.opensuse.org/SDB:Realtek_8169_driver_problem I tried solutions 1 and 2 and it still doesn’t work.
Regarding solution no. 3, I downloaded a script but I don’t know how to compile the RTL driver.
Reference is also missing.
Can you help again please.
My motherboard is MSI H81M-E33 v2.

Thanks,
intze

my 2c’s
build the rpm from the srcrpm here
http://download.opensuse.org/repositories/home:/benjamin_poirier:/bug905988/openSUSE_13.2/src/r8169-1-1.1.src.rpm

first off you need to install a few packages, the base development, kernel headers and I’d recomend rpmbuild

sudo zypper in patterns-openSUSE-devel_basis kernel-devel rpmbuild

then download the source rpm for the driver,
for simplicity I’d recomend to do the next step as an ordinary user (not root)

zypper in http://download.opensuse.org/repositories/home:/benjamin_poirier:/bug905988/openSUSE_13.2/src/r8169-1-1.1.src.rpm

you can see the above is not for 13.1 but it is a source package that you will compile for 13.1, also as you did it as an ordinary user the source files from the above will be in your home folder

now go to /home//rpmbuild/specs open a terminal here and execute

rpmbuild -ba r8169.spec

if everything went OK and the build finished you will find your new driver in /home//rpmbuild/RPMS/i586/ (for 32 bit systems) and /home//rpmbuild/RPMS/x86_64/
now you need to install the driver module, cd to where the new rpm is and zypper it

sudo zypper in r8169-1-1.1.i586.rpm

for 32bit (the 64bit driver will be in a different dir and have a different suffix instead of i586 it will be r8169-1-1.1.x86_64.rpm)

I hope I wrote this clear enough.

thanks a lot, I’ll try it in the evening.

the 2nd command doesn’t work… it asked for root privileges… I used sudo but still doesn’t work…

anyway I am sorry, my network card is RTL8111G/R8168 and not r8169…

try running rpm not zypper

rpm -i http://download.opensuse.org/repositories/home:/benjamin_poirier:/bug905988/openSUSE_13.2/src/r8169-1-1.1.src.rpm

you can do it as root too, but then, the source files and the spec file will go in /usr/src/packages/ and you will have to do steps 3 and 4 as root and not in your home but in /usr/src/packages directory

now I get to:

warning: /var/tmp/rpm-tmp.V9zZW7: Header V3 RSA/SHA1 Signature, key ID 4a3d5625: NOKEY

are you sure 8169 will work for 8168?

are you sure 8169 will work for 8168?

Yes.

hwinfo --netcard
33: PCI 200.0: 0200 Ethernet controller                         
  [Created at pci.328]
  Unique ID: c3qJ.1WVRdh9En64
  Parent ID: 8otl.om932x2mw06
  SysFS ID: /devices/pci0000:00/0000:00:04.0/0000:02:00.0
  SysFS BusID: 0000:02:00.0
  Hardware Class: network
  Model: "Realtek RTL8111/8168 PCI Express Gigabit Ethernet controller"
  Vendor: pci 0x10ec "Realtek Semiconductor Co., Ltd."
  Device: pci 0x8168 "RTL8111/8168 PCI Express Gigabit Ethernet controller"
  SubVendor: pci 0x1043 "ASUSTeK Computer Inc."
  SubDevice: pci 0x8505 "P8H77-I Motherboard"
  Revision: 0x09
  Driver: "r8169"
  Driver Modules: "r8169"
  Device File: enp2s0
  I/O Ports: 0xd000-0xdfff (rw)
  Memory Range: 0xd2104000-0xd2104fff (ro,non-prefetchable)
  Memory Range: 0xd2100000-0xd2103fff (ro,non-prefetchable)
  IRQ: 88 (1063513 events)
  HW Address: 54:a0:50:52:96:e0
  Link detected: yes
  Module Alias: "pci:v000010ECd00008168sv00001043sd00008505bc02sc00i00"
  Driver Info #0:
    Driver Status: r8169 is active
    Driver Activation Cmd: "modprobe r8169"
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #10 (PCI bridge)

The above is a key warning no big deal.
you said you needed 8169 (in the post title), I have 8168 and I don’t need any extra kernel modules.
Have you checked if there is an option a Wake-on-lan in bios, maybe enabling it in bios and in windows will pervent windows from shutting down the nic?

I couldn’t make it work, I have to face it, I’m a beginner with linux.
WOL is enabled… Even if if’s restarting from Windows I can connect to pppoe in about 5 mins… I had a surprise when I was seeing it connected, very weird. Sometimes it works immediately after login sometimes it doesn’t.

I have this errors now:

/usr/src/linux-3.11.10-25/arch/x86/Makefile:107: CONFIG_X86_X32 enabled but no binutils support
/usr/src/linux-3.11.10-25/arch/x86/Makefile:107: CONFIG_X86_X32 enabled but no binutils support
/usr/src/linux-3.11.10-25/arch/x86/Makefile:107: CONFIG_X86_X32 enabled but no binutils support
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.fwetig

  • umask 022
  • cd /home/FlorinH/rpmbuild/BUILD
  • cd /home/FlorinH/rpmbuild/BUILD
  • rm -rf r8169-1
  • /usr/bin/mkdir -p r8169-1
  • cd r8169-1
  • /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
  • echo r8169.ko
  • cp /home/FlorinH/rpmbuild/SOURCES/Makefile .
  • cp /home/FlorinH/rpmbuild/SOURCES/r8169.c .
  • echo ‘Patch #0 (0001-r8169-print-unmasked-XID.patch):’
    Patch #0 (0001-r8169-print-unmasked-XID.patch):
  • /usr/bin/cat /home/FlorinH/rpmbuild/SOURCES/0001-r8169-print-unmasked-XID.patch
  • /usr/bin/patch -p5 --fuzz=0
    patching file r8169.c
  • echo ‘Patch #1 (0002-r8169-print-wol-changes.patch):’
    Patch #1 (0002-r8169-print-wol-changes.patch):
  • /usr/bin/cat /home/FlorinH/rpmbuild/SOURCES/0002-r8169-print-wol-changes.patch
  • /usr/bin/patch -p5 --fuzz=0
    patching file r8169.c
  • set – Makefile Module.supported r8169.c
  • mkdir source
  • mv Makefile Module.supported r8169.c source/
  • mkdir obj
  • exit 0
    Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.uHXG7A
  • umask 022
  • cd /home/FlorinH/rpmbuild/BUILD
  • /usr/bin/rm -rf /home/FlorinH/rpmbuild/BUILDROOT/r8169-1-1.1.x86_64
    ++ dirname /home/FlorinH/rpmbuild/BUILDROOT/r8169-1-1.1.x86_64
  • /usr/bin/mkdir -p /home/FlorinH/rpmbuild/BUILDROOT
  • /usr/bin/mkdir /home/FlorinH/rpmbuild/BUILDROOT/r8169-1-1.1.x86_64
  • cd r8169-1
  • for flavor in default desktop xen
  • rm -rf obj/default
  • cp -r source obj/default
  • make -C /usr/src/linux-obj/x86_64/default modules M=/home/FlorinH/rpmbuild/BUILD/r8169-1/obj/default
    make: Entering directory /usr/src/linux-3.11.10-25-obj/x86_64/default' CC [M] /home/FlorinH/rpmbuild/BUILD/r8169-1/obj/default/r8169.o /home/FlorinH/rpmbuild/BUILD/r8169-1/obj/default/r8169.c: In function 'rtl8169_get_stats64': /home/FlorinH/rpmbuild/BUILD/r8169-1/obj/default/r8169.c:6636:3: error: implicit declaration of function 'u64_stats_fetch_begin_irq' -Werror=implicit-function-declaration] start = u64_stats_fetch_begin_irq(&tp->rx_stats.syncp); ^ /home/FlorinH/rpmbuild/BUILD/r8169-1/obj/default/r8169.c:6639:2: error: implicit declaration of function 'u64_stats_fetch_retry_irq' -Werror=implicit-function-declaration] } while (u64_stats_fetch_retry_irq(&tp->rx_stats.syncp, start)); ^ /home/FlorinH/rpmbuild/BUILD/r8169-1/obj/default/r8169.c: In function 'rtl_init_one': /home/FlorinH/rpmbuild/BUILD/r8169-1/obj/default/r8169.c:7166:2: error: implicit declaration of function 'u64_stats_init' -Werror=implicit-function-declaration] u64_stats_init(&tp->rx_stats.syncp); ^ cc1: some warnings being treated as errors make[3]: *** [/home/FlorinH/rpmbuild/BUILD/r8169-1/obj/default/r8169.o] Error 1 make[2]: *** [_module_/home/FlorinH/rpmbuild/BUILD/r8169-1/obj/default] Error 2 make[1]: *** [sub-make] Error 2 make: *** [all] Error 2 make: Leaving directory /usr/src/linux-3.11.10-25-obj/x86_64/default’
    error: Bad exit status from /var/tmp/rpm-tmp.uHXG7A (%build)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.uHXG7A (%build)

thank you in advance!