Jump to content

New Driver for Realtek RTL8111


Mieze
1,592 posts in this topic

Recommended Posts

Indeed,
 
I disabled every ASPM option inside and outside of the PCIe, and I still receive this message:

Jul  5 20:10:58 localhost kernel[0]: Ethernet [RealtekRTL8111]: Warning: PCIe ASPM enabled.

I will try again until I see a different message. 

 

Thank you again,

 

Dioclecio

Link to comment
Share on other sites

One more question: which kernel flags do you use? Please see your bootloader's config file. It's because npci=0x2000 and npci=0x3000 might cause this strange behavior.

 

Mieze

Link to comment
Share on other sites

Hi Mieze,

 

here you have my log file. 

http://ge.tt/8t4zpOn1/v/6

 

This driver presents less errors than the original 1.2.0

 

Unfortunately I always have to return to the version 1.1.3 in order to have network access.

 

I really dont know the reason, but this 1.1.3 is less unstable than the 1.2.0

 

Thank you for your patience. 

 

Dioclecio

Link to comment
Share on other sites

Hi Mieze,

 

here you have my log file. 

http://ge.tt/8t4zpOn1/v/6

 

This driver presents less errors than the original 1.2.0

 

Unfortunately I always have to return to the version 1.1.3 in order to have network access.

 

I really dont know the reason, but this 1.1.3 is less unstable than the 1.2.0

 

Thank you for your patience. 

 

Dioclecio

 

Thanks for the test. Now I can narrow it down to the chip's interrupt generation logic. It seem like that this is a bug of the RTL8111G. Well, maybe we can find a workaround. Please try with the attached version. I disabled the adaptive interrupt moderation logic which has been introduced with version 1.2.0.

 

Mieze

Edited by Mieze
Link to comment
Share on other sites

Hi Mieze,

 

I agree with you, this RTL8111G has some strange bugs.

 

Today I boot my computer with Ubuntu. After some minutes of use, and a reboot, my osx presented some problems to define  network connection. 

In this case, I had to disconnect the power of my computer and wait some seconds. After this procedure, my network connection returned to osx. Strange. 

 

This last version kext presented the same unstable connection.

My log file is here:

 
 
Thanks Dioclecio
  • Like 1
Link to comment
Share on other sites

Last night I rewrote much of the code in order to get closer to the underlying linux driver. The most important difference is that the driver now performs a reinitialization of the MAC when a connection is established the same way as the linux driver does. Maybe this is required to get the RTL8111G working properly?

 

Anyway I would like to ask all users to test this driver regardless of the RTL8111 version as this is not a bug fix but more a completely new driver. When giving feedback don't forget to take a look at the kernel log and include the chipset number (1-27) as this is the information uniquely identifying the version of the RTL8111. This driver has undergone only a limited number of tests. All I can confirm is that it works on chipset 16 (RTL8111E-VL).

 

Good luck!

 

Mieze

Edited by Mieze
  • Like 1
Link to comment
Share on other sites

Last night I rewrote much of the code in order to get closer to the underlying linux driver. The most important difference is that the driver now performs a reinitialization of the MAC when a connection is established the same way as the linux driver does. Maybe this is required to get the RTL8111G working properly?

 

Anyway I would like to ask all users to test this driver regardless of the RTL8111 version as this is not a bug fix but more a completely new driver. When giving feedback don't forget to take a look at the kernel log and include the chipset number (1-27) as this is the information uniquely identifying the version of the RTL8111. This driver has undergone only a limited number of tests. All I can confirm is that it works on chipset 16 (RTL8111E-VL).

 

Good luck!

 

Mieze

 

I'm going to give this a try right now.  I've been having a strange issue with the latest stable version where I lose my IP some times when I wake from sleep.  Renewing DHCP lease doesn't work; I have to do a "make service inactive" then "make service active" in network preferences to get things working.  This has only happened 3 times since installing 1.2.

 

Here is what I get in the logs when I wake from sleep:

 

2014-07-07 7:56:04.000 PM kernel[0]: Ethernet [RealtekRTL8111]: Link up on en0, 1-Gigabit, Full-duplex, No flow-control
2014-07-07 7:56:04.714 PM configd[65]: LINKLOCAL en0: parent has no IP
2014-07-07 7:56:04.716 PM configd[65]: network changed: v4(en0-:10.1.1.50) DNS- Proxy- SMB-
  • Like 1
