Jump to content

Experimental Atheros AR81(31/32/51/52/61/62/71/72) Driver for 10.7/10.8


Shailua
 Share

153 posts in this topic

Recommended Posts

EXPERIMENTAL! UNSTABLE! WARNING! KITTENS!

 

Hi again everybody. After tinkering with updating the AtherosL1cEthernet drivers (http://www.insanelym...ver-for-107108/) I decided to try porting from scratch the newer ALX driver from here:

http://www.linuxfoun.../networking/alx

Much of what I said in the AtherosL1cEthernet thread also goes for this driver, so please browse over it quickly if you get a chance.

 

While the latest news update on the ALX page suggested they were stripping out support for the earlier drivers, the code for these seems to be still intact in the latest patches so it seemed worth trying to port, especially with many newer motherboard revisions apparently containing the AR8161 chip and causing people much frustration. Once again I've only been able to test this code on my AR8151. There are a lot of rough edges, but "release early, release often" as they say. There are essentially two low-level sections of code, one for the AR81(31/32/51/52) and another for the newer ones. I can't really vouch for the stability of the newer chipset code. Most of the low-level stuff is mostly portable and unmodified from the Linux code though.

 

Wake on LAN/demand works for me so far, but I haven't yet enabled TSO, VLAN and other advanced stuff. For now I'm just attempting to get the basic driver working.

 

Installing:

Use your favourite method of adding kexts to /System/Library/Extensions. Personally I prefer doing it manually from the terminal.

For testing or reporting bugs, please use the kext in the "Debug" subdirectory. This will output much more info to /var/log/system.log.

 

Remove any old version:

sudo rm -rf /System/Library/Extensions/ALXEthernet.kext

(Don't forget to also remove any potentially conflicting kexts from the Extensions directory, e.g. AtherosL1cEthernet.kext!)

 

Copy the new version from wherever you extracted it, such as Downloads:

sudo cp -r /Users/yourusername/Downloads/ALXEthernet/ALXEthernet.kext /System/Library/Extensions/

 

Update the kernel cache:

sudo touch /System/Library/Extensions

Then wait a couple of minutes or so before rebooting. This should trigger kextd to rebuild the cache.

(Alternatively you could completely remove the old cache first:

sudo rm -rf /System/Library/Caches/com.apple.kext.caches/*

But this is best ran from single user mode (-s) where kextd isn't active and watching for changes in the background.)

 

If you find your system becomes unbootable due to panics, the easiest way to fix this is to temporarily disable the ethernet card in the BIOS/UEFI, boot into Mac OS X and then perform the the first and last installation steps above.

 

Alternative (test) install:

To avoid breaking your system if the module is installed but panics every time, you can just test by installing to the temporary directory:

sudo cp -r /Users/yourusername/Downloads/ALXEthernet/ALXEthernet.ext /tmp/

 

Then load the module for testing:

sudo kextload /tmp/ALXEthernet.kext

 

The contents of /tmp will be automatically wiped upon reboot so you'll have to repeat these two steps each time.

 

Changelog:

1.0.2 - Bug fixes that should help clean up memory allocation problems at boot time (with a little luck). VLAN is now possible for anyone that needs it, but I've only tested it minimally.

 

1.0.1 - Bug fixes and refinements. Manually setting the link speed should work properly now and might be an option if autonegotiation is causing issues. The link watchdog timer should generally be working better now. Changed some Linux code that was automatically enabling MSI-X interrupts on newer chips. I have no idea if these are supported properly on Mac OS X, but to be safe I'd rather keep everything on plain old MSI for now.

 

1.0.0 - The initial release. Don't be fooled, it's likely very unstable!

 

Downloads:

The zip files are (hopefully) attached to this post. They contain the kext module and the GPL sourcecode. The kext in the "Debug" folder is mostly the same as the regular kext, but prints much more information to the system logs.

 

Latest:

20121117 ALXEthernet-1.0.2.zip

MD5 (ALXEthernet-1.0.2.zip) = dbdc587f2b4905515571a7ce2bd55c8f

 

Previous:

20121106 ALXEthernet-1.0.1.zip

MD5 (ALXEthernet-1.0.1.zip) = ed621f34f91e60b5422734401b6bdb6e

 

20121103 ALXEthernet-1.0.0.zip

MD5 (ALXEthernet-1.0.0.zip) = 78c0d329237e1ac726bd737493b45724

 

 

Like I said in the other thread: I'm just throwing this driver/code out there and seeing what happens. I can't provide serious help or even guarantee a reply if things don't work for anyone. Enjoy and please tell me what card type you have for any feedback if possible! :)

 

While kernel panics should hopefully not happen if everything is installed correctly, if anybody gets a regular panic and feels up to it then it would be incredibly useful for me if you were to enable verbose mode at boot with the -v flag and snap me a (readable) photograph of the panic screen along with which Mac OS X version they're using (e.g. 10.8.2) along with the driver version used (e.g. 1.0.1). I can then hopefully trace exactly where in the code things are going wrong. Usually these things are from buffer allocations gone horribly wrong.

  • Like 19
Link to comment
Share on other sites

Lenovo Y480 AR8161 Gigabit, had a couple of KPs (might have been some other problem but coincided with the kext install) and now seems to have settled. Everything seems to be working OK (DHCP IP, etc.), App Store, etc. Will keep you posted if anything develops. Thanks for getting this together, I think a lot of folks are looking for AR8161 solution.

Link to comment
Share on other sites

Thank you for the feedback, it's good to know the AR8161 is at least (somewhat) working! :) I'll continue to improve what code I can as well as keep an eye out for newer low-level Linux code to merge. Sadly the ALX driver this is based on isn't even part of the stock-standard Linux kernel at this point as far as I can tell, but is a patch upon a patch upon a patch for adding experimental but badly-needed driver support to distros and is placed in a sub-directory ominously called "{censored}". :|

Link to comment
Share on other sites

:thumbsup_anim: :thumbsup_anim: :thumbsup_anim: Thank you, thank you thank you. :thumbsup_anim: :thumbsup_anim: :thumbsup_anim:

 

Confirming only one feature... AR8161 is recognized by the OSX 10.8.2. I use Belkin FD7050 v3 for internet as I do not have ethernet connection where my hackintosh is. iCloud and Appp store started working after install of this ALXEthernet kext.

 

My system:

GA H77 D3H

Core i5 3570k (using HD4000 graphics), no overclock

8 Gigs DDR3 1600 hz

Belkin FD7050 v3

WD 750 G HD for OSX, WD 1.5 TB for Win and data

350 watt powersupply that came with the Antac case

Asus DVD-RW Dont recall which one, really old, works reading DVDs

Connected to Samsung tv through HDMI

 

 

So far, 1. No HDMI audio (just doing research, havnt tried many kexts yet. 2. I have to switch my monitor off and on once at start when the screen becomes garbled.

Not tested - USB3

Other than the above, no KPs, no hickups. Been trying the build since two weeks so still newbe, have read a lot on these forums. Built the system with the advise here and everywhere on the internet but missed out on v1.1 using AR8161 (Issues were mixed with some people reporting success and others reporting problems but no mention of the chipset and kext not being available).

 

Saw great progress during these two weeks in terms of the ethernet problem.

App store access was essential to my build. This weekend trying to make Audio over HDMI work

 

Note: for some reason, this thread is really hard to find. Is there a way this could be popularized?

 

Gracias.

Link to comment
Share on other sites

Finally! Thank you! The drivers work great on my Gigabyte GA-Z77X-D3H Rev 1.1

 

Installed on 10.8.2. After restart, OSX recognizes it!

 

 

Qualcomm Atheros AR8161 Gigabit Ethernet:

 

Name: Qualcomm Atheros AR8161 Gigabit Ethernet

Type: Ethernet Controller

Bus: PCI

Vendor ID: 0x1969

Device ID: 0x1091

Subsystem Vendor ID: 0x1458

Subsystem ID: 0xe000

Revision ID: 0x0010

Link Width: x1

BSD name: en1

Kext name: ALXEthernet.kext

Location: /System/Library/Extensions/ALXEthernet.kext

Version: 1.0.1

Link to comment
Share on other sites

:thumbsup_anim: :thumbsup_anim: :thumbsup_anim: Thank you, thank you thank you. :thumbsup_anim: :thumbsup_anim: :thumbsup_anim:

 

Confirming only one feature... AR8161 is recognized by the OSX 10.8.2. I use Belkin FD7050 v3 for internet as I do not have ethernet connection where my hackintosh is. iCloud and Appp store started working after install of this ALXEthernet kext.

 

My system:

GA H77 D3H

Core i5 3570k (using HD4000 graphics), no overclock

8 Gigs DDR3 1600 hz

Belkin FD7050 v3

WD 750 G HD for OSX, WD 1.5 TB for Win and data

350 watt powersupply that came with the Antac case

Asus DVD-RW Dont recall which one, really old, works reading DVDs

Connected to Samsung tv through HDMI

 

 

So far, 1. No HDMI audio (just doing research, havnt tried many kexts yet. 2. I have to switch my monitor off and on once at start when the screen becomes garbled.

Not tested - USB3

Other than the above, no KPs, no hickups. Been trying the build since two weeks so still newbe, have read a lot on these forums. Built the system with the advise here and everywhere on the internet but missed out on v1.1 using AR8161 (Issues were mixed with some people reporting success and others reporting problems but no mention of the chipset and kext not being available).

 

Saw great progress during these two weeks in terms of the ethernet problem.

App store access was essential to my build. This weekend trying to make Audio over HDMI work

 

Note: for some reason, this thread is really hard to find. Is there a way this could be popularized?

 

Gracias.

Maybe you can contact the moderators :D

Link to comment
Share on other sites

Hi OP, please check the attachments as it seems both zip's are the same 1.0.0 version? Thanks

 

I'm not quite sure what you mean. The top post contains both 1.0.0 and 1.0.1 under the Downloads subsection. They are both different files.

Link to comment
Share on other sites

I'm not quite sure what you mean. The top post contains both 1.0.0 and 1.0.1 under the Downloads subsection. They are both different files.

I think he means that the two files you uploaded in the post are exactly the same.

Link to comment
Share on other sites

Ah. Well they're definitely not the same files. The version number I assign can be confirmed with a right-click "Get Info" on the kext itself. :)

I didn't test it cuz i have 8152 not 816X

Link to comment
Share on other sites

I think he means that the two files you uploaded in the post are exactly the same.

Ah. Well they're definitely not the same files. The version number I assign can be confirmed with a right-click "Get Info" on the kext itself. :)

 

Never mind i got the 1.0.1 at last. For whatever reason i got all the 1.0.0 zip's at first. But i have not tested since i havent had time to build. All parts are lying at home for a week already :-) Will provide feedbacks once done. Thanks

Link to comment
Share on other sites

Never mind i got the 1.0.1 at last. For whatever reason i got all the 1.0.0 zip's at first. But i have not tested since i havent had time to build. All parts are lying at home for a week already :-) Will provide feedbacks once done. Thanks

good luck to you :D

Link to comment
Share on other sites

Chameleon in not able to load the drivers.

With Clover 2.0 works perfectly

 

3]
Qualcomm Atheros AR8161 Gigabit Ethernet:

 

3] Name: Qualcomm Atheros AR8161 Gigabit Ethernet

3] Type: Ethernet Controller

3] Bus: PCI

3] Vendor ID: 0x1969

3] Device ID: 0x1091

3] Subsystem Vendor ID: 0x1043

3] Subsystem ID: 0x1477

3] Revision ID: 0x0008

3] Link Width: x1

3] BSD name: en0

3] Kext name: ALXEthernet.kext

3] Location: /System/Library/Extensions/ALXEthernet.kext

3] Version: 1.0.1

 

 

Shailua Thank you very much for sharing !!!
Link to comment
Share on other sites

Hello, thanks for the driver! The first time I restart the computer after install the drive, the ethernet is working! However, subsequent restarts all result in kernal panic. I have attached screenshot. Please take a look. Thank!

 

I'm on 10.8.2, using the 1.01 version of the driver. My board is gigabyte h77 DS3H

 

Edit: looks like I can log into the system with boot ignore cache, but if not then kernel panic everytime.

 

Edit 2: due to some unknown reason I no longer experience kernel panic...I really don't know what happened. I just installed some app and nothing else. Thanks again for the great driver!

post-1096769-0-23198600-1352623486_thumb.jpg

Edited by poyuzhe
Link to comment
Share on other sites

Hello, thanks for the driver! The first time I restart the computer after install the drive, the ethernet is working! However, subsequent restarts all result in kernal panic. I have attached screenshot. Please take a look. Thank!

 

I'm on 10.8.2, using the 1.01 version of the driver. My board is gigabyte h77 DS3H

 

Edit: looks like I can log into the system with boot ignore cache, but if not then kernel panic everytime.

 

Edit 2: due to some unknown reason I no longer experience kernel panic...I really don't know what happened. I just installed some app and nothing else. Thanks again for the great driver!

 

Thank you for the great debug info! I'm glad it's all running fine now for you anyway, but to be sure I'll plug the panic values into the debugger and see what comes up just in case. It's possible that your kernel cache simply got corrupted. I've had that happen to me once or twice in the past. It might have to do with deleting the cache while the kextd daemon has partially rebuilt it already. I might alter my installation instructions to be less "aggressive", I guess you could say. Typically kextd just rescans stuff anyway as soon as it detects a change in /System/Library/Extensions. Manually deleting the cache seems to mostly only be needed from single user mode.

Chameleon in not able to load the drivers.

With Clover 2.0 works perfectly

 

3]
Qualcomm Atheros AR8161 Gigabit Ethernet:

 

3] Name: Qualcomm Atheros AR8161 Gigabit Ethernet

3] Type: Ethernet Controller

3] Bus: PCI

3] Vendor ID: 0x1969

3] Device ID: 0x1091

3] Subsystem Vendor ID: 0x1043

3] Subsystem ID: 0x1477

3] Revision ID: 0x0008

3] Link Width: x1

3] BSD name: en0

3] Kext name: ALXEthernet.kext

3] Location: /System/Library/Extensions/ALXEthernet.kext

3] Version: 1.0.1

 

 

Shailua Thank you very much for sharing !!!

 

I'm not too sure what the issue would be with the bootloader, unless you're trying to install things outside of /System/Library/Extensions. I don't have any issues with (recent build) Chameleon myself. I've heard good things about Clover though, so if it works for you I say stick with it. :)

Link to comment
Share on other sites

Shailua,

 

Thanks for your reply! If those info can be of a little help then that's great. Today I experienced some strange freeze for my mac, I don't know for sure if it's the driver, but I suspect it may be related: whenever I try to upload my app build onto Apple's itunes connect through xcode, sooner or later during the uploading process the mac will freeze.

 

Thanks!

Link to comment
Share on other sites

Shailua, you are a genius! :)

 

I haven't had time to test this out yet, but will be doing so shortly with my Atheros AR8161 Lan card in this Asus N56VM I have and will post my results!

 

Can't wait to test it out, actually gave up on running OSX on this laptop due to the Ethernet not being supported so this gives me new hope!

 

Now if I could only convince you to try and port over support for this Intel wireless card as well... :)

Link to comment
Share on other sites

Shailua, you are a genius! :)

 

I haven't had time to test this out yet, but will be doing so shortly with my Atheros AR8161 Lan card in this Asus N56VM I have and will post my results!

 

Can't wait to test it out, actually gave up on running OSX on this laptop due to the Ethernet not being supported so this gives me new hope!

 

Now if I could only convince you to try and port over support for this Intel wireless card as well... :)

 

I am on Asus n56VM as well and the kext works perfectly (pretty fast) on Clover UEFI (great boot loader!) v2 in S/L/E But in chameleon the kext output an error message and is not loaded.

Hope it helps

Link to comment
Share on other sites

I am on Asus n56VM as well and the kext works perfectly (pretty fast) on Clover UEFI (great boot loader!) v2 in S/L/E But in chameleon the kext output an error message and is not loaded.

Hope it helps

it's worth noticing this problem.

Maybe you can avoid kp for chameleon by boot with -f

Link to comment
Share on other sites

Thank you for your reply P.H

Maybe I didnt express myself properly .

during the boot wit -v the appear th message

[ALXethernet] Error: Cannot allocate memory for descriptor ring, size=45000

[ALXethernet] Error: Unable to allocate descriptors.

The system boots but no kext loaded .

Link to comment
Share on other sites

Thank you for your reply P.H

Maybe I didnt express myself properly .

during the boot wit -v the appear th message

[ALXethernet] Error: Cannot allocate memory for descriptor ring, size=45000

[ALXethernet] Error: Unable to allocate descriptors.

The system boots but no kext loaded .

:( maybe we have to wait Shailua for its answer.

Link to comment
Share on other sites

Thanks for the error report! That's one of my "oh no this should never happen!" messages, so it's easy for me to pinpoint. I've been tinkering with the memory allocation code a bit lately, so I've hopefully fixed it with a more suitable allocation method that isn't a holdover from the original AtherosL1cEthernet code. Asking the kernel to allocate chunks of contiguous physical memory tends to be rather touchy, but I don't think these cards tolerate anything less. I'll double check everything is still working okay on my desktop machine when I'm back home tomorrow and hopefully get 1.0.2 out soon after that. :)

Link to comment
Share on other sites

 Share

×
×
  • Create New...