Jump to content

New Driver for Realtek RTL8111

Realtek RTL8111 driver

  • Please log in to reply
839 replies to this topic

#241
RedEG6

RedEG6

    InsanelyMac Protégé

  • Members
  • Pip
  • 44 posts
  • Gender:Male

strange that this new driver appeared when my realtek rtl8111 stopped working for strange reasons. i can attest that it's not the port themselves or something else that has the problem because i'm posting this using the same system but running Win7.



#242
jsl

jsl

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 331 posts

Thanks for this new driver which's working for 10.8.5 and 10.9 DP5 with Asus Z87 Deluxe Dual's RTL8168 GBE networking card smoothly.



#243
Mieze

Mieze

    Giant Cat

  • Coders
  • 573 posts
  • Gender:Female
  • Location:Germany
  • Interests:Cats

I managed to adapt the driver to the new driver model introduced with 10.8 which supports QoS (packet scheduling) where the driver actively pulls packets from the transmit queue in order to send them out. Although I'm not sure if I got everything right, it seems to work. As of now I haven't discovered any problems. Performance is on a par with the traditional model, although the overhead of packet scheduling seems to make transmission a more CPU intensive task.

 

Polled receive works too but as there is a serious drop in network performance when polling is active I decided to disable this mode of operation in the attached code.

 

This is experimental code I'm posting as a proof of concept and an inspiration to other drivers programmers. In case you like to experiment with your system you might wan't to try it but if you want to have a reliable machine do not upgrade.

 

After installing the driver run ifconfig -v in Terminal and you'll see the difference. As always, feedback is welcome in particular with regard to the influence of packet scheduling on performance.

 

Good luck!

 

Mieze

 

Attached Files



#244
beta992

beta992

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 338 posts
  • Gender:Male

Thanks for your great work Mieze. I'm definitely going to try the new driver.

 

I also found more info about SMB. For some reason OSX ML has it own SMB/Samba implementation. This means that Apple doesn't have a license (anymore) for the 'official' SMB-protocol that Microsoft created.

Their are some problems with Apple implementation:

- Doesn't support all share flags (force user/force group isn't working, files being created as group 'staff')

- Performance issues

- Not able to mount a SMB-share

etc.

 

Their are a lot of complaints about SMB in ML. Luckily you can install Samba yourself with brew. At the moment I'm testing this setup.

I also notice that OSX 10.9 will bring SMB improvements, hopefully some issues can be resolved.

 

I'm happy that currently I don't have any *mac that is running ML, but still 'good old' Lion in a company where SMB-shares are used. :)

 

The reason for using SMB is that it works on almost every OS, were AFP doesn't.

 

Well going to keep you up-to-date. If you/others find more or other info, please let me know. :)



#245
Mieze

Mieze

    Giant Cat

  • Coders
  • 573 posts
  • Gender:Female
  • Location:Germany
  • Interests:Cats

ML Server uses a trick in order to improve SMB performance. I found this snippet in /etc/rc.server.firewall:

#
# Set TCP to ack every other packet. (RFC-compliant "compatibility" mode.)
# This should increase server performance, especially when connected
# to Windows clients.
#
sysctl -w net.inet.tcp.delayed_ack=2

The client version of ML uses 3 as the default value for delayed_ack. If you are experiencing bad performance with SMB you should give it a try.

 

Mieze

 



#246
beta992

beta992

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 338 posts
  • Gender:Male

ML Server uses a trick in order to improve SMB performance. I found this snippet in /etc/rc.server.firewall:

#
# Set TCP to ack every other packet. (RFC-compliant "compatibility" mode.)
# This should increase server performance, especially when connected
# to Windows clients.
#
sysctl -w net.inet.tcp.delayed_ack=2

The client version of ML uses 3 as the default value for delayed_ack. If you are experiencing bad performance with SMB you should give it a try.

 

Mieze

Read this for more info.



#247
Henry2010

Henry2010

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts
uhm I think I saw QoS on Windows before, right in the network config panel. I thought Mac handled that already.

#248
Onixs

Onixs

    Since 2007

  • Members
  • PipPipPipPipPipPipPip
  • 807 posts
  • Gender:Male
Hello

Is it possible to upload 32/64 SL version in here. tried compiling but failed on 32.
Thanks

#249
beta992

beta992

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 338 posts
  • Gender:Male

Hi Mieze,

 

I'm a little bit confused, is WOL working in combination with OS X 10.8?y

 

On Windows 8 I can wake-up the PC without any problems, I just need to start and shutdown from Windows first.

When I try the same thing in OS X, nothing happens.

 

Do you have an idea?

 

Thanks so far. :)



#250
Mieze

Mieze

    Giant Cat

  • Coders
  • 573 posts
  • Gender:Female
  • Location:Germany
  • Interests:Cats

Hi Mieze,

 

I'm a little bit confused, is WOL working in combination with OS X 10.8?y

 

On Windows 8 I can wake-up the PC without any problems, I just need to start and shutdown from Windows first.

When I try the same thing in OS X, nothing happens.

 

Do you have an idea?

 

Thanks so far. :)

 

Yes it's working but not with all chipsets. At least with one version of the RTL8111C WoL isn't working as wastez reported some time ago. Unfortunately he didn't told me which chipset he is using and I can't reproduce the behavior with my RTL8111E (chipset 16).

 

