Jump to content

New Driver for Realtek RTL8111

Realtek RTL8111 driver

  • Please log in to reply
790 replies to this topic

#21
Mieze

Mieze

    Giant Cat

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

Would it be possible to add support for RTL8188XX (e.g RTL8188CE)?

No, because these are wireless NICs. They are completely different.

Mieze

#22
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 274 posts
  • Gender:Male
I've installed your driver to both hacks to see how it goes. Had problem installing it at first: driver was loaded and connected to device, but net was not working, said that cable is not connected. Somehow got resolved by few shutdowns/restarts/reinstalls/deleting and adding ethernet - not sure what helped. But works very nice now.

Thank you for your work!

#23
rvxtm

rvxtm

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 109 posts
  • Gender:Male
  • Location:Timisoara, Romania
  • Interests:Tech, Science, Biology, OSX86 stuff

This could be a problem with the kernel cache, because /Extra/Extensions is usually not taken into account when the kernel cache is recreated by Apple provided tools. Better install it in /S/L/E to avoid trouble!

Mieze


Thanks for posting this. I just added the information to the troubleshooting section.

Mieze


On my installer USB, i have the kexts in /extra , with the kernel patcher module.
My problem is that on the first boot, osx uses the audio kext, fakesmc, sata (all inside /extra) only realtek kexts does not load, only after i copy it to s/l/e. My wish was to have the internet on first boot, to configure osx from the initial wizard.

I've tried your driver, the download is perfect, but i have around 20kb/s upload if i try to put a file on a server or on my network, something is wrong with the upload.

#24
Mieze

Mieze

    Giant Cat

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

On my installer USB, i have the kexts in /extra , with the kernel patcher module.
My problem is that on the first boot, osx uses the audio kext, fakesmc, sata (all inside /extra) only realtek kexts does not load, only after i copy it to s/l/e. My wish was to have the internet on first boot, to configure osx from the initial wizard.

To copy the driver anywhere is not enough. You'll have to repair it's permissions or it will never be used.

I've tried your driver, the download is perfect, but i have around 20kb/s upload if i try to put a file on a server or on my network, something is wrong with the upload.

Please follow the instructions in the troubleshooting section. If the problem persists report back with debug data from /var/log/system.log (all driver related messages), netstat -s output and your OS X version, CPU and mainboard.

Mieze

#25
DOCa Cola

DOCa Cola

    InsanelyMac Protégé

  • Members
  • PipPip
  • 78 posts
  • Gender:Male
Thanks for your work. I have replaced the Lnx2 Realtek driver i have been using with yours. I have had rare problems with the Lnx2 driver where out of the blue the whole network was just gone. The transition went smooth (just followed your instructions). Using a 8111F on a P8H77-I. Will see how it performs long term! So far - all looking good.
Thanks! :)

#26
rvxtm

rvxtm

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 109 posts
  • Gender:Male
  • Location:Timisoara, Romania
  • Interests:Tech, Science, Biology, OSX86 stuff
Attached File  netstat.txt   10.42KB   13 downloads

Here is a quick look at my netstat with the new driver, i'm back on lnx2mac one, Tried the debug version and still very slow upload speed, the download is normal.

I took a look in my system.log and no info regarding realtek, only that a link has been made with 100mbps and that i have EEE support on the controler, no errors, no nothing.

#27
Mieze

Mieze

    Giant Cat

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

Attached File  netstat.txt   10.42KB   13 downloads

Here is a quick look at my netstat with the new driver, i'm back on lnx2mac one, Tried the debug version and still very slow upload speed, the download is normal.

I took a look in my system.log and no info regarding realtek, only that a link has been made with 100mbps and that i have EEE support on the controler, no errors, no nothing.

Hello RVXTM,

the netstat output shows evidence for a significant packet loss as the number of retransmissions compared to the total number of packets is extremely high:

