Jump to content

New Driver for Realtek RTL8111


Mieze
1,592 posts in this topic

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

Link to comment
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

  • Like 1
Link to comment
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...

Link to comment
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 

Link to comment
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. :(

Link to comment
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.

Link to comment
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

Link to comment
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

Link to comment
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
Link to comment
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

Link to comment
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.

Link to comment
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

Link to comment
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
Link to comment
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?

Link to comment
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

Link to comment
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

  • Like 1
Link to comment
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 ;)

Link to comment
Share on other sites

×
×
  • Create New...