Contribute
Register

[Guide] HP Folio 13 Guide (Yosemite/Mavericks)

Status
Not open for further replies.
Joined
Jan 9, 2014
Messages
73
Motherboard
HP Folio 13 (1010es)
CPU
i5-2467M / HM65
Graphics
HD3000, 1366x768
Mac
  1. 0
Classic Mac
  1. 0
Mobile Phone
  1. iOS
After fighting with OS X Mavericks and now Yosemite on my HP Folio 13 (mine is 1010-es, not sure everything will work the same for another model) to make it work as good as possible, I decided to write down a quick guide to save a lot of time to anyone else trying the same.

I want to start saying that my intention is not to reinvent the wheel, so this guide will point to many other guides and threads were the different subjects are far better detailed.

Having said that let's start with what works and what doesn't on this laptop, with stock hardware:

Works:
  • All CPU cores
  • Sleep/PowerManagement
  • Battery indication
  • Sound (speakers, headphones, volume control)
  • HDMI video output
  • Ethernet
  • Most of the keyboard function keys
  • USB 2.0 and 3.0 ports
  • Keyboard (including most special keys)
  • Touchpad
  • Keyboard backlight
  • Bluetooth (with stock hardware -keep reading-)
  • Webcam

Doesn't work:
  • Wifi (with stock hardware, in my case Intel Centrino 1030-N -keep reading-)
  • Card reader
  • Mute button led indication
  • Wifi button to turn wifi on/off

So, let's go for it:

  1. Install OS Mavericks or Yosemite following the general guides on tonymacx86.com but don't run Multibeast yet. You will need to use “cpus=1” bootflag to boot the USB drive to install OS X and then again everytime you boot OS X after installation until you complete step 5 of this guide if you don't want OS X or the OS X installer to hang on boot.
  2. Once you completed OS X installation, login and run Multibeast (check the appropiate version for each OS). I recommend you to use the following parameters:

    Mavericks:

    Quick Start > DSDT Free
    Drivers > Disk > 3rd Party SATA
    Drivers > Disk > TRIM Enabler > 10.9.4+ TRIM Patch
    Drivers > Misc > FakeSMC v6.9.1315
    Drivers > Misc > FakeSMC v6.9.1315 Plugins
    Drivers > Misc > FakeSMC v6.9.1315 HWMonitor Application
    Drivers > Misc > USB 3.0 - Universal
    Drivers > Network > Realtek > AppleRTL8169Ethernet 2.0.6
    Drivers > System > Patched AppleIntelCPUPowerManagement > OS X 10.9.0
    Drivers > System > AppleRTC Patch for CMOS Reset
    Bootloaders > Chimera v3.0.1
    Customize > Boot Options > Basic Boot Options
    Customize > Boot Options > DropSSDT=Yes
    Customize > Boot Options > Hibernate Mode - Laptop
    Customize > Boot Options > Use KernelCache
    Customize > System Definitions > MacBook Pro > MacBook Pro 8,1
    Customize > SSDT Options > Sandy Bridge Core i5
    Customize > Themes > tonymacx86 Black

    Yosemite:

    Quick Start > DSDT Free
    Drivers > Disk > 3rd Party SATA

    Drivers > Disk > TRIM Enabler > 10.10.0 TRIM Patch
    Drivers > Misc > FakeSMC v6.11.1328
    Drivers > Misc > FakeSMC v6.11.1328 Plugins
    Drivers > Misc > FakeSMC v6.11.1328 HWMonitor Application
    Drivers > Network > Realtek > AppleRTL8169Ethernet 2.0.6
    Drivers > System > Patched AppleIntelCPUPowerManagement > OS X 10.9.0
    Drivers > System > AppleRTC Patch for CMOS Reset

    Bootloaders > Chimera v4.0.0
    Customize > Boot Options > Basic Boot Options
    Customize > Boot Options > DropSSDT=Yes
    Customize > Boot Options > Hibernate Mode - Laptop
    Customize > Boot Options > Kext Dev Mode
    Customize > Boot Options > Use KernelCache
    Customize > System Definitions > MacBook Pro > MacBook Pro 8,1
    Customize > SSDT Options > Sandy Bridge Core i5
    Customize > Themes > tonymacx86 Black
  3. Install KernelPatcher.dylib from Chameleon Wizard (google this tool)
  4. Install the necessary KEXTS with Kext Wizard (google this tool). You will need:
    • Patched AppleHDA.kext and IOAudioFamily.kext for sound (they are already available on the Internet)
    • RehabMan's ACPIBacklight.kext for brightness control
    • RehabMan's ACPIBatteryManager.kext for battery
    • RehabMan's VoodooPS2Controller.kext for keyboard and touchpad. For this KEXT please follow the exact instructions on the KEXT website (you will need to install a daemon, etc. Not just the KEXT)
    • GenericUSBXHCI.kext (only on Yosemite -on Mavericks just use the one included Multibeast-) for USB 3.0
    • Patched AppleHDA.kext and IOAudioFamily.kext from the attached file "Audio_Kexts.zip". Please be aware that I found this kexts in the internet and I only test it in the Folio 13 1010-es specific model. I don't know for which version of OS X they were patched and I don't know for which future versions of OS X they will work. I used them with Mavericks and Yosemite successfully tough.
  5. I'm including a patched DSDT so just copy DSDT.aml, SSDT.aml, org.chameleon.Boot.plist, smbios.plist to /Extra from the attached file "Extra.zip"
  6. Optional: change file permissions in /Extra and refresh kext cache from Terminal:

    Code:
    cd /Extra
    chmod 644 *.aml smbios.plist
    sudo touch /System/Library/Extensions
  7. Reboot and this time you shouldn't need any bootflag at all.

