Jump to content

New Driver for Realtek RTL8111


Mieze
1,592 posts in this topic

Recommended Posts

ok. cheers. perhaps modifying the bios a bit may help. (but of course, that isn't what this thread about.) :)

You might want to send me an IOReg dump. It might help me to find out, what the BIOS has done to the NIC.

 

Mieze

Link to comment
Share on other sites

I don't have any problem. but if it would help other people, here it is. Cheers :w00t:

No, I need an IOReg dump of somebody with a non-working driver, but thank you for making the effort anyway.

 

Mieze

Link to comment
Share on other sites

  • 3 weeks later...

Hi Mieze, thank's for this good work!

 

For me with this driver i never had problem, and i already integrated it inside my Mobo Bios because i use Ozmosis bootloader, and it work like charm! Because of size problem in my Mobo which have a 64 Mb bios chip, and i need to add more files as AppleALC, so i hope if i can decrease the size of the RTL kext!

 

Now my question is, can i build one with only support for my RTL8169E-VL/8111E-VL Ethernet and RTL8188CU Wireless, i'm happy with the current one which its compressed size is 135 Kb, but it will be a great pleasure for me if i can decrease its size with Xcode before generating its FFS file!

 

Thanks again for your good work, and best regards ^_^ !

Edited by ammoune78
Link to comment
Share on other sites

Now my question is, can i build one with only support for my RTL8169E-VL/8111E-VL Ethernet and RTL8188CU Wireless, i'm happy with the current one which its compressed size is 135 Kb, but it will be a great pleasure for me if i can decrease its size with Xcode before generating its FFS file!

In theory it's possible but extremely laborious as you would have to remove a lot of code and the worst thing of all is that this procedure would have to be redone after every update which is nothing I do recommend.

 

Mieze

  • Like 3
Link to comment
Share on other sites

Hello, the driver is working (Im typing :)   but from time to time the network is freezing (StarCraft 2). Then I have to power off and on my Network Switch. It's not a switch issue (tested some different switches). 

 

I'm using Sierra 10.12.2 newest update and the RTL8111.kext 2.2.1   (with Yosemite I had not this issue.)

 

I think thats the network "upload" freeze bug?

 

How I can prevent a network freeze?

Link to comment
Share on other sites

Hello, the driver is working (Im typing :)   but from time to time the network is freezing (StarCraft 2). Then I have to power off and on my Network Switch. It's not a switch issue (tested some different switches). 

 

I'm using Sierra 10.12.2 newest update and the RTL8111.kext 2.2.1   (with Yosemite I had not this issue.)

 

I think thats the network "upload" freeze bug?

 

How I can prevent a network freeze?

I don't know what you are talking about because there is no such bug in the driver. If you want help, please send me your kernel logs showing at least one incident.

 

Mieze

Link to comment
Share on other sites

  • 1 month later...

Mieze,

I saw freshier sources (8.043) at realtek site. Anything useful in it?

I compared the new Linux source against the previous version and found nothing which would justify an update as most of the changes are related to changes inside the Linux kernel.

 

Mieze

  • Like 2
Link to comment
Share on other sites

I don't know what you are talking about because there is no such bug in the driver. If you want help, please send me your kernel logs showing at least one incident.

 

Mieze

EDIT 16-05-2017: As of Sierra 10.12.4 the script included below causes a disconnect on DHCP renew. Changing the MTU to 1453 instead of the default 1500 seems to reduce the problem significantly for me. It still occurs from time to time but no where near the amount as before. You can change the MTU through Sys Pref > Network > Advanced > Hardware > Configure: Manually > MTU: Custom change value in field to 1453.

 

OLD POST:

I'm experiencing possibly the same problem. I believe it also has been reported earlier in this thread but the person opted for placing a new network card. The issue I'm having is that my network connection gets dropped which seems to match what these two people describe. There are no significant kernel messages that give any direction in debugging this related to Ethernet or networking. I have tested the connection using a different switch, network cable and operating system and the issue only pops up in OSX no other computer on the network exhibits this issue. The issue also presented itself more recently since El Capitan and Sierra but it could also be related to what I'm describing next since I started using those services more often since those installations. I've tried three versions of your driver (v2.0.0 - v2.1.0d1 - v2.2.1) and they all result in this issue. I've also recreated my DSDT just incase. 

 

The issue seems to pop up whenever I play Spotify or YouTube videos for a length of time and then leave the computer idle for a while. This is not always the case though sometimes it occurs while I'm surfing and opening multiple websites quickly or browsing while having Spotify stream music. It seems the connection to the Internet is lost and possibly related to routing. I have checked all the bios settings related to any power savings/management as you described and even tried different variations of them. Under Sys Pref it shows the NIC is still connected with full DHCP lease assigned (IP, gateway, dns etc.). I've also tried setting duplex to different values manually and changing MTU. Pinging IP addresses/hosts on the Internet doesn't work, what does work is pinging the internal network. What also keeps working is any NFS, SMB or AFP connections on the LAN as I never have problems when this issue occurs while streaming video or dropping SSH connections to my NAS. To solve the issue clicking DHCP renew or using a command line version of this will resolve the Internet connectivity issue. I can't find anything unusual in the router log either. 

 

The issue has really been doing my head in as I've made many attempts and invested lots of time trying to diagnose the problem but there are no clear leads I can find at least. I can find console messages related to HTTP failures but those are a by product of what's causing this issue.

error 21:59:17.582157 +0100 apsd NSURLConnection finished with error - code -1001
error 21:59:17.582628 +0100 apsd HTTP load failed (error code: -999 [1:89])
error 21:59:48.579997 +0100 apsd NSURLConnection finished with error - code -1001
error 21:59:48.580686 +0100 apsd HTTP load failed (error code: -999 [1:89])
error 22:00:19.002001 +0100 com.apple.preference.network.remoteservice ERROR: Setting <private> as the first responder for window <private>, but it is in a different window ((null))! This would eventually crash when the view is freed. The first responder will be set to nil.
<private>
error 22:00:22.584382 +0100 apsd NSURLConnection finished with error - code -1001
error 22:00:22.584916 +0100 apsd HTTP load failed (error code: -999 [1:89])
error 22:00:53.580467 +0100 apsd NSURLConnection finished with error - code -1001
error 22:00:53.581062 +0100 apsd HTTP load failed (error code: -999 [1:89])
error 22:08:11.965391 +0100 helpd nw_socket_connect connectx failed: [64] Host is down
error 22:08:11.965733 +0100 helpd TIC TCP Conn Failed [2:0x7ffe4292eb40]: 1:64 Err(64)
error 22:08:11.966113 +0100 helpd HTTP load failed (error code: -1004 [1:64])
error 22:08:11.966179 +0100 helpd NSURLConnection finished with error - code -1004
In the end since I've been unable to resolve the issue I've opted for creating a launchd script placed in /Library/LaunchDaemons/com.dith.dhcprenew (sudo nano -w /Library/LaunchDaemons/com.dith.dhcprenew.plist from the terminal). Place the below contents in com.dith.dhcprenew, you might need to change en0 to a different network interface if yours is not assigned to en0. Followed by sudo launchctl load /Library/LaunchDaemons/com.dith.dhcprenew.plist to load the script.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.dith.dhcprenew</string>


  <key>ProgramArguments</key>
  <array>
    <string>bash</string>
    <string>-c</string>
    <string>echo "add State:/Network/Interface/en0/RefreshConfiguration temporary" | sudo scutil</string>
  </array>


  <key>Nice</key>
  <integer>1</integer>


  <key>StartInterval</key>
  <integer>300</integer>


  <key>RunAtLoad</key>
  <true/>


  <key>StandardErrorPath</key>
  <string>/tmp/dhcp-renew.err</string>


  <key>StandardOutPath</key>
  <string>/tmp/dhcp-renew.out</string>
</dict>
</plist>

What this script does is issue a DHCP renew every 5 minutes. The DHCP renew does not cause a drop in connection so there should be no noticeable impact. I started with 5 minutes (StartInterval 300 seconds) but will lower this value if the issue still interferes too much with my computer use. 

Link to comment
Share on other sites

  • 4 weeks later...

Hello Mieze, I've created a separate thread for this problem i'm having but now I realize that it probably is best to post it here. I'm copying its content here and deleting it.

 

Hello guys, I'm using a RTL8111 chip with mieze's kexts on yosemite, but altough it recognizes properly it always says that the ethernet cable is unplugged, on the last system.log entries it says:

 

 

Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: PCIe ASPM support disabled.
Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: EEE support enabled.
Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: RxPoll support enabled.
Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv4 segmentation offload enabled.
Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv6 segmentation offload enabled.
Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: TCP/IPv6 checksum offload enabled.
Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: Version 2.2.1 using interrupt mitigate value 0xcf58. Please don't support tonymacx86.com!
Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: PCI power management capabilities: 0xffc3.
Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: PME# from D3 (cold) supported.
Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: PCIe link capabilities: 0x00477c11, link control: 0x0040.
Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: RTL8168G/8111G: (Chipset 20) at 0xffffff81085cd000, 40:8d:5c:80:4e:3f
Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: Device is WoL capable.
Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: MSI interrupt index: 1
Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: kIOEthernetWakeOnMagicPacket added to filters.
Feb 21 13:24:32 localhost kernel[0]: Ethernet [RealtekRTL8111]: Already in power state 1.
Feb 21 13:25:48 localhost kernel[0]: Ethernet [RealtekRTL8111]: No medium selected. Falling back to autonegotiation.

 

I've uploaded the entire system.log file here.

 

PS: Use only the Feb 21 entries.

PS2: On windows using 3DPNet, it recognizes my chipset as 8111C and on this kext it recognizes as 8111G

PS3: On mavericks with the same kext (Mieze 1.2.3) it runs perfecly

 

Update: With this driver it recognizes the cable, but can't get any IP Addresses.

Link to comment
Share on other sites

@redbaty: Which mainboard do you have?

 

EDIT: Update your machine to Sierra (or at least El Capitan) and try the latest Version of the driver. If it doesn't work, we'll see what I can do for you but I'm not going to waste my time with Yosemite. Sorry, but this would be too much work.

 

Mieze

Edited by Mieze
Link to comment
Share on other sites

I installed the kext and the network card has been recognized, but has trouble connecting to the Internet. Sometimes resetting the modem or by unplugging and plugging the power cord starts to function properly. I enclose two pictures that show the error. the MB in the integrated network card is Realtek RTL8111h, I added a wireless PCI TPLINK TL-WN881ND and has no problems
sorry for my bad english (google translator)

post-1397905-0-99974800-1488030918_thumb.png

post-1397905-0-79203500-1488030925_thumb.png

Link to comment
Share on other sites

@meize

hello i have same issue it shows ethernet but internet doesnt work.

How can i dump information for you?

-PCI Devices-
Ethernet controller        : Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
 

Link to comment
Share on other sites

Hello @meize, 

I talk with you about slow upload on this driver (#895), but I was able to solve it with disabling TSO. Now I have changed motherboard, but it is equipped with same LAN chipset RTL8111C. I have installed latest driver, and again I have problem with slow upload. 

I have already disabled TSO4 and TSO6 in driver info.plist file and recreated cache with "kext Utiliy".

 

here are iper3 logs:

iperf3 -c nas -t20 -i5 -R
Connecting to host nas, port 5201
Reverse mode, remote host nas is sending
[  5] local 192.168.2.10 port 49266 connected to 192.168.2.5 port 5201
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-5.00   sec   557 MBytes   934 Mbits/sec
[  5]   5.00-10.00  sec   557 MBytes   934 Mbits/sec
[  5]  10.00-15.00  sec   557 MBytes   934 Mbits/sec
[  5]  15.00-20.00  sec   557 MBytes   934 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  5]   0.00-20.00  sec  2.18 GBytes   935 Mbits/sec   18             sender
[  5]   0.00-20.00  sec  2.18 GBytes   934 Mbits/sec                  receiver

iperf Done.



iperf3 -c nas -t20 -i5
Connecting to host nas, port 5201
[  5] local 192.168.2.10 port 49758 connected to 192.168.2.5 port 5201
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-5.00   sec  72.9 MBytes   122 Mbits/sec
[  5]   5.00-10.00  sec  62.6 MBytes   105 Mbits/sec
[  5]  10.00-15.00  sec  62.4 MBytes   105 Mbits/sec
[  5]  15.00-20.00  sec  61.6 MBytes   103 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-20.00  sec   259 MBytes   109 Mbits/sec                  sender
[  5]   0.00-20.00  sec   259 MBytes   109 Mbits/sec                  receiver

Any help ? 

Thank You 

Link to comment
Share on other sites

Howdy

 

Just did a fresh install of Sierra on my old hackintosh that previously had 10.6.8.

I have EP45-UD3P and Trendent TEG-PCITXR HW:3.1R.  I used ##### to try adding the realtek drivers,

but can't seem to get the network to work (it does work via USB adapter).

 

Any reason why this network card will not work with Sierra & these drivers?

Am I doing something dumb?

Should I just buy a different card to make it easier?

Or just be happy it works via USB and wait until I can afford some new hardware?  :)

 