Link to comment
Share on other sites

Hi Mieze

 

I checked this one on my 8111G (Chipset 20) and it works just like 1.2.0. Thanks for your efforts though.

 

Please send me your complete kernel logs.

 

Mieze

Link to comment
Share on other sites

EDIT: Forgot to mention I am on 10.9.4

 

1.2.2dev1 is working for me.  On 1.2 stable I was seeing something in the logs about lost interupt.  I don't get that now.

 

Here are logs for 1.2.2dev1.  Everything looks good.

2014-07-07 10:04:07.000 PM kernel[0]: Ethernet [RealtekRTL8111]: EEE support enabled.
2014-07-07 10:04:07.000 PM kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv4 segmentation offload enabled.
2014-07-07 10:04:07.000 PM kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv6 checksum offload enabled.
2014-07-07 10:04:07.000 PM kernel[0]: Ethernet [RealtekRTL8111]: Using interrupt mitigate value 0xcf68.
2014-07-07 10:04:07.000 PM kernel[0]: Ethernet [RealtekRTL8111]: RTL8168D/8111D: (Chipset 9) at 0xffffff811f7e5000,  0:26:18:fe:70:ac
2014-07-07 10:04:16.000 PM kernel[0]: Ethernet [RealtekRTL8111]: Link up on en0, 1-Gigabit, Full-duplex, No flow-control
  • Like 1
Link to comment
Share on other sites

Dear Mieze,

 

I made some uncommon tests and now my ethernet is working without some serious problems. The following link has the files used for this test.

http://j.mp/VHFRkz

 

First, I installed the version 1.2.2 of your driver. Then, my ethernet died after some minutes. After the boot and some minutes working, the ethernet stopped my network connection.

Folder: RehabMan-Realtek-Network-2013-1205

 

Second, I installed the last version of the RehabMan kext. I think it is based on the 1.1.3 version of your kext (I dont know). And again, my ethernet worked for some minutes. And it stopped with no advice in system.log.

Folder: Kexts used later

 

Finally, I uninstalled everything Realtek driver, and reinstalled 2 drivers

  • AppleRTL8139Ethernet.kext and
  • Version 1.1.3 of an old RTL8111 driver that I had in my backup.

When I created the ethernet connection into the network setting, the default name of the ethernet assumed: "PCI Ethernet Slot Ethernet"

 

Now, the Clover boot folder has the following kexts:

AHCIPortInjector.kext
AppleAHCIPort.kext
AppleCameraInterface.kext
AppleHDA.kext
AppleIntelFramebufferAzul.kext
AppleMCCSControl.kext
AppleMobileDevice.kext
ApplePS2Controller.kext
AppleRTL8139Ethernet.kext
AudioAUUC.kext
BTFirmwareUploader.kext
CPUSensors.kext
CoreStorage.kext
FakeSMC.kext
GeForce.kext
GenericUSBXHCI.kext
IOAHCIBlockStorageInjector.kext
IOAHCIFamily.kext
IOATAFamily.kext
IOBluetoothFamily.kext
IOBluetoothHIDDriver.kext
IOSCSIArchitectureModelFamily.kext
IOSCSIParallelFamily.kext
IOUSBFamily.kext
MotMobileUSB.kext
NVDAResman.kext
RealtekRTL8111.kext
SMARTLib.plugin
VoodooHDA.kext
iPodDriver.kext

Now I am transferring a 700Mb file without interruptions. And my local ping is fast:

64 bytes from 10.0.2.1: icmp_seq=250 ttl=64 time=0.491 ms
64 bytes from 10.0.2.1: icmp_seq=251 ttl=64 time=0.441 ms
64 bytes from 10.0.2.1: icmp_seq=252 ttl=64 time=0.480 ms
64 bytes from 10.0.2.1: icmp_seq=253 ttl=64 time=0.517 ms
64 bytes from 10.0.2.1: icmp_seq=254 ttl=64 time=0.472 ms
64 bytes from 10.0.2.1: icmp_seq=255 ttl=64 time=0.560 ms
64 bytes from 10.0.2.1: icmp_seq=256 ttl=64 time=0.525 ms
64 bytes from 10.0.2.1: icmp_seq=257 ttl=64 time=0.372 ms