Everything in the "Works" list should be working as expected.

Wi-Fi

My laptop stock wifi card is a Intel Centrino 1030-N which is not supported at all on OS X. In your case it might be different since as far as I know Folio 13 is shipped with Intel, Atheros or Broadcom cards. Of course this doesn't matter since none of the shipped models will work with OS-X at time I'm writing this.

Having said that if you want to have wifi, you must replace the stock wifi card with a supported one.
This is not as easy as it sounds, because to add more constrains to the mix, HP is including a whitelist in the laptop BIOS. This means that if you replace the wifi card with one that is not included in the whitelist the laptop will not boot at all. Oh and you think "Why not patch/mod the BIOS to remove the whitelist or add more cards to it?" well....HP thought about that too, so they are signing the BIOS (RSA) and if you modified it and try to flash it, it will fail.

At this point you have too options: the simple one, go with a OS X supported USB wifi dongle and leave the built-in card alone (and use it in other OSs like Linux and Windows) or the other option is to buy a OS X supported wifi card (like Atheros 9280), rebrand it as a wifi card included in HP whitelist (Atheros 9485) to pass the BIOS check during boot and then somehow tell OS X that what it looks like an Atheros 9485 is actually an Atheros 9280 so it can load the driver and make it work.

Only problem I had so far with this approach is in multiboot scenarios where Windows in involved, since I couldn't find a way to make Windows load the wifi drivers. It will always fail with "error 10" and errors in Windows events like "Couldn't find a network adapter" and that sort of things. I already try different driver versions, HP drivers, forcing the drivers in device manager, etc. Nothing worked. Another caveat is that depending on which card are you using to replace the stock one, you may loose bluetooth since as far as I know all the cards used by HP have the bluetooth module incorporated in the wifi card.
So if you don't use bluetooth (or you don't mind using a USB bluetooth dongle from now on) and you don't use Windows at all (or you don't mind using a USB wifi dongle while in Windows), then you can go ahead with the second option, since in Linux the rebranded card should work out of the box and in OS X it will require kext patching, but it should work too.