Here is attempt to try the 2.1.0d1 version.  I think I tried all three on ##### 9 (deleting old directories in between)

Realtek RTL8168C/8111C PCI Express Gigabit Ethernet:

  Name: ethernet
  Type: Ethernet
  Bus:  PCI
  Vendor ID:    0x10ec
  Device ID:    0x8168
  Subsystem Vendor ID:  0x1458
  Subsystem ID: 0xe000
  Revision ID:  0x0002
  Link Width:   x1
  BSD name:     en1
  Kext name:    RealtekRTL8111.kext
  Location:     /Library/Extensions/RealtekRTL8111.kext
  Version:      2.1.0d1


Update:  Surely there was a reason I had originally installed that trendnet network card, but I just plugged cable into onboard LAN and it worked.  I also noted that previously with OSX 10.6.8, the trendnet network card was using AppleRTL8169Ethernet.kext.  I am not sure how to get this for Sierra.

logshow.txt.gz

Link to comment
Share on other sites

Hey Maize,

 

I have been using version 2.2.1d3 on mavericks which I got with git checkout about a year ago and built it myself.  See the following post around that time.  It has been working great but recently my machine has started dropping the network connection every few days and forcing me to reboot to get it back.   I have not changed anything about my mac config other then just running Apple software update perhaps, which doesn't update very much stuff anymore for mavericks.  

 

