Jump to content

New Driver for Realtek RTL8111


Mieze
1,593 posts in this topic

Recommended Posts

Try to get an add-in card with a RTL8111E because these chips work best and are well tested. I'm using this chip in my server with the driver since march 2013 and never lost connection. I'd recommend the Delock 89357 which I tested myself.

 

Avoid the old RTL8111B which is still found on many ultra cheap cards as these chips have more bugs and less offload functions.

 

In case the manufacturer doesn't mention the chip used, have a look at the PCIe compatibility spec of the card which is a good hint to distinguish old and new chips. In case it's PCIe 1.1 compatible, it's equipped with a RTL8111C or newer (probably RTL8111E), but in case it's only PCIe 1.0 compatible you'll get one of the outdated RTL8111B chips.

 

Mieze

Ok, thanks for the advise.

Does this card correspond to your description (photo) :

http://www.amazon.fr/DeLOCK-89357/dp/B00CE11N5E/ref=sr_1_1?s=computers&ie=UTF8&qid=1408109828&sr=1-1&keywords=Delock+89357#productDetails

41gYm1CEjhL.jpg

It's a bit more expensive than the one I wanted to buy, bit If you tested it successfully, I could do the effort :D

(I hop it will works on windows 8.1 ?)

Link to comment
Share on other sites

Yes, it's the same card I'm using.

 

Mieze

Great, I'll buy this one !

Thanks

For information, here what I got in the bios :

post-1379732-0-36151800-1408110667_thumb.jpg

post-1379732-0-79608300-1408110668_thumb.jpg

 

 

Until I receive the new ethernet card, I'll have to use windows, because it can connect, at 10Mbits... maybe it will be enough to play diabloIII

Link to comment
Share on other sites

I uploaded the prebuilt binary of version 1.2.2, which is identical with 1.2.2-dev4, to the download section and pushed the source code to GitHub.

 

Have fun!  :)

 

Mieze

  • Like 4
Link to comment
Share on other sites

As I already mentioned in the chatroom yesterday here is version 1.2.3-dev1 of the driver in which I reworked TSO. Now there is also support for TCP Segmentation Offload over IPv6. As always, prebuilt binaries and source code is included.

 

Good luck and have fun!

 

Mieze

 

EDIT: Please use version 1.2.3-dev2 which is available here: http://www.insanelymac.com/forum/topic/287161-new-driver-for-realtek-rtl8111/?p=2054741

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

Hello Mieze and thank you for your efforts.I have your driver for previous versions of OS X and it worked OK  but since i installed Yosemie I'm havig disconnections and hung problems so i reinstalled and tried other  drivers too but situation is the same so i can't use my installation any more.The card is RTL8111/8168B PCI Express Gigabit Ethernet controller and it is working OK in windows and in maverics was ok too , I'm using Clover an i have tried booting from S\L\E  and injecting from ..kexts\10.10 but sometimes work for few minutes then stops then i have to wait if it is going to work again.I noticed than when it is working and playng radio statons from itunes it does not stops when stops working from Safari so i tried another browser but ome thing.Please any suggestion

Link to comment
Share on other sites

@alexanderq: Please send me your kernel logs. I'm sorry, but I don't think that this is driver issue. Sounds more like a badly configured system or a NIC which is about to fail.

 

Mieze

Edited by Mieze
Link to comment
Share on other sites

  • There are still performance problems with regard to SMB in certain configurations. My tests indicate that Apple's Broadcom driver shows the same behavior with those configurations. Obviously it's a more general problem that is not limited to my driver.

 

I think this is a really working fix for Mavericks SMB problems:

sudo sysctl -w net.inet.tcp.delayed_ack=0

Put it in your startup and everything will work fine. I also lowered the MTU to the lowest possible value in the LAN hardware settings (in my case 1280). You can test your correct MTU settings by using a ping roundtrip:

ping -c 1 google.com

If there is a timeout, try to lower your MTU value until no error happens anymore.

 

Here is a startup item to be put into /Library/StartupItems (and then chown -R root:wheel on it):

SMBFixer.zip

Link to comment
Share on other sites

I also lowered the MTU to the lowest possible value in the LAN hardware settings (in my case 1280).

 