Should I try something to help you?

Should I try to install the current driver version again?

 

Thank you again.

 

Dioclecio

Link to comment
Share on other sites

@Dioclecio: Are you sure that you had all other Realtek kexts uninstalled when you ran the tests with 1.2.x? I'm asking because the strange behavior was something I really couldn't explain and I remember a few weeks ago I had some users with a weird problem which turned out to be caused by another Realtek driver installed on the system.

 

Mieze

Link to comment
Share on other sites

Are you sure that you had all other Realtek kexts uninstalled when you ran the tests with 1.2.x?

 

Yes, I am. I had just the mentioned kexts into my Clover boot folder. 

 

I remembered that I changed some options of my clover config.plist. I checked and unchecked the following options:

post-1341515-0-03238800-1404880179_thumb.png
post-1341515-0-13712800-1404880182_thumb.png
post-1341515-0-95693200-1404880184_thumb.png
 

I tried to reproduce part of some generic config.plist file of the Clover installation.

 
Then, I made some tests with your new (1.2.2) version again. 

 

Kext 1.2.2 with the mentioned drivers (and AppleRTL*.kext) and the changed options: unstable network and local ping. A number of errors: Tx timeout. Lost interrupt?

Kext 1.1.3 with the same changes: network stable, but not so fast, good local ping and No Tx errors.

 

Thank you again.

 

Yours,

 

Dioclecio

post-1341515-0-03238800-1404880179_thumb.png

post-1341515-0-13712800-1404880182_thumb.png

post-1341515-0-95693200-1404880184_thumb.png

Link to comment
Share on other sites

@Dioclecio: That brings us back to the firmware hypothesis. There is one chance left. Realtek published an updated version of the linux driver  (8.038.00) which might help. Looks like I should merge in those code to my driver. Unfortunately this will require a week of full time work (due to the tests) which is something I can't afford to do in the near future.

 

Mieze

Link to comment
Share on other sites

@Dioclecio: Can you please send me the startup log messages of the driver version 1.1.3. I want to check if it identifies the chipset as 20 too.

 

Mieze

Link to comment
Share on other sites

Hi Meize,

Today i will *finally* be in front of the server with the multiport realtek card again for some pretty high availability testing. I know you are usually very quick and responsive but if you happen to be around and available starting about 4 hours from the time of this post i will be able to provide immediate feedback and we can have some back and forth testing. I am also available on Skype if you prefer that, i can PM you my Skype info.

 

Thanks!

g\

Link to comment
Share on other sites

@Dioclecio: Can you please send me the startup log messages of the driver version 1.1.3. I want to check if it identifies the chipset as 20 too.

 

Mieze

Hi Mieze,

 

Yes, I think it does.