tcp:
80345 packets sent
3764 data packets (6492888 bytes)
2589 data packets (1618611 bytes) retransmitted

This would also explain the low upload speed. The log messages are ok,.

Unfortunately you are the first user with an RTL8111C (RTL8168C/8111C: (Chipset 5)) to test the driver so that I have no experience with that chip but the issue reminds me of a report from a user with a MSI Z77MA-G45. Maybe you should take a look at this: http://www.tonymacx8...html#post556468

I would suggest to disable checksum offload as he did and see if it helps. In case it doesn't, check the network statistics of the machine on the other side. Especially look out for bad packets. Using Wireshark to create a packet dump might also be helpful.

By the way, are you using the driver on the GA EP-45-EXTREME like your signature suggests? Are both ports connected to the switch? What is their configuration (DHCP, static IP or ...)?

Mieze

#28
rvxtm

rvxtm

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 109 posts
  • Gender:Male
  • Location:Timisoara, Romania
  • Interests:Tech, Science, Biology, OSX86 stuff

Hello RVXTM,

the netstat output shows evidence for a significant packet loss as the number of retransmissions compared to the total number of packets is extremely high:

tcp:
80345 packets sent
3764 data packets (6492888 bytes)
2589 data packets (1618611 bytes) retransmitted

This would also explain the low upload speed. The log messages are ok,.

Unfortunately you are the first user with an RTL8111C (RTL8168C/8111C: (Chipset 5)) to test the driver so that I have no experience with that chip but the issue reminds me of a report from a user with a MSI Z77MA-G45. Maybe you should take a look at this: http://www.tonymacx8...html#post556468

I would suggest to disable checksum offload as he did and see if it helps. In case it doesn't, check the network statistics of the machine on the other side. Especially look out for bad packets. Using Wireshark to create a packet dump might also be helpful.

By the way, are you using the driver on the GA EP-45-EXTREME like your signature suggests? Are both ports connected to the switch? What is their configuration (DHCP, static IP or ...)?

Mieze


I am using that MB, only port 0 connected to a router with DHCP ip allocations.

#29
Mieze

Mieze

    Giant Cat

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

I am using that MB, only port 0 connected to a router with DHCP ip allocations.

Ok, the interesting question is where did all the lost packets go to and why do they get lost? Did you follow the installation instructions?

Mieze

#30
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 274 posts
  • Gender:Male
Have an issue: when I boot to Windows and then restart into OSX (just restart, warm reboot, no shutdown), then net is not working any more. Requires shutdown and fresh start to get it working again.

Windows -> restart into OSX - not working
Windows -> restart into Ubuntu -> restart into OSX - working
OSX (when net is working) -> restart into OSX - still working

Logs: Attached File  DebugLogs.zip   12.07KB   5 downloads
When not working:
ip:
543 total packets received
327 bad header checksums


#31
Mieze

Mieze

    Giant Cat

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

Have an issue: when I boot to Windows and then restart into OSX (just restart, warm reboot, no shutdown), then net is not working any more. Requires shutdown and fresh start to get it working again.

Windows -> restart into OSX - not working
Windows -> restart into Ubuntu -> restart into OSX - working
OSX (when net is working) -> restart into OSX - still working

When not working:

ip:
543 total packets received
327 bad header checksums


Hello dmazar,

thanks for your feedback. The extremely high number of packets with bad header checksums might probably indicate that checksum offload isn't working properly after you have used Windows. As all drivers (Win, Linux and OS X) load firmware into the NIC, I assume that the Windows driver leaves the NIC with settings that are incompatible with the OS X driver and don't get replaced completely. Unfortunately the firmware has been provided by Realtek without any documentation so that there is little I can do to resolve the issue. I guess the problem doesn't show up when you shut down the system after using windows and do a cold boot into OS X?

Mieze

#32
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 274 posts
  • Gender:Male