This is a really bad idea because it won't increase speed, it results in a lower performance due to increased protocol overhead. By the way the driver doesn't support MTU changes.

IOReturn RTL8111::setMaxPacketSize (UInt32 maxSize)
{
    IOReturn result = kIOReturnUnsupported;
    
done:
    return result;
}

Mieze

Edited by Mieze
Link to comment
Share on other sites

@alexanderq: Please send me your kernel logs. I'm sorry, but I don't think that this is driver issue. Sounds more like a badly configured system or a NIC which is about to fail.

 

Mieze

Here is the log and why is it working OK in windows and linux or previous os x.As for the system configuration i recently installed a fresh copy of Yosemite.

Thank you for the response.

Archive.zip

Link to comment
Share on other sites

@alexanderq: There is no sign of any driver issue in the kernel logs, no lost connections, no deadlocks. it's working properly. Obviously your problem isn't related to the driver at all.

 

Mieze

Link to comment
Share on other sites

You can test your correct MTU settings by using a ping roundtrip:

ping -c 1 google.com

If there is a timeout, try to lower your MTU value until no error happens anymore.

 

I'm sorry to be so harsh but this is complete nonsense.

 

Thank you for the answer but do you have any other suggestion solution to what do?

 

In case it's not a hardware issue your system is probably messed up. Try to reinstall or go back to Mavericks because you can't expect beta releases to work flawlessly.

 

Mieze

Link to comment
Share on other sites

Hello Mieze,

 

I am using your driver for quite some time now, and I want to tell you that I appreciate your work. Thanks!

 

Yesterday, I saw the new 1.2.3 dev1 version and I did an upgrade from 1.2.0. I have noticed that the latest version breakes the sleep on my system: the system enters in sleep mode just fine but it wakes up by itself after 30-35 seconds. WOL is disabled on System Preferences, and EEE via the plist. After rollback sleep worked as before, without any glitch.

On the /var/log/powermanagement/2014.08.21.asl I found:

 

Abnormal behaviour
Aug 21 17:33:36 localhost powerd[16] <Notice>: Summary- [System: BGTask] Using AC
Aug 21 17:33:51 localhost powerd[16] <Notice>: Software Sleep pid=109: Using AC 
Aug 21 17:33:55 localhost powerd[16] <Notice>: PMConnection: Response from com.apple.apsd is slow (powercaps:0x0)
Aug 21 17:33:55 localhost powerd[16] <Notice>: Clients requested wake events: None
Aug 21 17:34:35 localhost powerd[16] <Notice>: Wake [CDNVA] due to /HID Activity: Using AC
Aug 21 17:34:35 localhost powerd[16] <Notice>: Kernel: Response from Messages timed out (powercaps:0x9)
Aug 21 17:34:35 localhost powerd[16] <Notice>: Kernel: Response from powerd is slow (powercaps:0x0)

Driver version is 1.2.3
Aug 21 17:32:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: EEE support disabled.
Aug 21 17:32:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv4 segmentation offload enabled.
Aug 21 17:32:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv6 segmentation offload enabled.
Aug 21 17:32:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv6 checksum offload enabled.
Aug 21 17:32:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: Version 1.2.3 using interrupt mitigate value 0xcf58.
Aug 21 17:32:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: RTL8168B/8111B: (Chipset 1) at 0xffffff810a0d5000,  0:1f:d0:5a:xx: f
Aug 21 17:32:35 localhost kernel[0]: Ethernet [RealtekRTL8111]: Link up on en0, 1-Gigabit, Full-duplex, No flow-control


Working version, waked up via HID (USB mouse)
Aug 21 17:52:08 localhost powerd[17] <Notice>: Summary- [System: BGTask] Using AC
Aug 21 17:52:08 localhost powerd[17] <Notice>: Software Sleep pid=107: Using AC 
Aug 21 17:52:12 localhost powerd[17] <Notice>: PMConnection: Response from com.apple.apsd is slow (powercaps:0x0)
Aug 21 17:52:12 localhost powerd[17] <Notice>: Clients requested wake events: None
Aug 21 17:56:10 localhost powerd[17] <Notice>: Wake [CDNVA] due to UHC5/HID Activity: Using AC
Aug 21 17:56:10 localhost powerd[17] <Notice>: Kernel: Response from powerd is slow (powercaps:0x0)