Jul 10 08:10:17 --- last message repeated 6 times ---
Jul 10 08:10:05 localhost kernel[0]: Longterm timer threshold: 1000 ms
Jul 10 08:10:05 localhost kernel[0]: PMAP: PCID enabled
Jul 10 08:10:05 localhost kernel[0]: PMAP: Supervisor Mode Execute Protection enabled
Jul 10 08:10:05 localhost kernel[0]: Darwin Kernel Version 13.1.0: Wed Apr  2 23:52:02 PDT 2014; root:xnu-2422.92.1~2/RELEASE_X86_64
Jul 10 08:10:05 localhost kernel[0]: vm_page_bootstrap: 1989432 free pages and 91336 wired pages
Jul 10 08:10:05 localhost kernel[0]: kext submap [0xffffff7f807a5000 - 0xffffff8000000000], kernel text [0xffffff8000200000 - 0xffffff80007a5000]
Jul 10 08:10:05 localhost kernel[0]: zone leak detection enabled
Jul 10 08:10:05 localhost kernel[0]: "vm_compressor_mode" is 4
Jul 10 08:10:05 localhost kernel[0]: standard timeslicing quantum is 10000 us
Jul 10 08:10:05 localhost kernel[0]: standard background quantum is 2500 us
Jul 10 08:10:05 localhost kernel[0]: mig_table_max_displ = 74
Jul 10 08:10:05 localhost kernel[0]: TSC Deadline Timer supported and enabled
Jul 10 08:10:05 localhost kernel[0]: AppleACPICPU: ProcessorId=1 LocalApicId=0 Enabled
Jul 10 08:10:05 localhost kernel[0]: AppleACPICPU: ProcessorId=2 LocalApicId=2 Enabled
Jul 10 08:10:05 localhost kernel[0]: AppleACPICPU: ProcessorId=3 LocalApicId=4 Enabled
Jul 10 08:10:05 localhost kernel[0]: AppleACPICPU: ProcessorId=4 LocalApicId=6 Enabled
Jul 10 08:10:05 localhost kernel[0]: calling mpo_policy_init for TMSafetyNet
Jul 10 08:10:05 localhost kernel[0]: Security policy loaded: Safety net for Time Machine (TMSafetyNet)
Jul 10 08:10:05 localhost kernel[0]: calling mpo_policy_init for Sandbox
Jul 10 08:10:05 localhost kernel[0]: Security policy loaded: Seatbelt sandbox policy (Sandbox)
Jul 10 08:10:05 localhost kernel[0]: calling mpo_policy_init for Quarantine
Jul 10 08:10:05 localhost kernel[0]: Security policy loaded: Quarantine policy (Quarantine)
Jul 10 08:10:05 localhost kernel[0]: Copyright (c) 1982, 1986, 1989, 1991, 1993
Jul 10 08:10:05 localhost kernel[0]: The Regents of the University of California. All rights reserved.
Jul 10 08:10:05 localhost kernel[0]: MAC Framework successfully initialized
Jul 10 08:10:05 localhost kernel[0]: using 16384 buffer headers and 10240 cluster IO buffer headers
Jul 10 08:10:05 localhost kernel[0]: FakeSMCKeyStore: started
Jul 10 08:10:05 localhost kernel[0]: DirectHW: Driver v1.3 (compiled on Jun  8 2012) loaded. Visit http://www.coresystems.de/ for more information.
Jul 10 08:10:05 localhost kernel[0]: AppleKeyStore starting (BUILT: Sep 19 2013 22:20:34)
Jul 10 08:10:05 localhost kernel[0]: FakeSMC v6.0.1018 Copyright 2013 netkas, slice, usr-sse2, kozlek, navi, THe KiNG, RehabMan. All rights reserved.
Jul 10 08:10:05 localhost kernel[0]: FakeSMC: 10 preconfigured keys added
Jul 10 08:10:05 localhost kernel[0]: FakeSMC: 5 keys exported by Clover EFI
Jul 10 08:10:05 localhost kernel[0]: IOAPIC: Version 0x20 Vectors 64:87
Jul 10 08:10:05 localhost kernel[0]: ACPI: sleep states S3 S4 S5
Jul 10 08:10:05 localhost kernel[0]: pci (build 20:00:24 Jan 16 2014), flags 0x63008, pfm64 (39 cpu) 0x7f80000000, 0x80000000
Jul 10 08:10:05 localhost kernel[0]: [ PCI configuration begin ]
Jul 10 08:10:05 localhost kernel[0]: SMC: successfully initialized
Jul 10 08:10:05 localhost kernel[0]: CPUSensors: CPU family 0x6, model 0x3c, stepping 0x3, cores 4, threads 4, TJmax 100
Jul 10 08:10:05 localhost kernel[0]: CPUSensors: setting platform keys to [j43     ]
Jul 10 08:10:05 localhost kernel[0]: CPUSensors: RAPL units power: 0x3 energy: 0xe time: 0xa
Jul 10 08:10:05 localhost kernel[0]: console relocated to 0x7f89000000
Jul 10 08:10:05 localhost kernel[0]: [ PCI configuration end, bridges 4, devices 12 ]
Jul 10 08:10:05 localhost kernel[0]: HDAEnabler: Copyright (c) 2008 by Kabyl
Jul 10 08:10:05 localhost kernel[0]: HDAEnabler: 05/05/2008 Added SP-Audio support by Taruga
Jul 10 08:10:05 localhost kernel[0]: HDAEnabler: 03/07/2009 Compiled for 32/64-bit by Taruga
Jul 10 08:10:05 localhost kernel[0]: HDAEnabler: Copyright (c) 2008 by Kabyl
Jul 10 08:10:05 localhost kernel[0]: HDAEnabler: 05/05/2008 Added SP-Audio support by Taruga
Jul 10 08:10:05 localhost kernel[0]: HDAEnabler: 03/07/2009 Compiled for 32/64-bit by Taruga
Jul 10 08:10:05 localhost kernel[0]: mcache: 4 CPU(s), 64 bytes CPU cache line size
Jul 10 08:10:05 localhost kernel[0]: mbinit: done [96 MB total pool size, (64/32) split]
Jul 10 08:10:05 localhost kernel[0]: Pthread support ABORTS when sync kernel primitives misused
Jul 10 08:10:05 localhost kernel[0]: rooting via boot-uuid from /chosen: AE8E58D5-61B0-3FC2-972F-9ED8FC988345
Jul 10 08:10:05 localhost kernel[0]: Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
Jul 10 08:10:05 localhost kernel[0]: com.apple.AppleFSCompressionTypeZlib kmod start
Jul 10 08:10:05 localhost kernel[0]: com.apple.AppleFSCompressionTypeDataless kmod start
Jul 10 08:10:05 localhost kernel[0]: com.apple.AppleFSCompressionTypeZlib load succeeded
Jul 10 08:10:05 localhost kernel[0]: com.apple.AppleFSCompressionTypeDataless load succeeded
Jul 10 08:10:05 localhost kernel[0]: Ethernet [RealtekRTL8111]: Warning: PCIe ASPM enabled.
Jul 10 08:10:05 localhost kernel[0]: Ethernet [RealtekRTL8111]: EEE support enabled.
Jul 10 08:10:05 localhost kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv4 segmentation offload enabled.
Jul 10 08:10:05 localhost kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv6 checksum offload enabled.
Jul 10 08:10:05 localhost kernel[0]: Ethernet [RealtekRTL8111]: Using interrupt mitigate value 0xcf68.
Jul 10 08:10:05 localhost kernel[0]: Ethernet [RealtekRTL8111]: RTL8168G/8111G: (Chipset 20) at 0xffffff80eefde000, bc:ee:7b:8d:4e:f4
Jul 10 08:10:05 localhost kernel[0]: Got boot device = IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/SAT0@1F,2/AppleIntelPchSeriesAHCI/PRT0@0/IOAHCIDevice@0/AppleAHCIDiskDriver/IOAHCIBlockStorageDevice/IOBlockStorageDriver/ST1000DM003-1CH162 Media/IOGUIDPartitionScheme/Apple HFS/HFS+@3
Jul 10 08:10:05 localhost kernel[0]: BSD root: disk0s3, major 1, minor 3
Jul 10 08:10:05 localhost kernel[0]: hfs: mounted MacOS on device root_device
Jul 10 08:10:05 localhost kernel[0]: XCPM: registered
Jul 10 08:09:58 localhost com.apple.launchd[1]: *** launchd[1] has started up. ***
Jul 10 08:09:58 localhost com.apple.launchd[1]: *** Shutdown logging is enabled. ***
Jul 10 08:10:04 localhost distnoted[19]: # distnote server daemon  absolute time: 7.627708404   civil time: Thu Jul 10 08:10:04 2014   pid: 19 uid: 0  root: yes
Jul 10 08:10:04 localhost com.apple.SecurityServer[14]: Session 100000 created
Jul 10 08:10:11 localhost com.apple.launchd[1] (Niresh12495.Volume.Logo[68]): Exited with code: 2
Jul 10 08:10:11 localhost com.apple.launchd[1] (Niresh12495.Volume.iRepairCLI[66]): Exited with code: 2
Jul 10 08:10:11 localhost com.apple.launchd[1] (Niresh12495.Play.Music[67]): Exited with code: 2
Jul 10 08:10:11 localhost com.apple.launchd[1] (nj.startup.fixer[65]): Exited with code: 2
Jul 10 08:10:11 localhost kernel[0]: Waiting for DSMOS...
Jul 10 08:10:12 localhost hidd[48]: void __IOHIDPlugInLoadBundles(): Loaded 0 HID plugins
Jul 10 08:10:12 localhost hidd[48]: Posting 'com.apple.iokit.hid.displayStatus' notifyState=1
Jul 10 08:10:14 localhost com.apple.launchd[1] (Niresh12495.Volume.iRepairCLI): Throttling respawn: Will start in 8 seconds
Jul 10 08:10:17 localhost kernel[0]: VM Swap Subsystem is ON
Jul 10 08:10:17 localhost kernel[0]: SMC::smcReadKeyAction ERROR LsNM kSMCKeyNotFound(0x84) fKeyHashTable=0x0
Jul 10 08:10:17 localhost kernel[0]: SMC::smcGetLightshowVers ERROR: smcReadKey LsNM failed (kSMCKeyNotFound)
Jul 10 08:10:17 localhost kernel[0]: SMC::smcPublishLightshowVersion ERROR: smcGetLightshowVers failed (kSMCKeyNotFound)
Jul 10 08:10:17 localhost kernel[0]: SMC::smcInitHelper ERROR: smcPublishLightshowVersion failed (kSMCKeyNotFound)
Jul 10 08:10:17 localhost kernel[0]: Previous Shutdown Cause: 5
Jul 10 08:10:17 localhost kernel[0]: SMC::smcInitHelper ERROR: MMIO regMap == NULL - fall back to old SMC mode
Jul 10 08:10:17 localhost kernel[0]: HDAEnabler: Copyright (c) 2008 by Kabyl
Jul 10 08:10:17 localhost kernel[0]: HDAEnabler: 05/05/2008 Added SP-Audio support by Taruga
Jul 10 08:10:17 localhost kernel[0]: HDAEnabler: 03/07/2009 Compiled for 32/64-bit by Taruga
Jul 10 08:10:17 localhost kernel[0]: Controller: NVidia GT108 (vendor ID: 10de, device ID: 0bea)
Jul 10 08:10:17 localhost kernel[0]: Sound assertion in AppleHDAController at line 460
Jul 10 08:10:17 localhost kernel[0]: Sound assertion in AppleHDAController at line 402
Jul 10 08:10:17 localhost kernel[0]: init
Jul 10 08:10:17 localhost kernel[0]: probe
Jul 10 08:10:17 localhost kernel[0]: start
Jul 10 08:10:17 localhost kernel[0]: DSMOS has arrived
Jul 10 08:10:17 localhost kernel[0]: [IOBluetoothHCIController][start] -- completed
Jul 10 08:10:17 localhost kernel[0]: NVDAStartup: Official
Jul 10 08:10:17 localhost kernel[0]: HDAEnabler: Copyright (c) 2008 by Kabyl
Jul 10 08:10:17 localhost kernel[0]: NVDAGF100HAL loaded and registered
Jul 10 08:10:17 localhost kernel[0]: HDAEnabler: 05/05/2008 Added SP-Audio support by Taruga
Jul 10 08:10:17 localhost kernel[0]: HDAEnabler: 03/07/2009 Compiled for 32/64-bit by Taruga
Jul 10 08:10:17 localhost kernel[0]: Controller: Intel Lynx Point (vendor ID: 8086, device ID: 8c20)
Jul 10 08:10:17 localhost kernel[0]: error: failed to open PCI device
Jul 10 08:10:17 localhost com.apple.usbmuxd[26]: usbmuxd-327.4 on Feb 12 2014 at 14:54:33, running 64 bit
Jul 10 08:10:18 localhost kernel[0]: flow_divert_kctl_disconnect (0): disconnecting group 1
Jul 10 08:10:19 localhost kernel[0]: Ethernet [RealtekRTL8111]: Link up on en0, 100-Megabit, Full-duplex, flow-control
Jul 10 08:10:19 localhost configd[17]: network changed.

I understand that the AppleRTL8139Ethernet.kext has no relation with my 8111G ethernet. And I think that some my previous changing in Clover had certain influence on the behaviour of the ethernet. The problem is that I don't know what made it work. 

 

If you have time, it would be interesting to know who these settings affected in this driver performance. 

 

Yours,

 

Dioclecio

Link to comment
Share on other sites

×
×
  • Create New...