Do you have any ideas what might be going on or how I could figure out what is going on?  

 

 

I obtained version 2.2.1d3 using git checkout.  Built it.  It seems to be working ok in Mavericks. (See attachment)  

 

I will do some iperf testing later when I get some time and compare between various versions of your realtek driver and also against some others that are out there.  

 

One quick question about the Xcode project, I see there are two schemes, one is called xxxx-v2.  Which scheme is the right one to use for building this?  I used V2, seems to work.  Just asking.

 

I also noticed the Xcode project version number is still 1.4xxx something er other...  FWIW.  That's what gets displayed by GET INFO and other stuff when the kext loads.  The build I attached here has version set to 2.2.1d3, which I guess will be the last working version of this driver up through Yosemite.

Link to comment
Share on other sites

My understanding is that the version I am using is the last one that will support anything older then El Capitan. My hackintosh is on mavericks and upgrading it is non trivial in fact I think I recall there are some specific reasons why I should not though I can't remember them right now.

 

Its been working totally fine for the pat 12 months until recently and I haven't really changed anything so I'd like to see if there is something I can fix to make the problem go away.

Link to comment
Share on other sites

Howdy

 

Just did a fresh install of Sierra on my old hackintosh that previously had 10.6.8.

I have EP45-UD3P and Trendent TEG-PCITXR HW:3.1R.  I used ##### to try adding the realtek drivers,