Driver version 1.2.0
Aug 21 17:50:19 localhost kernel[0]: Ethernet [RealtekRTL8111]: EEE support disabled.
Aug 21 17:50:19 localhost kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv4 segmentation offload enabled.
Aug 21 17:50:19 localhost kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv6 checksum offload enabled.
Aug 21 17:50:19 localhost kernel[0]: Ethernet [RealtekRTL8111]: Using interrupt mitigate value 0xcf68.
Aug 21 17:50:19 localhost kernel[0]: Ethernet [RealtekRTL8111]: RTL8168B/8111B: (Chipset 1) at 0xffffff810924d000,  0:1f:d0:5a:xx: f
Aug 21 17:50:22 localhost kernel[0]: Ethernet [RealtekRTL8111]: Link up on en0, 1-Gigabit, Full-duplex, No flow-control
As you can see the wake reasons differ from the legit wake-up and the one that I think is caused by the driver.
Do you, please, have any suggestions?
 
Danke!
 
Link to comment
Share on other sites

@janel: Well, I haven't changed the sleep/wake related code in any way but version 1.2.3-dev1 was the first one I built with Xcode 5.1.1 instead of Xcode 4.6.3 which I used for earlier versions up to 1.2.2. As I had some trouble to get WoL working for my new Atheros driver using Xcode 5.1.1 too, I assume there is something wrong with the Apple provided power management framework in Xcode 5. I will take a look at it as soon as possible and report back.

 

Mieze

Link to comment
Share on other sites

:) Ok maybe I just accidentally thought it was related to this. But the other hint drastically increased my SMB connections, there are now as fast or faster than in SL.

 

Yes, changing the delayed_ack setting has an influence on SMB performance, but this is well known since 10.7 and has been mentioned in this thread a long time ago. Playing with the MTU and "checking" with a ping is pure nonsense because ping uses 64 Byte packets plus IP-header (20 Bytes) which will always traverse any network making the hint just a bad joke. :lol:

 

By the way, lowering the MTU will only have an influence on performance when routing comes into play and the packets have to pass a network with a lower MTU so that they need to get fragmented, i.e. when they leave your local network, which is usually not the typical scenario SMB is used for.

 

Mieze

Link to comment
Share on other sites

@janel: I have uploaded new binaries of 1.2.3-dev1 built with Xcode 4.6.3. I verified that sleep is working as expected on my test machine, with and without WoL enabled.

 

Mieze

Link to comment
Share on other sites

I am sorry to report that it is still bad:

Aug 22 11:29:31 localhost kernel[0]: Ethernet [RealtekRTL8111]: EEE support disabled.
Aug 22 11:29:31 localhost kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv4 segmentation offload enabled.
Aug 22 11:29:31 localhost kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv6 segmentation offload enabled.
Aug 22 11:29:31 localhost kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv6 checksum offload enabled.
Aug 22 11:29:31 localhost kernel[0]: Ethernet [RealtekRTL8111]: Version 1.2.3 using interrupt mitigate value 0xcf58.
Aug 22 11:29:31 localhost kernel[0]: Ethernet [RealtekRTL8111]: RTL8168B/8111B: (Chipset 1) at 0xffffff8109325000,  0:1f:d0:5a:xx: f
Aug 22 11:29:33 localhost kernel[0]: Ethernet [RealtekRTL8111]: Link up on en0, 1-Gigabit, Full-duplex, No flow-control
Aug 22 11:31:06 localhost kernel[0]: Ethernet [RealtekRTL8111]: Link down on en0
Aug 22 11:31:13 localhost kernel[0]: Ethernet [RealtekRTL8111]: Link up on en0, 1-Gigabit, Full-duplex, No flow-control

and

Aug 22 11:31:01 localhost powerd[16] <Notice>: Summary- [System: BGTask] Using AC
Aug 22 11:31:01 localhost powerd[16] <Notice>: Software Sleep pid=107: Using AC 
Aug 22 11:31:06 localhost powerd[16] <Notice>: PMConnection: Response from com.apple.apsd is slow (powercaps:0x0)
Aug 22 11:31:06 localhost powerd[16] <Notice>: Clients requested wake events: None
Aug 22 11:31:20 localhost powerd[16] <Notice>: Wake [CDNVA] due to /HID Activity: Using AC
Aug 22 11:31:20 localhost powerd[16] <Notice>: Kernel: Response from powerd is slow (powercaps:0x0)
The version that I have used for test is the one from #730

 