If like me you decided to go with the rebranding option, this is what I had to do:
  1. Buy a supported wifi card (I got a Azurewave NE-773 in ebay which use an Atheros 9280 chipset)
  2. You will need another computer to do the rebranding (because of the whitelist in the Folio's BIOS)
  3. Rebrand the new wifi card following this guide. In my case I replaced the card's original IDs (168c:002a 1A3B:1081) with IDs for the Atheros 9485 that after some investigation, I assumed will be included in the whitelist (168C:0032 103C:1785). For the rebranding process I used Linux since it's my default OS.
  4. After the rebranding process I was able to install the new wifi card in the laptop and boot.
  5. At this point wifi will not work in Windows, will work OOB in Linux and will not work in OS X.
  6. Now, to make it work in OS X you will need to patch the stock IO80211Family.kext and your DSDT (not included in the attached DSDT). You will do this using the Terminal. Pay special attention to the output of the "md5" commands since it will show you if the patch actually did something or not (the hash should be different):
    For Mavericks:
    Code:
    cd /System/Library/Extensions/IO80211Family.kext/Contents/PlugIns/AirPortAtheros40.kext/Contents/MacOS
    sudo cp AirPortAtheros40 AirPortAtheros40.orig
    sudo perl -pi -e 's|\x83\xc1\xf9\x83\xf9\x29|\x83\xc1\xf1\x83\xf9\x29|g' AirPortAtheros40
    sudo perl -pi -e 's|\x66\x83\xf8\x30\x0f\x87\xa7\x00\x00\x00|\x66\xb8\x2a\x00\x90\x90\x90\x90\x90\x90|g' AirPortAtheros40
    md5 AirPortAtheros40.orig
    md5 AirPortAtheros40
    sudo touch /System/Library/Extensions
    For Yosemite:
    Code:
    cd /System/Library/Extensions/IO80211Family.kext/Contents/PlugIns/AirPortAtheros40.kext/Contents/MacOS
    sudo cp AirPortAtheros40 AirPortAtheros40.orig
    sudo perl -pi -e 's|\x83\xc1\xf9\x83\xf9\x29|\x83\xc1\xf1\x83\xf9\x29|g' AirPortAtheros40
    sudo perl -pi -e 's|\x41\x83\xfa\x30\x0f\x87\xa9\x00\x00\x00|\x41\xba\x2a\x00\x00\x00\x90\x90\x90\x90|g' AirPortAtheros40
    md5 AirPortAtheros40.orig
    md5 AirPortAtheros40
    sudo touch /System/Library/Extensions
  7. To patch DSDT for wifi you should read this thread from post #50 until the end.
  8. Reboot OS X and afterwards you should have wifi working.

Credits: first of all I want to thank RehabMan for his constant support, not only to me and my particular project deploying OS X to this laptop, but more importantly to all the hackintosh community through kexts, guides, etc. Also I would like to thank the rest of people from the community that wrote the guides that I quote in my post and tonymacx86 for such wonderful tools (Unibeast, Multibeast, etc)
 

Attachments

  • Extra.zip
    27.7 KB · Views: 458
  • Audio_Kexts.zip
    1.1 MB · Views: 393
HP Folio 13 Guide (for Yosemite and Mavericks)

While I'm writing the guide:

@RehabMan: I have almost everything working, as it was with Mavericks. The only thing I'm missing is wifi, because of the driver checking the device id before loading:

Code:
[FONT=Menlo]Oct 18 17:34:39 localhost kernel[0]: ATHR: devid[0x0032] not supported.[/FONT]
[FONT=Menlo]Oct 18 17:34:39 localhost kernel[0]: 1.241645: ath_dev_attach: unable to attach hardware; HAL status 1[/FONT]
[FONT=Menlo]Oct 18 17:34:39 localhost kernel[0]: 1.241687: ath_attach[5428]: Device attach failed!, error[-6][/FONT]
[FONT=Menlo]Oct 18 17:34:39 localhost kernel[0]: 1.241714: ath_cwm_detach: error - acw NULL. Possible attach failure[/FONT]
[FONT=Menlo]Oct 18 17:34:39 localhost kernel[0]: 1.241760: start[957]: __ath_attach failed!, error[-6][/FONT]

I already tried the patch you wrote for Mavericks:

Code:
    cd /System/Library/Extensions/IO80211Family.kext/Contents/PlugIns/AirPortAtheros40.kext/Contents/MacOS
    sudo cp AirPortAtheros40 AirPortAtheros40.orig
    sudo perl -pi -e 's|\x83\xc1\xf9\x83\xf9\x29|\x83\xc1\xf1\x83\xf9\x29|g' AirPortAtheros40
    sudo perl -pi -e 's|\x66\x83\xf8\x30\x0f\x87\xa7\x00\x00\x00|\x66\xb8\x2a\x00\x90\x90\x90\x90\x90\x90|g' AirPortAtheros40

But it didn't worked. Maybe I'm asking to much but do you think you can come up with a new patch for Yosemite?
 
HP Folio 13 Guide (for Yosemite and Mavericks)

While I'm writing the guide:

@RehabMan: I have almost everything working, as it was with Mavericks. The only thing I'm missing is wifi, because of the driver checking the device id before loading:

Code:
[FONT=Menlo]Oct 18 17:34:39 localhost kernel[0]: ATHR: devid[0x0032] not supported.[/FONT]
[FONT=Menlo]Oct 18 17:34:39 localhost kernel[0]: 1.241645: ath_dev_attach: unable to attach hardware; HAL status 1[/FONT]
[FONT=Menlo]Oct 18 17:34:39 localhost kernel[0]: 1.241687: ath_attach[5428]: Device attach failed!, error[-6][/FONT]
[FONT=Menlo]Oct 18 17:34:39 localhost kernel[0]: 1.241714: ath_cwm_detach: error - acw NULL. Possible attach failure[/FONT]
[FONT=Menlo]Oct 18 17:34:39 localhost kernel[0]: 1.241760: start[957]: __ath_attach failed!, error[-6][/FONT]

I already tried the patch you wrote for Mavericks:

Code:
    cd /System/Library/Extensions/IO80211Family.kext/Contents/PlugIns/AirPortAtheros40.kext/Contents/MacOS
    sudo cp AirPortAtheros40 AirPortAtheros40.orig
    sudo perl -pi -e 's|\x83\xc1\xf9\x83\xf9\x29|\x83\xc1\xf1\x83\xf9\x29|g' AirPortAtheros40
    sudo perl -pi -e 's|\x66\x83\xf8\x30\x0f\x87\xa7\x00\x00\x00|\x66\xb8\x2a\x00\x90\x90\x90\x90\x90\x90|g' AirPortAtheros40

But it didn't worked. Maybe I'm asking to much but do you think you can come up with a new patch for Yosemite?

Did the patch make any changes... did it match the pattern? Check the md5 sum before and after running the perl command.
 
HP Folio 13 Guide (for Yosemite and Mavericks)

Did the patch make any changes... did it match the pattern? Check the md5 sum before and after running the perl command.

It made changes, since the md5 hash is different. I checked right after applying both perl commands.
Should I try to patch it again?
 
HP Folio 13 Guide (for Yosemite and Mavericks)

It made changes, since the md5 hash is different. I checked right after applying both perl commands.
Should I try to patch it again?

Probably more protection in the code then, or the code logic is different. No time to look into it now...
 
HP Folio 13 Guide (for Yosemite and Mavericks)

Probably more protection in the code then, or the code logic is different. No time to look into it now...

I double checked and it's the second patch that is not doing anything.

I hashed the AirPortAtheros40 before any patching, after the first patch and then again after the second one to verify this.

I also tried to use the patched AirPortAtheros40 from Mavericks but it didn't work. I get the same error (device not supported). My next test will be to use the entire IO80211Family.kext from Mavericks to see if I can work around the problem. Wish me luck.
 
HP Folio 13 Guide (for Yosemite and Mavericks)

I double checked and it's the second patch that is not doing anything.

I hashed the AirPortAtheros40 before any patching, after the first patch and then again after the second one to verify this.

Probably some slight change in the code that requires a new pattern to search/replace.

I also tried to use the patched AirPortAtheros40 from Mavericks but it didn't work. I get the same error (device not supported). My next test will be to use the entire IO80211Family.kext from Mavericks to see if I can work around the problem. Wish me luck.

OK.
 
HP Folio 13 Guide (for Yosemite and Mavericks)

I have good news and bad news.

Good news: using Mavericks patched IO80211Family.kext the wifi card is detected.

Bad news: it doesn't detect any wifi network. This was already happening to me from time to time in Mavericks and turning wifi on and off was helping to solve the problem, but it doesn't seem to help in Yosemite

I will keep investigating it.
 
HP Folio 13 Guide (for Yosemite and Mavericks)

I have good news and bad news.

Good news: using Mavericks patched IO80211Family.kext the wifi card is detected.

Bad news: it doesn't detect any wifi network. This was already happening to me from time to time in Mavericks and turning wifi on and off was helping to solve the problem, but it doesn't seem to help in Yosemite

I will keep investigating it.

Rolling back the IO80211Family.kext is generally a bad idea. There are too many dependencies between it and other components of the system (airportd, for example).
 
HP Folio 13 Guide (for Yosemite and Mavericks)

Rolling back the IO80211Family.kext is generally a bad idea. There are too many dependencies between it and other components of the system (airportd, for example).

Now I know. But anyway I had to try. Without wifi the OS is kind of useless in a laptop.

Can I ask what tool are you using to look at the drivers? Something like IDAPro to disassamble them?

I think I will give a try and see what is missing for the second patch to work.
 
Status
Not open for further replies.
Back
Top