but can't seem to get the network to work (it does work via USB adapter).

 

Any reason why this network card will not work with Sierra & these drivers?

Am I doing something dumb?

Should I just buy a different card to make it easier?

Or just be happy it works via USB and wait until I can afford some new hardware?  :)

 

Here is attempt to try the 2.1.0d1 version.  I think I tried all three on ##### 9 (deleting old directories in between)

Realtek RTL8168C/8111C PCI Express Gigabit Ethernet:

 

  Name: ethernet

  Type: Ethernet

  Bus:  PCI

  Vendor ID:    0x10ec

  Device ID:    0x8168

  Subsystem Vendor ID:  0x1458

  Subsystem ID: 0xe000

  Revision ID:  0x0002

  Link Width:   x1

  BSD name:     en1

  Kext name:    RealtekRTL8111.kext

  Location:     /Library/Extensions/RealtekRTL8111.kext

  Version:      2.1.0d1

 

 

Update:  Surely there was a reason I had originally installed that trendnet network card, but I just plugged cable into onboard LAN and it worked.  I also noted that previously with OSX 10.6.8, the trendnet network card was using AppleRTL8169Ethernet.kext.  I am not sure how to get this for Sierra.

According to your log file, the driver is working as expected so that the problem must be located in the network configuration.

 

Mieze

Link to comment
Share on other sites

  • 2 weeks later...

Hi.

I installed two Sierra computers, both with RTL8168/8111 and with v2.2.1. drivers internet works, thanks. Weird thing is that local network transfer speed is very slow, about 11-15KB only. If connection goes to internet, speed is like supposed to be. 

I am not sure about drivers problem, but something is like blocking LAN networking. All adresses is fixed, any energy-saver in network drivers is disabled. Previous machines with 10.6.8 or 10.9.5 works very well, network topology is exactly the same (1000baseT for all machines). Maybe someone has dealed with this problem before?

Link to comment
Share on other sites

Hi, I have an Acer F5 573G 7828 with Realtek 8168/8111 and It doesn't work. I am using Sierra. Can you help me? Thanks

Please follow the instructions in post#1 of this thread.

Hi.

I installed two Sierra computers, both with RTL8168/8111 and with v2.2.1. drivers internet works, thanks. Weird thing is that local network transfer speed is very slow, about 11-15KB only. If connection goes to internet, speed is like supposed to be. 

I am not sure about drivers problem, but something is like blocking LAN networking. All adresses is fixed, any energy-saver in network drivers is disabled. Previous machines with 10.6.8 or 10.9.5 works very well, network topology is exactly the same (1000baseT for all machines). Maybe someone has dealed with this problem before?

10.6.8? Looks like your machine is very old? Well, I assume that this is a power management issue as Apple has reworked power management in recent versions of OS X. TCP's congestion avoidance mechanism uses packet roundtrip time to estimate network throughput and in case inappropriate power management settings cause delays in packet handling, it will make the network appear to be congested. Please fix power management in order to improve throughput. You might also try to disable TSO.

 

Mieze

Link to comment
Share on other sites

 inappropriate power management settings cause delays in packet handling, it will make the network appear to be congested. 

 

Why this packet handling problem (if this is a case) is only in local connection, not in internet traffic? My inet connection allows to 40Mbps DL and this works as promised. If I connect to old 10.6.8 machine, this connection works too, but seems that speed is only 100T range, not 1000T. If I connect with SMB, between two Sierras I can't connect at all. Only with AFP. Connection to 10.6.8 is AFP too.

My machines are very ancient indeed - with s775 and s1155, but I need 10.6.8 and even 10.5.8 because of some specific software. I am not sportsmen, so I not need maximum in everything. I am 50 years old now, so gaming is not for me anymore  B).

 

TSO... How I disable TCP segmentation offload in Sierra? 

 

Ok, found a way to edit. I disabled EEE, TSO for ipv4 and ipv6 and... file transfer stalled from ca10% of file size: file was 9,66GB and transfer goes to 906MB, then finito.

Link to comment
Share on other sites

×
×
  • Create New...