LE:
I have also tested with 1.2.2-dev4: same results. I can't find an 1.2.2 or 1.2.1 version before you have introduced ASPM features, to test. Perhaps is somehow related. Up until now 1.2.0 works the best for me.

Link to comment
Share on other sites

@janel: I checked the source code once again and I see no reason why this happens. Differences between 1.2.0 and 1.2.2 are minimal and most of them don't apply to chipset 1 at all. ASPM is a feature of some newer chipsets, the RTL8111B doesn't support it so that it's not affected in any way.

 

There is nothing wrong with version 1.2.0 for your chipset. It might be the best way to stay with this version. 

 

By the way, what happens when you disable wakeup events by PCI/PCIe devices in BIOS? Does this strange behavior persist?

 

Mieze

Link to comment
Share on other sites

Yes, everything related to wake-up is disabled in BIOS. Strange indeed. I'll stick with 1.2.0 for now...

 

Technically speaking this means that there is no wakeup event, the machine simply refuses to sleep as in Mavericks sleep is delayed.

 

Mieze

Link to comment
Share on other sites

Well, yes, somehow. But the system actually sleeps for a few seconds: hard drives, fans, graphics everything is off.

I have disabled the integrated card and installed an Intel PCIe: this one works exactly as the Realtek with 1.2.0 drivers: no glitch.

Aug 22 18:16:20 localhost powerd[16] <Notice>: Software Sleep pid=108: Using AC 
Aug 22 18:16:25 localhost powerd[16] <Notice>: PMConnection: Response from com.apple.apsd is slow (powercaps:0x0)
Aug 22 18:16:25 localhost powerd[16] <Notice>: Clients requested wake events: None
Aug 22 23:00:09 localhost powerd[16] <Notice>: Wake [CDNVA] due to UHC5/HID Activity: Using AC
Aug 22 23:00:09 localhost powerd[16] <Notice>: Kernel: Response from powerd is slow (powercaps:0x0)
Link to comment
Share on other sites

As version 1.2.3-dev1 contains a small bug, it reports TSO6 support to the OS even for the outdated RTL8111B although the chip doesn't support it, here is the fixed version 1.2.3-dev2 which I already put on my server for the long term stability test because I'm planning to make it the next official release provided there are no more bugs. All users are invited to test it.

 

Good luck and have fun!

 

Mieze

RTL8111- V1.2.3-dev2.zip

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

Try to get an add-in card with a RTL8111E because these chips work best and are well tested. I'm using this chip in my server with the driver since march 2013 and never lost connection. I'd recommend the Delock 89357 which I tested myself.

 

Avoid the old RTL8111B which is still found on many ultra cheap cards as these chips have more bugs and less offload functions.

 

In case the manufacturer doesn't mention the chip used, have a look at the PCIe compatibility spec of the card which is a good hint to distinguish old and new chips. In case it's PCIe 1.1 compatible, it's equipped with a RTL8111C or newer (probably RTL8111E), but in case it's only PCIe 1.0 compatible you'll get one of the outdated RTL8111B chips.

 

Mieze

 

 

Ok, thanks for the advise.

Does this card correspond to your description (photo) :

http://www.amazon.fr/DeLOCK-89357/dp/B00CE11N5E/ref=sr_1_1?s=computers&ie=UTF8&qid=1408109828&sr=1-1&keywords=Delock+89357#productDetails

41gYm1CEjhL.jpg

It's a bit more expensive than the one I wanted to buy, bit If you tested it successfully, I could do the effort :D

(I hop it will works on windows 8.1 ?)

 

 

Yes, it's the same card I'm using.

 

Mieze

 

After two weeks of waiting the card to be in my mail box, I finally got it !

I have deactivated the onboard ethernet card, installing the drivers for it in windows.

After shutting down the computer, and installed the delock on my computer, it works very well (on OS X Mavericks and windows) !

I don't try iMessage, but I finally got a working computer :D

Thanks for your advise.

(PS : I use the last driver you provided, 1.2.3-dev2 with Clover, for my Mavericks installation)

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...