Jump to content

AppleIntelE1000e.kext for 10.8/10.7/10.6/10.5


hnak
 Share

751 posts in this topic

Recommended Posts

2.4.14 is periodically hanging on my Z77X-UD5H with 10.9.1. Until it hangs, things work fine - interface is recognized, network works fine for internet (and LAN) traffic. However, after a day or two like this I get a system freeze, mid-screensaver (or whatever was going on), with no interesting log messages on the console. When I switched to a USB Ethernet adapter, the system is rock solid. I am happy to help diagnose or debug.

Link to comment
Share on other sites

Hi Everyone,

 

I am having an issue with JumboFrames using the latest driver in Mavericks.

 

I am on a P8P67 Deluxe, with the lower port being the Intel 82579. I can select custom from the MTU listbox, and then it says 1200-1500 in parenthesis. I can go so far as to enter 9000, and it automatically defaults back to 8982 if I press 'enter' on my keyboard. Then when I click OK to save the changes, the internet works for about 1 packets worth of data, then it stops loading anything further. If I reset it back to 1500 MTU, it resumes its transfers.

 

Is there any way of making sure I get the maximum MTU possible from this driver, or is there something I need to modify? 

 

UPDATE: installed 2.4.1.4 with [url="http://www.insanelymac.com/forum/topic/279450-why-insanelymac-does-not-support-tonymacx86/"]#####[/url]. I noticed that if I set the MTU to 4000, it works and I can ping devices in the terminal and the internet works, pages load fully.

 

If I set the MTU to 9000 it defaults to 8982, and I can ping devices on the network fine, but I can't view websites or actually connect to the devices?? that seems weird.

Link to comment
Share on other sites

UPDATE 2: It seems like approximately 4000 MTU is the largest I can set this driver at? All of the other devices on my network are transfering at 9000MTU or thereabouts...

 

Does anyone know why? Does this have to do with cable length or something physical, rather than a driver issue?

UPDATE 3: Installed 2.5.4d, still only 4060 max MTU. double checked all other devices, they're happily moving at 9000 MTU, except for one computer that only has a max setting of 7000 for the NIC on that machine (Win7 PC).

Link to comment
Share on other sites

2.4.14 is periodically hanging on my Z77X-UD5H with 10.9.1. Until it hangs, things work fine - interface is recognized, network works fine for internet (and LAN) traffic. However, after a day or two like this I get a system freeze, mid-screensaver (or whatever was going on), with no interesting log messages on the console.

 

No version of the driver is really stable because of systematic errors in output queue handling.

 

Edit: I got it working with a small code change and setting link-speed from 'Auto' to '100baseTX'... 

Doing some more testing over the weekend hoping to also get it to work with 1000baseTX
 
Update: after disabling Intel Rapid Start Technology in the bios, WOL works with 'Auto' and GbE speed.
 
Copy the this code from AppleIntelE1000e::stop to the end of method AppleIntelE1000e::disable, before pciDevice->close(this):
e1000_power_down_phy(adapter);
bool wake;
__e1000_shutdown( &wake, false);

Since this was more a trial-and-error fix, I hope someone more knowledgeable with the actual driver code could check if this makes sense or not  :)

 

When the system goes to sleep the driver's disable()-routine gets called which has to put the NIC into a state so that it can generate wake-up events. Finally the OS calls setPowerState() where you have to put the NIC into D3(cold) state and enable generation of PME events.

Dear threadstarter,

 

I, for one, would buy you a beer every time we meet if you publish some guidelines on porting Linux networking drivers to OSX. The information is rather scarce on the topic of writing NIC drivers at all (there is a nice thread on ArsTechnica, but it applies mostly to version as ancient as 10.2), and documenting roadbumps and mappings from Linux infrastructure to Darwin would be an immense help to those who would like to immerse into writing their own drivers.

 

There is documentation and reading the source, of course, but it means bumping into the same roadblocks everyone else did.

 

(My personal wish is to port somewhere along the line the cfg80211 stack and its drivers; they don't need to be Wi-fi proper, but I'd like them to work at all)

 

There is an introduction to Network drivers from Apple and a RTL8139 sample driver from 10.6. Although it might seem to be outdated, it isn't. The principle function of a network driver hasn't changed for several years. The key to success is that you have to understand how the OS interfaces with the driver. Unfortunately this is where most driver programmers failed making their code a bad starting point for your own development. Therefore it's best to start from scratch with the framework. Once you got that right, you can move on to the hardware specific code. Most of it can be taken from linux, except those routines which deal with packet transmission and reception. The differences in concept are to big so that it's best practice to rewrite these routines completely

 

Although I don't have the time to write a tutorial, feel free to ask me in case you have questions.

 

Mieze 

Link to comment
Share on other sites

When the system goes to sleep the driver's disable()-routine gets called which has to put the NIC into a state so that it can generate wake-up events. Finally the OS calls setPowerState() where you have to put the NIC into D3(cold) state and enable generation of PME events.

Are you saying the driver has a more fundamental issue with WOL?

Link to comment
Share on other sites

Are you saying the driver has a more fundamental issue with WOL?

 

As I haven't read the full source yet, I don't know what bugs are still waiting to be found. Based on my experiences with network driver programming, I just wanted to explain how WoL works in principle so that you can check if it correctly implemented.

 

Mieze

Link to comment
Share on other sites

As I haven't read the full source yet, I don't know what bugs are still waiting to be found. Based on my experiences with network driver programming, I just wanted to explain how WoL works in principle so that you can check if it correctly implemented.

 

Mieze

As I haven't read the full source yet, I don't know what bugs are still waiting to be found. Based on my experiences with network driver programming, I just wanted to explain how WoL works in principle so that you can check if it correctly implemented.

 

Mieze

I'll check the WOL code agains your learnings. Do hope that the original developer joins the discussion so the whatever changes required can make it into the latest build.
Link to comment
Share on other sites

I'll check the WOL code agains your learnings. Do hope that the original developer joins the discussion so the whatever changes required can make it into the latest build.

 

I'm afraid but it looks like hnak gave up on his project several month ago. I already thought about fixing this driver myself but came to the conclusion that starting from scratch would be the preferred solution. As soon as I finish my Realtek driver update, I will start a new project: writing a replacement for this driver. I already set up my development machine and will definitely start during the next weeks.

 

Mieze

  • Like 3
Link to comment
Share on other sites

I'm afraid but it looks like hnak gave up on his project several month ago. I already thought about fixing this driver myself but came to the conclusion that starting from scratch would be the preferred solution. As soon as I finish my Realtek driver update, I will start a new project: writing a replacement for this driver. I already set up my development machine and will definitely start during the next weeks.

 

Mieze

Thats great news Mieze! I my self have had more success with the 2.14.4 Driver on my Z77N-WiFi system. I have added the WoL code that @diddl14 used to get WoL working in the later driver. It is not perfect as I get occasion dropped packets as well as ping timeouts when using "HELIOS LanTest" to stress test the driver.

 

I would like to offer my time to help debug your new project once its underway. I would love to have a stable Intel driver for the I217V NIC which seems to be very common with the Intel 8 series motherboards. So I am happy to help in any way. debug logs, crash dumps, feedback, etc.

Link to comment
Share on other sites

I would like to offer my time to help debug your new project once its underway. I would love to have a stable Intel driver for the I217V NIC which seems to be very common with the Intel 8 series motherboards. So I am happy to help in any way. debug logs, crash dumps, feedback, etc.

 

That's perfect! I've got an I217 too, on an Asrock B85M Pro4 which I bought for development.

 

Mieze

  • Like 1
Link to comment
Share on other sites

I'm afraid but it looks like hnak gave up on his project several month ago. I already thought about fixing this driver myself but came to the conclusion that starting from scratch would be the preferred solution. As soon as I finish my Realtek driver update, I will start a new project: writing a replacement for this driver. I already set up my development machine and will definitely start during the next weeks.

 

Mieze

303690-good_news_everyone.jpg

 

Jokes aside, I also have an I217-V here (Vendor ID: 0x8086, Device ID: 0x153b, Subsystem Vendor ID: 0x1458), two actually, so, if I could be of help testing since I have two exact machines aside from the GPU, let me know.

 

and...

 

Thanks for shedding some light and hope into this.

Link to comment
Share on other sites

 

It seems WOL isn't working on a GA-Z87MX-D3H and OSX 10.9.1.

 

On sleep, the lights on the adapter go and stay out. A magic packet does not wake it up. Testing with another adapter (USB2ETH) worked ok.

I've not yet tested with an other OS myself but from what I understood, WOL works fine in Windows on this board with build-in LAN.

 

That leads to the conclusion that it might be a driver issue..

 

I did some debugging in AppleIntelE1000e.kext and at least found that AppleIntelE1000e::__e1000_shutdown does not get called.

This seems to be critical for activating the APM/WOL state.

 

Edit: I got it working with a small code change and setting link-speed from 'Auto' to '100baseTX'... 
Doing some more testing over the weekend hoping to also get it to work with 1000baseTX
 
Update: after disabling Intel Rapid Start Technology in the bios, WOL works with 'Auto' and GbE speed.
 
Copy the this code from AppleIntelE1000e::stop to the end of method AppleIntelE1000e::disable, before pciDevice->close(this):
e1000_power_down_phy(adapter);
bool wake;
__e1000_shutdown( &wake, false);

Since this was more a trial-and-error fix, I hope someone more knowledgeable with the actual driver code could check if this makes sense or not  :)

 

 

 

Maybe I ask exactly what you are editing and how? I would like to experiment with this on my own but am a complete noob =)

Link to comment
Share on other sites

diddl14, thanks !

 

you just fixed the WOL issue or also debugged/optimized the kext to be more stable and reliable than the older one ?

Only added a fix for the WOL behavior - so far didn't have stability or other issues

I've not used/tried jumbo frames or other non-default settings that seem to be causing stability issues.

Link to comment
Share on other sites

i'm actually using the kext 2.4.14 old version with haswell z87x gigabyte mobo...

 

do you think the newer 2.5.4f is reliable for normal ethernet usage ?

do you think i might manually switch to 10 or 100 speed instead of gigabit like i read someone did for more constant and stable data flow  ?

Link to comment
Share on other sites

I'm had no problems with version 2.4.14 or 2.5.4f except for lack of WOL under Mavericks.

The driver is set to auto detect line speed (GbE in my setup) and default MTU of 1500.

 

All I can add is that my test with large files transfers (20+ GB virtual disks) with standard mtu between macs via AFP were fast and reliable...

Link to comment
Share on other sites

 Share

×
×
  • Create New...