Yes, cold boot solves the problem. Or ... booting into Linux and then warm reboot into OSX also does the trick. Looks like driver in my Ubuntu is able to "fix" after Windows.

#33
Mieze

Mieze

    Giant Cat

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

Yes, cold boot solves the problem. Or ... booting into Linux and then warm reboot into OSX also does the trick. Looks like driver in my Ubuntu is able to "fix" after Windows.

At least we have a workaround that is really easy to apply. I will add this information to the troubleshooting section.

Mieze

#34
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 274 posts
  • Gender:Male
Did some more tests ...

If I am in Windows and then shutdown, wait few seconds and turn the comp on and boot to OSX -> it does not work. I have to shut it down from OSX again and then start into OSX and then it works.

Tested sequences from Windows:
1. Windows -> soft restart into Ubuntu -> soft restart into OSX, net works
2. Windows -> soft restart into OSX (net does not work) -> soft restart into OSX, net does not work
3. Windows -> soft restart into OSX (net does not work) -> shutdown and start into OSX, net works
4. Windows -> shutdown and start into OSX (net does not work) -> shutdown and start into OSX, net works

From sequences 3 and 4: Simple shutdown from Windows is not enough. Your driver needs to be started on my controller twice. At first boot (warm or cold) it does something, but not enough. Second cold restart (shutdown/start) is needed, and then it works fine.

Is there anything that can be learned from this and done?

Plus, it looks to me that the same thing is happening when removing some other driver from OSX and installing this one - required several restarts/shutdowns to get it working after install.

#35
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 274 posts
  • Gender:Male
Tested Slice's version: http://www.insanelym...20#entry1900418
Same issue, but slightly worse regarding Windows.

#36
polkaholga

polkaholga

    InsanelyMac Geek

  • Donators
  • 151 posts
  • Gender:Male
  • Location:Otherland

Finally I can use WOL !!
My system have RTL8111E (GA X58A-UD3R motherboard) chip, it works perfectly now.


That sounds really promising since i have the same chip onboard !

@ Mieze

Thank you for this driver, can't wait for testing it when back at my hack next weekend...
I got a bunch of warnings about "unused variable flags" when i compiled for 10.7 with Xcode4.5.2.
Should i use 4.4.1 or is there nothing to worry about ? :worried_anim:

#37
Mieze

Mieze

    Giant Cat

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

I got a bunch of warnings about "unused variable flags" when i compiled for 10.7 with Xcode4.5.2.
Should i use 4.4.1 or is there nothing to worry about ? :worried_anim:

No need to worry. I will comment out those lines in the next release to get rid of the warnings.

Mieze

#38
Mieze

Mieze

    Giant Cat

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

Did some more tests ...

If I am in Windows and then shutdown, wait few seconds and turn the comp on and boot to OSX -> it does not work. I have to shut it down from OSX again and then start into OSX and then it works.

Tested sequences from Windows:
1. Windows -> soft restart into Ubuntu -> soft restart into OSX, net works
2. Windows -> soft restart into OSX (net does not work) -> soft restart into OSX, net does not work
3. Windows -> soft restart into OSX (net does not work) -> shutdown and start into OSX, net works
4. Windows -> shutdown and start into OSX (net does not work) -> shutdown and start into OSX, net works

From sequences 3 and 4: Simple shutdown from Windows is not enough. Your driver needs to be started on my controller twice. At first boot (warm or cold) it does something, but not enough. Second cold restart (shutdown/start) is needed, and then it works fine.

Is there anything that can be learned from this and done?


As the chip supports WoL it uses standby power so that it won't be off completely until you pull the plug off the wall or flick the PSU's switch. Maybe it's a firmware related problem?

Plus, it looks to me that the same thing is happening when removing some other driver from OSX and installing this one - required several restarts/shutdowns to get it working after install.