Please take a look at the kernel messages and post the chipset. Do you have a linux installation on your Hackintosh too? In case you have, could you please download Realtek's r8168 driver from their homepage and test if WoL is working with it under linux? You can get the source code of the r8168 driver here: http://www.realtek.c...3&GetDown=false

 

Mieze



#251
beta992

beta992

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 338 posts
  • Gender:Male

Yes it's working but not with all chipsets. At least with one version of the RTL8111C WoL isn't working as wastez reported some time ago. Unfortunately he didn't told me which chipset he is using and I can't reproduce the behavior with my RTL8111E (chipset 16).

 

Please take a look at the kernel messages and post the chipset. Do you have a linux installation on your Hackintosh too? In case you have, could you please download Realtek's r8168 driver from their homepage and test if WoL is working with it under linux? You can get the source code of the r8168 driver here: http://www.realtek.c...3&GetDown=false

 

Mieze

Thanks for your (quick) response.

 

I will try to see if compiling works on ArchLinux, does the kernel driver not support WOL?

 

Chipset: Realtek® 8111E

 

I will let you know. :)



#252
Mieze

Mieze

    Giant Cat

  • Coders
  • 573 posts
  • Gender:Female
  • Location:Germany
  • Interests:Cats

I will try to see if compiling works on ArchLinux, does the kernel driver not support WOL?

 

 

My driver is based on Realtek's r8168 driver. I asked for the test in order to find out if it's an inherited weakness or if I have to review my own code.

 

Chipset: Realtek® 8111E

 

I need the exact chipset number because there are 3 different versions of the 8111E (chipsets 14, 15 and 16).

 

Mieze



#253
Mieze

Mieze

    Giant Cat

  • Coders
  • 573 posts
  • Gender:Female
  • Location:Germany
  • Interests:Cats

Users having problems with WoL (system does not wake up) might try the attached version and report back if it resolves the issue.

 

Good luck!

 

Mieze

 

Attached Files



#254
beta992

beta992

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 338 posts
  • Gender:Male

Users having problems with WoL (system does not wake up) might try the attached version and report back if it resolves the issue.

 

Good luck!

 

Mieze

Thanks Mieze, will try to provide you my chipset type today.. stupid question: how to find out?



#255
Mieze

Mieze

    Giant Cat

  • Coders
  • 573 posts
  • Gender:Female
  • Location:Germany
  • Interests:Cats

Thanks Mieze, will try to provide you my chipset type today.. stupid question: how to find out?

 

You will find a line like

Ethernet [RealtekRTL8111]: RTL8168B/8111B: (Chipset 1) at 0xffffff81d4ec6000

in /var/log/system.log.

 

Please also try the version I posted yesterday!!!

 

Mieze



#256
beta992

beta992

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 338 posts
  • Gender:Male

You will find a line like

Ethernet [RealtekRTL8111]: RTL8168B/8111B: (Chipset 1) at 0xffffff81d4ec6000

in /var/log/system.log.

 

Please also try the version I posted yesterday!!!

 

Mieze

30-08-13 16:01:52,000 kernel[0]: Ethernet [RealtekRTL8111]: RTL8168E/8111E: (Chipset 14) at 0xffffff******, ...


#257
Mieze

Mieze

    Giant Cat

  • Coders
  • 573 posts
  • Gender:Female
  • Location:Germany
  • Interests:Cats

Users having problems with WoL (system does not wake up) might try the attached version and report back if it resolves the issue.

Is there really no one with WoL problems who tried the code I posted a few days before?

 

Mieze

 

 

PS: I will be in Spain to visit a friend next week so that I won't be able to respond to support requests between the 9th and the 16th of september.



#258
beta992

beta992

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 338 posts
  • Gender:Male

Is there really no one with WoL problems who tried the code I posted a few days before?

 

Mieze

 

 

PS: I will be in Spain to visit a friend next week so that I won't be able to respond to support requests between the 9th and the 16th of september.

Hi Mieze,

 

Not a big issue, but I tested WOL but it didn't work (with the latest posted version). It simple doesn't wake-up when shutting-down in OS X. I read some posts from Linux users, they have the same issue.

It seems that something isn't set, which is being set in Windows. I don't remember the flag, but I will try to Google..

 

Anyway, hope you have a good time in Spain and till the 17th of september. :)



#259
BiTRiP

BiTRiP

    InsanelyMac Sage

  • Donators
  • 309 posts
  • Gender:Not Telling

With this kext I'm unable to use kernel flag npci=0x2000 or 0x3000. I get KP.

Without it works but no verbose output after [PCI Configuration]



#260
Mieze

Mieze

    Giant Cat

  • Coders
  • 573 posts
  • Gender:Female
  • Location:Germany
  • Interests:Cats

With this kext I'm unable to use kernel flag npci=0x2000 or 0x3000. I get KP.

Without it works but no verbose output after [PCI Configuration]

 

As I didn't have much time to spent on that issue I wasn't able to find out what exactly npci=0x2000 does but I read that it influences the configuration of PCI bridge devices probably enabling/disabling prefetchability of the memory space behind the bridge. As the driver uses the NICs memory mapped address space in order to access the chip this might explain why there is an issue.

 

A quick search on that topic seems to indicate that actually only a few systems really need it in order to boot and that it could be a DSDT related issue. I assume that you are using a bootloader of the Chameleon family? Have you also tried to boot your system with Clover?

 

Mieze

 

Mieze







Also tagged with one or more of these keywords: Realtek, RTL8111, driver


2 user(s) are reading this topic

1 members, 1 guests, 0 anonymous users


© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy