Jump to content
InsanelyMac Forum
Mieze

New Driver for Realtek RTL8111

Recommended Posts

Hi,

 

I'm unable to get WoL working and am not sure where to start debugging.

 

I have a Asus p8z68-m pro motherboard with the latest bios. I have Power On by PCI and Power On by PCI-E Enabled in the bios. I have Realtek PXE OPROM disabled (and it doesn't make a difference if I enable it as well, except that there is a 3sec delay at boot).

 

I have "Wake on Ethernet access" checked in Energy Saver and am using the latest version of your driver 1.1.3.

 

I put my hackintosh to sleep from the menu item and then tried sending a WoL packet using the wol and etherwake tools from my Openwrt router. I know I specified the right mac address, but the system does not respond at all. It continues to sleep until I press the power button or press a key on my usb keyboard.

 

Can you advise on whether I'm missing something or where I can start troubleshooting? I guess one way would be to check if this works on another OS but Windows isn't an option. I can try a usb linux distro or something, I suppose.

 

Thanks,

/vv

In order to collect debug data use a debug build of the driver (for version 1.1.3 build from source). Kernel logs can be retrieved in Terminal with

grep kernel /var/log/system.log

Although I tested WoL successfully using "wol" too (from a Mac) and got several success reports from users, you are not the first reporting problems with WoL. As of now I have no idea how to solve the problem. It might be a firmware issue but as there is no documentation from Realtek, it's just a black box to me. Sorry!

 

Mieze

Share this post


Link to post
Share on other sites
Advertisement

After installing a RAID card, AppleIntelE1000e was giving kernel panic on Mavericks.

 

So I bought a TG-3468 (8139E) NIC and installed your 1.1.3 driver. Works wonderfully so far, thank you very much Mieze!

Share this post


Link to post
Share on other sites

@vinodv & Mieze

I can confirm WOL works for me with 1.1.3. (on my GA-P67A-UD3R-B3 with RTL8168E/8111E chipset)

I've tried to WOL from splashtop with splashtop 2 and from VNC with Remotix on my iPhone. Both worked fine.

I haven't tried using my tomato router to send WOL packet, so I'm not sure if it would work.

 

Maybe modifying your Sharing settings in System Preferences like mine would help:

MaiFmJS.png

Share this post


Link to post
Share on other sites

I just wanted to let you know that I pushed version 1.1.3 to github and updated the binary in the download section.

 

Mieze

While doing a merge here... noticed you removed the IOLock for transmit structures/descriptors.

 

Are you certain this is safe? The code in RTL8111:outputPacket does not look thread safe to me. For example:

    index = txNextDescIndex;
    txNextDescIndex = (txNextDescIndex + numSegs) & kTxDescMask;
A context switch and re-entry into outputPacket (from another thread) between those two lines creates problems.

 

If OS X is guaranteeing that calls to outputPacket are serialized, then no problem, but if not...

Share this post


Link to post
Share on other sites

If OS X is guaranteeing that calls to outputPacket are serialized, then no problem, but if not...

 

Yes it does! While output queues might have more than one producer, the number of consumers is limited to 1 (the output thread).

 

Mieze 

Share this post


Link to post
Share on other sites

I'm having some problems with the Mac App store with the driver. When I try to login, it says 'An unknown error has occurred'.

 

I tried deleting NetworkInterfaces.plist in \Library\Preferences\SystemConfiguration\. Then I found this thread and tried EthernetBuiltIn set to 'yes'. But this leads to a black screen before the login screen! I had to boot to installer and Terminal to remove the entry and restore the desktop.

 

I'm at a loss of what to do next. :(

Share this post


Link to post
Share on other sites

Yes it does! While output queues might have more than one producer, the number of consumers is limited to 1 (the output thread).

 

Mieze

Thanks for the info. The OS X docs were not very clear. It even talks about how the driver cannot block for fear of re-entering the network stack in a bad way... a rather strange statement in a pre-emptive multithread/multicore system.

Share this post


Link to post
Share on other sites

I'm having some problems with the Mac App store with the driver. When I try to login, it says 'An unknown error has occurred'.

 

I tried deleting NetworkInterfaces.plist in \Library\Preferences\SystemConfiguration\. Then I found this thread and tried EthernetBuiltIn set to 'yes'. But this leads to a black screen before the login screen! I had to boot to installer and Terminal to remove the entry and restore the desktop.

 

I'm at a loss of what to do next. :(

Please send me you kernel logs collected with the debug build and a dump of IOReg.

 

Mieze

Share this post


Link to post
Share on other sites

Thank you Mieze.

The boot file declares an SSDT and entries: '-v -f npci=0x2000 GraphicsEnabler=yes EthernetBuiltIn=yes'. I was only able to generate a kernel panic with option '-x', ironically. There were no log files in \L\L\DR. Chameleon is version 2.2 svn r2266. Attached is a photo of the panic, ioreg and IORegistryExplorer dumps, and SSDT. Please let me know if you need further information.

post-1248202-0-14494500-1386244821_thumb.jpg

warduck.ioreg.SSDT.zip

Share this post


Link to post
Share on other sites

In Terminal type

grep kernel /var/log/system.log

in order to retrieve the kernel messages.

 

IOReg shows that there is no built in Ethernet interface.

"IOPrimaryInterface" = No
"IOBuiltin" = No

I would suggest to remove these lines from the SSDT because the Intel NIC seems to be unused at the moment but it's declared as the "built-in" interface:

                Method (_DSM, 4, NotSerialized)
                {
                    Store (Package (0x0A)
                        {
                            "AAPL,slot-name", 
                            Buffer (0x09)
                            {
                                "Internal"
                            }, 
                            "built-in", 
                            Buffer (One)
                            {
                                 0x01
                            }, 
                            "device_type", 
                            Buffer (0x14)
                            {
                                "Ethernet Controller"
                            }, 
                            "model", 
                            Buffer (0x1E)
                            {
                                "Intel(R) 82579V PCI-E Gigabit"
                            }, 
                            "name", 
                            Buffer (0x14)
                            {
                                "Ethernet Controller"
                            }
                        }, Local0)
                    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                    Return (Local0)
                }

Another point is that booting with "npci=0x2000" seems to cause trouble and is actually not needed on most systems. 

 

Mieze

Edited by Mieze

Share this post


Link to post
Share on other sites

This driver is for the RTL8111/8168 series NICs only. The RTL8151 is not supported.

 

Mieze

Ola Mieze, lucky I tried with a Ubuntu-usb-key and the network worked ... Investigating I discovered a IONetworkingFamily.kext in Extra folder.. :blush:. Removed and voilà! your kext works very well!!!! Thanks a lot, 

Ciaoooo

Share this post


Link to post
Share on other sites

When installing the binary remove ionetworkingfamily.kext as well??

Not generally. ed_straker was referring to a rollback IONetworkingFamily.kext he had in /Extra/Extensions. IONetworkingFamily.kext is core networking support. Networking does not work without it.

Share this post


Link to post
Share on other sites

Does this work with RTL 8169 or does it need to be patched?

The underlying linux driver does not support the RTL8169. Although the RTL8169 is very similar to the RTL8111 family, it's a PCI, not a PCIe device, which have problems to do 64 bit DMA operations (dual address cycles) when connected to 32 bit PCI bus. Therefore I don't think that it would make any sense to add support for these outdated chips.

 

Mieze

Share this post


Link to post
Share on other sites

I would suggest to remove these lines from the SSDT because the Intel NIC seems to be unused at the moment but it's declared as the "built-in" interface:

 

Thank you Mieze for all your help!

 

I have a much better understanding of how things work now. It was silly to declare EthernetBuiltIn for an external Realtek. I don't think it's even possible to login to Apple services through the Realtek. I tried all your suggestions, and npci=0x2 turned out to be critical for my system. I think the editing of SSDT will ensure the stability, especially with one of two internal (Intel 82574) and external Realtek both active now.

 

Edit: Looks like I was wrong about both playing nice together. :(

 

Edit2: The problem was due to having to use both EthernetBuiltIn and GraphicsEnabler in Chameleon.

Edited by warduck

Share this post


Link to post
Share on other sites

Hi Mieze,

 

thanks a lot for this driver!

 

I followed your instructions carefully but unfortunately no ethernet device is showing in the networks settings after I finished the procedure.

 

I did the following steps:

 

1. I deleted the old reaktek driver kext.

2. I rebuild the kernel cache using the terminal and sudo touch /S/L/E

3. delete all entries in the network settings

4. reboot

5. I put the newly downloaded realtek kext file in the extensions folder

6. I rebuild the kernel cache using the terminal and sudo touch /S/L/E

7. reboot

 

But now when I try to setup my ethernet connection no ethernet controller can be found. It is like as if I had no ethernet controller installed.

 

Can you help me with this issue?

Share this post


Link to post
Share on other sites

Hi Mieze,

 

thanks a lot for this driver!

 

I followed your instructions carefully but unfortunately no ethernet device is showing in the networks settings after I finished the procedure.

 

I did the following steps:

 

1. I deleted the old reaktek driver kext.

2. I rebuild the kernel cache using the terminal and sudo touch /S/L/E

3. delete all entries in the network settings

4. reboot

5. I put the newly downloaded realtek kext file in the extensions folder

6. I rebuild the kernel cache using the terminal and sudo touch /S/L/E

7. reboot

 

But now when I try to setup my ethernet connection no ethernet controller can be found. It is like as if I had no ethernet controller installed.

 

Can you help me with this issue?

 

 

Please send me your kernel logs retrieved in Terminal with

grep kernel /var/log/system.log

Mieze

Share this post


Link to post
Share on other sites

Hello ipumuk,

 

in your kernel logs there is not a single line mentioning the driver, not even an error message, which shows that the driver is not installed properly. Please install it to /S/L/E using an utility like Kext Wizard or anything else.

 

Mieze

Share this post


Link to post
Share on other sites

Hello ipumuk,

 

in your kernel logs there is not a single line mentioning the driver, not even an error message, which shows that the driver is not installed properly. Please install it to /S/L/E using an utility like Kext Wizard or anything else.

 

Mieze

Thanks Mieze,

 

I did not know I had to use a special software to install the kext. I simply copied the file into the extensions folder before.

 

Now it works perfectly ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.



  • Similar Content

    • By Mieze
      Being asked to add support for Realtek's Fast Ethernet PCIe NICs to my RTL8111 driver I got tired of answering the same old question again and again so that I finally decided to write a separate driver for these chips and to make a few of you guys and gals happy.
       
      As of now the driver supports the following members the RTL810X Fast Ethernet family:
      RTL8101E RTL8102E RTL8103E RTL8401E RTL8105E RTL8402 RTL8106E RTL8106EUS RTL8107E Here is a list of the driver's basic features:
      Supports Sierra (maybe El Capitan). 64 bit architecture only. Support for multisegment packets relieving the network stack of unnecessary copy operations when assembling packets for transmission. No-copy receive and transmit. Only small packets are copied on reception because creating a copy is more efficient than allocating a new buffer. TCP, UDP and IPv4 checksum offload (receive and transmit). TCP segmentation offload under IPv4. Support for TCP/IPv6 and UDP/IPv6 checksum offload. Supports Wake on LAN. Support for Energy Efficient Ethernet (EEE) which can be disabled by setting enableEEE to NO in the drivers Info.plist without rebuild. The default is YES. The driver is published under GPLv2. Built using Xcode 4.6.3.  
      Changelog Version 2.0.1 (2018-05-10): Fixes a problem with retrieval of the permanent MAC address on some chips. Version 2.0.0 (2017-04-04): Uses Apple's private driver interface introduced with 10.8. Adds support for the RTL8107E. Supports packet scheduling with QFQ. Adds support for flow control and EEE. Version 1.0.0 (2014-05-24): First offical release.     Installation   Before you install the driver you have to remove any installed driver for RTL810X. Goto /S/L/E and delete the old driver. Recreate the kernel cache. Open System Preferences and delete the corresponding network interface, e. g. en0. If you forget this step you might experience strange problems with certain Apple domains, iTunes and iCloud later. Install the new driver and recreate the kernel cache. Reboot Open System Preferences again, select Network and check if the new network interface has been created automatically or create it manually now. Configure the interface.     Troubleshooting Make sure you have followed the installation instructions especially when you have issues with certain domains while the others are working fine. Use the debug version to collect log data when trying to track down problems. The kernel log messages can be retrieved with "grep kernel /var/log/system.log" in Terminal. Starting from Sierra use "log show --predicate "processID == 0" --debug" in order to retrieve kernel logs. Include the log data when asking for support or giving feedback. I'm an engineer, not a clairvoyant. Don't copy and paste large amounts of log data to your post. Create an archive with the log data and attach it to your post. In case you don't want to make your log data publicly accessible, contact me via PM and I will provide you a mail address to send it directly to me.  Check your BIOS settings. You might want to disable Network Boot and the UEFI Network Stack as these can interfere with the driver. Double check that you have removed any other Realtek kext from your system because they could prevent the driver from working properly. Delete the following files: /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist /Library/Preferences/SystemConfiguration/preferences.plist Verify your bootloader configuration, in particular the kernel flags. Avoid using npci=0x2000 or npci=0x3000.  In Terminal run netstat -s in order to display network statistics. Carefully examine the data for any unusual activity like a high number of packets with bad IP header checksums, etc. In case auto-configuration of the link layer connection doesn't work it might be necessary to select the medium manually in System Preferences under Network for the interface. Use Wireshark to create a packet dump in order to collect diagnostic information. Keep in mind that there are many manufacturers of network equipment. Although Ethernet is an IEEE standard, different implementations may show different behavior causing incompatibilities. In case you are having trouble try a different switch or a different cable.  
      Getting the driver
      There is a prebuilt binary in the Download section of this site: http://www.insanelymac.com/forum/files/file/259-realtekrtl8100-binary/ The source code can be found on Github: https://github.com/Mieze/RealtekRTL8100   Mieze
    • By ITzTravelInTime
      KX AUDIO DRIVER MOD
       
      Hi guys i am a small developer, i really like to use my sound blaster cards on my machines and i love also coding, so when i find the source code for the kx audio driver on git hub and then Eugene, the creator of kx audio driver decided to no longer maintain the project, i decided to start working on a mod of this driver. 
       
      With my mod, created starting from the sources of the last version of kx audio driver, and also by using apple developer documentation for pci and audio drivers as reference, i am working to achieve 2 things mainly: get all the cards supported by the driver to work with all the recent versions os macOS and add support for other cards that are not officially supported by the driver that works or could, but needs to be more properly supported.
       
      This driver is made to support cards based on the E-mu 10k1, 10k2 and similars (like what is used by audigy rx and audigy 4 cards).
       
      Supported cards are:
       
       - most of the sound blaster live!, live! 5.1 and live! 5.1 digital series
       - sound blaster 512
       - sound blaster 256
       - other creative and e-mu sound cards based on the 10k1 chip (cards with the ES1370/ES1371/ES1372/ES1373 chips are not supported)
       - sound blaster Audigy series (1 st gen)
       - sound blaster Audigy 2  and audigy 2 zs series
       - E-MU cards based on the 10k2 sound chip
       - Some Audigy 4 cards (SB0610 only) and the audigy 4 pro
       - Sound blaster Audigy RX (sb0155)
       - other creative and e-mu cards based on the (10k2, 10k2,5 and CA10300 based cards)
       
      NOT supported cards:
       
       - Any ISA Sound card
       - ES1370/ES1371/ES1372/ES1373 based sound cards
       - CMI8738/CMI8788 based cards
       - Any CA0106 based card and cards with similar architectures (like sound blaster live! 24 bit, sound blaster audigy SE SB0570, audigy LS and similars, but audigy SA is supported)
       - Any sound blaster x-fi (some of them works on macOS using a modified version of voodoo hda)
       - Any sound blaster recon3D
       - Any sound blaster Z/ZS/ZX and similar series
       - Any sound blaster AE5 series
       
      In the time being the things i have modded or added with this mod are:
       
      - increased the simple buffer frames number with different values for emu10k1 based cards and emu10k2 based cards (including recent audigy 4 and rx) to reduce and all the audio cracking issues and possibly fixing all of them on a lot of cards
       
      - added a more proper support for the pci express sound blaster audigy rx (which basically is an audigy 4 with a pcie bridge chip) 
       
      - added more fancy names for the cards in the settings and other menus (so the name will be, for example, SB live! 5.1 SB0060 instead of kx SB0060 [e880] witch was shown in the original driver)
       
      - added support to sample rate chaning and added lots of sample rates (from 8 khz to 176,4 khz) to accomodate any possible usecase (note that 10k1 sound cards are limited up to 48khz sample rate, and 10k2 based cards for now are limited up to 176,4 khz and because of issues getting 192 khz to work, for now the driver goes up to 176,4 khz for supported cards) 
       
      - added boot args to manage the driver:
       
      Boot args to use with the kx audio driver mod: -kx_disable or -kxdisable or -kxoff This will prevent the driver from doing any initialization work, so the driver is basically disabled, use it to boot your ssytem in case the driver is giving you issues and kernel panics while you are trying to boot/using your system, so you are able to remove this driver or replace it with another version of it or to do some truble shooting. -kx_debug or -kxdebug or -kxspec Will show more debug info about the card, mainly the i/o port address and the kind of bus that it uses -kx_exp_deb or -kx_beta or -kxbeta Will enable experimental and probably not working or unstable features like showing inputs for the card or 192 khz sampling rate, use it only for testing and debug purposes, this may likely cause instability and problems in the everyday usage! Use it at your own risk! -kx_original or -kxoriginal This will basically turn off almost all the mods of this mod, so the driver will come to work as it was before modding it, this can be usefoul as a "safe mode" like feture to have a working driver in case of problems with features of the mod, so using this means no crsking issues improvements, only 48 khz sample rate and only features of the non-modded kx audio driver for mac os x  
      - created a script file to use with the driver for debug and also installer replacement, it can be also used to unload and reload, replacement of the driver without rebooting
       
      What i'd like to implement but i don't know how to do:
       
       - I'd like mainly to add a more proper support to the pci bridge chip of the audigy rx,
       
       - have audio inputs working,
       
       - fix the support when using more than one card, to get all the cards shown in the settings and other menus,
       
       - have the gameport/gameport midi port of older cards to be used in mac os as a midi in/out
       
      If other developers would like to join and help me, you can, and also an hand from other people with testing and feedback will be nice.
       
      link for the kext only (if you have clover put it in [your clover efi folder]/clover/kexts/[your macOS version]/ so it will not be deleted when updating macOS):
               - download from the downloads section:          kX Audio Driver Mod by ITzTravelInTime 1.01                                                                                    - external download:                                      https://dl.dropboxus...Driver.kext.zip   link for the installer pack (the best way to install it, but you have to reinstall it when you upgrade macOS, remeber to fix kext permitions and rebuild the kernelcache if you want to remove the kext from it's install directory without using the unistall feature of the provvided script):              - download:                                                   https://dl.dropboxus...aller pack.zip   Source code from Git Hub:          -  github repo:                                               https://github.com/ITzTravelInTime/kx-audio-driver   NOTE: Some system because of some problems with the HPET may need to use FixHPET in clover and to install the kext in /System/Library/Extensions  






    • By ITzTravelInTime
      This driver is a mod of the popular kx audio driver for mac os x, the project goal is to still maintaining it for the future releases of mac os and to include as much cards as possible and to get all the features of the cards to work.
       
      Currently the only features not supported are audio inputs and integrated midi and synth capabilitues of the cards, and some minor things like creative remote controllers or software controlled volume gears on creative external drives and bays)
       
      It supports most the sound blaster live! series cards, the sound blaster PCI 512, most of the audigy (emu 10k2 based) series, audigy 1, audigy 2, audigy 2 zs, audigy 4 (SB0610), audigy 4 pro, audigy 5 and audigy rx (sb1550) and some e-mu edsp audio cards with all the recent versions of mac os, tested to work with mac os yosemite, el capitan, sierra and high sierra on intel based machines from socket 775 to 1151 (including enthusiast platforms like x58, x79, x99, x299) and also confirmed to work on mac pros.
       
      reference topic:
       
      Kx audio driver mod [sound blaster live!, audigy 1/2/4/RX emu edsp]
    • By ivanagui2
      VMQemuVGA display adapter driver for OSx86 running as a VirtualBox guest. The binary should work on all OSs from Snow Leopard up to Yosemite 10.10. It allows to set different screen resolutions in VirtualBox from System Preferences.   The changes I've made to the fork have been minimal.
      GitHub project page Binary and source releases Special thanks:
      PureDarwin
      probonopd
      rafirafi
      Zenith432
      VMware, Inc


×