I had the suspect that the lnx2mac driver also causes problems when you switch over to my driver. This might be a firmware issue but it could be as well that the driver left something in the system preferences that is the reason for the strange behavior. As my driver is the only Realtek driver for OS X that makes use of the chip's advanced features (checksum offload and TCP segmentation offload) in order to improve performance, it's interaction with the network stack is far more complex.

Here is another funny thing I discovered during my tests. I removed the lnx2mac driver from my test system and installed my driver. Although it was working I noticed that https connections to Apple websites. e. g. iCloud, App Store, iTunes Store and developer.apple.com stopped working. The strange thing was that replies to connection requests from those servers where considered to have a bad IP header checksums by the NIC but everything else, including https connections to other servers, was working flawlessly. Ironically the problem disappeared after I wiped out the disk, reinstalled OS X and my driver. This time everything was working fine.

After all I came to the conclusion that rx checksum offload is responsible for many of the known problems. In the next release I will address this issue and change the way received packets are handled when checksum verification in hardware failed. Instead of marking these packets as bad, they will be considered as unchecked letting the network stack repeat verification in software. So far this strategy seems to work without speed impacts and might even be a practical solution for boards with broken NICs like the MSI Z77MA-G45.

Mieze

Tested Slice's version: http://www.insanelym...20#entry1900418
Same issue, but slightly worse regarding Windows.

That's funny! I've been in a personal conversation with Slice during the last days. He was trying to convince me that my driver has a power management issue causing this kind of trouble and that he already found a solution for his driver. Obviously the issue isn't related to power management at all but as we both started with Realtek's linux driver 8.035.0 its no wonder that both drivers are affected. Anyway, thanks for the information. At least we know now that PM is not the place to look for in order to find a solution.

Mieze

#39
undeadlegion1

undeadlegion1

    InsanelyMac Protégé

  • Members
  • Pip
  • 1 posts

Here is another funny thing I discovered during my tests. I removed the lnx2mac driver from my test system and installed my driver. Although it was working I noticed that https connections to Apple websites. e. g. iCloud, App Store, iTunes Store and developer.apple.com stopped working. The strange thing was that replies to connection requests from those servers where considered to have a bad IP header checksums by the NIC but everything else, including https connections to other servers, was working flawlessly. Ironically the problem disappeared after I wiped out the disk, reinstalled OS X and my driver. This time everything was working fine.

After all I came to the conclusion that rx checksum offload is responsible for many of the known problems. In the next release I will address this issue and change the way received packets are handled when checksum verification in hardware failed. Instead of marking these packets as bad, they will be considered as unchecked letting the network stack repeat verification in software. So far this strategy seems to work without speed impacts and might even be a practical solution for boards with broken NICs like the MSI Z77MA-G45.

Mieze


Glad you were able to figure out this bug! Let me know if you need any help testing

#40
dmazar

dmazar

    InsanelyMac Sage

  • Coders
  • 274 posts
  • Gender:Male

As the chip supports WoL it uses standby power so that it won't be off completely until you pull the plug off the wall or flick the PSU's switch. Maybe it's a firmware related problem?

Tested this: booted to Windows, then shutdown, then unplugged comp from power for 10-15 secs, then started OSX - and all the same as before, net is connected, but not usable. Required another shutdown and start into OSX to get it working.

I'm willing to try to to compare initalization with r8169 Linux driver (https://github.com/t...realtek/r8169.c). What should I start with or what to try to compare? Carefully go through all init process or go straight to this rtl8168_hw_phy_config()? r8169 identifies my card as RTL_GIGA_MAC_VER_33, uses rtl8168e_1_hw_phy_config() and uses FIRMWARE_8168E_2 (tl_nic/rtl8168e-2.fw, have it from Ubuntu). What is a chance to brick my controller by experimenting with this?

EDIT: Just an update: shutdown after Windows and unplugging the power and ethernet cable and waiting for 30 secs did the trick. Next boot to OSX resulted in working net.





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


3 user(s) are reading this topic

1 members, 2 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