Contribute
Register

[Guide] HP Elite X2 1012 G1 - The ultimate OS X tablet? Pretty close....

Joined
Dec 3, 2011
Messages
452
Motherboard
HP Elite X2
CPU
i5-7600U
Graphics
HD 620 2736 x 1834
Mac
  1. MacBook Pro
  2. Mac Pro
Classic Mac
  1. 128K
  2. 512K
Mobile Phone
  1. iOS
*** 8/14/17 -- Time for an enterprising soul to pick up the mantle...I bought the next generation of the Elite X2 (guide will be forthcoming). VoodooI2C updates and improvements will continue as they occur...


*** 6/5/17 -- Improved VoodooI2C multitouch transitions and false click reductions. New kext attached.
-- Early support for touch-base's UPDD gesture control via touch injection...More to follow.


Just a little teaser video demonstrating the HP Elite X2 running El Capitan. The only things that aren't working are the SD Card (of course, lol) and Thunderbolt 3 (forgot the rear camera doesn't work either, but the front does). Sierra does install, but the not working list gets longer I'm afraid. **** EDIT **** - Just completed a test of Sierra now that there have been some updates and it works as well as El Capitan (KeyUp has some oddities, however).






Here's a disassembly video for replacing the Wi-Fi and/or SSD. Pretty simple to get apart, but take care when reassembling...They snap the screen back in willy nilly, but it's best to seat the left or right side first and allow the screen to bend slightly while seating the other side. The long sides snap in without a problem, the short ends are a little tricky. The screen is Gorilla Glass 4 and is ridiculously bendy..lol.












By all means, if something isn't clear, please let me know and I'll add the appropriate info!



Bios Settings



First ensure you have updated to bios version 1.19, there are some ACPI variable changes from previous versions that will not be compatible with all of the DSDT/SSDT mods I’ve made.



Security Tab

Turn TPM off.



Advanced Tab

  • Boot Options – turn everything OFF except the following
    • CD-ROM Boot (probably doesn’t matter)
    • USB Storage Boot
    • Audio Alerts During Boot (probably doesn’t matter)
    • UEFI Boot
  • Secure Boot Configuration
    • Set to Legacy Support Disable and Secure Boot Disable
    • Uncheck everything else
  • System Options – leave everything checked except
    • Swap Fn and Ctrl (Keys)
    • Launch Hotkeys with Fn Keypress
  • Built-In Device Options
    • Set the video memory size to 64mb
    • You can leave everything checked, I disable NFC because it doesn’t apply to my system.
  • Port Options
    • Check USB Ports and USB Charging Port Function (if desired)
    • I leave the media card reader checked but it doesn’t work in OS X.
  • Power Management Options
    • Check Runtime Power Management
    • Check Extended Idle Power States
    • Check Power Control
    • Uncheck everything else, particularly connected standby


Install USB Creation



You’ll need a USB stick 8GB or larger and a real Mac or a working Hackintosh.

First download El Capitan from Apple and ensure it is in your /Applications folder.

Also download the latest version of the Clover bootloader from sourceforge.

Format the USB stick with Disk Utility, OSX Extended journaled and GUID Partition Map with the name INSTALL



Use the following terminal command and enter your password to put the installer on the USB stick:

sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/INSTALL --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app --nointeraction



Install Clover to the USB with the follow options:

  • Install for UEFI booting only
  • Install Clover in the ESP
  • All themes
  • Drivers64UEFI
    • EmuVariableUEFI-64
    • OsxAptioFix2Drv-64
  • Install RC scripts on target volume


After that’s done and the EFI partition is mounted, install HFSPlus.efi and remove Vbox. An easy way to accomplish this is with Clover Configurator’s Driver install pane.



Add the already patched ACPI files, config.plist, and kexts from the attached install zip. Using ACPI files from someone else’s machine isn’t generally advised, but it will be ok to do for the installation. However, we will be patching the files specific to your machine so you have the best experience possible running OS X.



To get the latest kexts needed for the HP Elite X2

(If installing Sierra, VoodooPS2Controller causes a problem with sleep via the lid for some unknown reason. Sleep still works via the menu or the power button. If this is important to you, the Elan SmartTouchPad kext cures the issue but introduces others - **** I attempted to link to the page, but apparently you'll have to search for it as it won't let me submit the link****
With SmartTouchPad, you lose the volume keys on the side of the device and the brightness control via the keyboard, but sleep via the lid works everytime. See the install thread in the Sierra Guide section to get the volume keys working again.)





Dual Booting



If you’re keeping the stock drive, it is not likely that you’ll be able to install without wiping the drive unless your EFI partition is at least 200mb. If it is, then you can shrink the Windows volume with Disk Management, create a new partition in the free space and format it, doesn’t matter what file system, and proceed to the install.



If your EFI partition is less than 200mb (windows usually makes it 160mb) or you’re starting with a bare drive, you’ll need to install / reinstall windows so proceed to the install portion.



Installation



Plug in your newly created USB drive and start the Elite X2. Once the HP boot logo appears, press the volume down button. When the menu appears, select the boot menu and then your USB drive. Once Clover has booted, select install mac os x.



When you’re booted into the installer, open up Disk Utility:

  • If your EFI partition made the cut and you’re keeping your Windows install
    • Select the empty partition you created with Disk Management and erase it. Make sure you have OS X Extended (journaled) selected. Call it whatever you would like.
  • If your EFI partition was too small to be used
    • Select your drive and erase / partition it however you would like but ensure:
      • GUID is selected
      • Use only OSX partition types (even for what will be your windows installation) If you use exfat or fat anywhere, it will create a hybrid disk and Windows 10 will NOT install later (forcing you to start over)


After all that business is sorted out, quit Disk Utility and install OS X.



After it is complete, reboot, press the volume down key, select the boot menu, and select your USB drive again. When Clover appears this time select your OS X installation.



Once you have booted and completed the set up (note: don’t log in with your Apple ID yet), install Clover to your hard drive using the same settings and files as before; however, this time instead of putting the kexts on the EFI partition, install them to your SSD using kext wizard (preferred) or another utility. And this time add VoodooI2C to get your touchscreen functioning. (Don’t be alarmed if it KPs on the first boot after installing. I don’t know why this happens, but after that it will be fine. Keep in mind this kext is in an Alpha stage. But it is stable on the Elite other than this quirk) Also, it is necessary to remove AppleIntelLpssI2C.kext and AppleIntelLpssI2CController.kext from /System/Library/Extensions/ For some reason, these will still load ahead of VoodooI2C even though they do nothing in OS X.



Reboot and install Windows if you need to. Once that is complete, reboot once more (without your USB) and press the volume down button. Select the Boot Menu, but this time select ‘boot from file’, then your EFI partition, EFI again, CLOVER, then CLOVERX64.efi.



Once Clover is up, press the F4 key once, also press Fn+F4 once just in case, and then boot into your installation. What you just did was extract your native ACPI files that we will use to patch your system for full functionality. This is a needed step, continuing to use my ACPI files is likely to cause you problems that are hard to identify or rectify.



Now to solve the issue of boot order…The HP Elite is very stubborn about adding UEFI boot entries for some reason so the simplest solution is once you are in OSX, mount your EFI partition (using clover configurator, etc) and navigate to /EFI/EFI/Microsoft/Boot/

Now find the ‘bootmgfw.efi’ file and rename it to ‘bootmgfw-orig.efi’ The Elite will boot to Clover ever more, except after a major Windows update. When it starts booting directly to Windows again, simply repeat the process.



ACPI Patching



Some things you’ll need to patch your ACPI files –

Iasl - https://github.com/RehabMan/Intel-iasl

MaciASL - https://github.com/RehabMan/OS-X-MaciASL-patchmatic



Most of the patches used are compiled from here:

https://github.com/RehabMan/Laptop-DSDT-Patch



I will list them so you can use them directly from RehabMan’s repository except the few I had to build specifically for the Elite X2 or you can use the preassembled and attached files to patch with.



First we start with disassembly. Mount your EFI partition and navigate to /EFI/CLOVER/ACPI/origin/



Copy the DSDT and all the SSDT files to a folder on your desktop. Add refs.txt to the folder.



Open up the Terminal, navigate to the folder and type the following –



iasl -da -dl -fe refs.txt *.aml





Once it’s done processing, remove all the *.aml files and every SSDT that contains an ‘x’ in the name (those are dynamic and are loaded when needed).



You should be left with the following .dsl files –



  • DSDT.dsl
  • SSDT-0.dsl
  • SSDT-1.dsl
  • SSDT-2.dsl
  • SSDT-3.dsl
  • SSDT-4.dsl
  • SSDT-5.dsl
  • SSDT-6.dsl
  • SSDT-7.dsl
  • SSDT-8.dsl
  • SSDT-16.dsl
  • SSDT-17.dsl


The files in the patches .zip are named with the files they go with. Just go down the list and open the DSDT / SSDTs in MaciASL, hit the patch button and copy/paste the corresponding patch into the box. After it’s applied, select ‘save as’ and save the file as ACPI Machine Language Binary. Once you are done with all of the files, copy them to /EFI/EFI/CLOVER/ACPI/patched/ and you are done!



If you want to use the patches directly from RehabMan’s patch repository, these are the ones you need to apply



  • DSDT
    • Rename _DSM methods to XDSM
    • HPET fix
    • IRQ fix
    • RTC fix
    • SMBUS fix
    • SkyLake LPC
    • OS Check Fix (Windows 8)
      • In the patch window, replace 2012 with 2015 in both places. The HP Elite is a Windows 10 machine.
    • Rename GFX0 to IGPU
    • USB3_PRW 0x6D Skylake (instant wake)
      • This isn’t strictly necessary, but advisable
    • Brightness Fix
    • Shutdown Fix
    • HP Elite X2 battery (added to Rehabman’s repo by me)
    • Next, you will need to develop your own patch or manually makes these changes
      • In RP15 change Store (PNLF, LNSL) to Store (\PNLF, LNSL)
      • In the I2C0 device change XDSM back to _DSM
      • In the TPL0 device change XDSM back to _DSM
      • Insert the following line into the TPL0 device
        • Name (_ADR, Zero)
      • Change the HECI device to IMEI
  • SSDT 0, 1, 4-8, 17
    • Rename GFX0 to IGPU
  • SSDT 2, 3
    • Rename _DSM methods to XDSM
    • Rename GFX0 to IGPU
  • SSDT 16
    • In the Definition Block add the following
      • External (_SB_.PCI0.LPCB.PS2K, DeviceObj)
    • Rename _DSM methods to XDSM
    • Rename GFX0 to IGPU
    • For the volume keys to function, in Method _Q30 ONLY
      • Search for VBPS, 0x02 and add the following after the if statement bracket
        • Notify (\_SB.PCI0.LPCB.PS2K, 0x0430)
      • Search for VBPS, 0x03 and add the following after the if statement bracket
        • Notify (\_SB.PCI0.LPCB.PS2K, 0x042E)






FaceTime / iMessage



You’ll notice in the included config.plist under the SMBIOS section, I have some Xs in the Serial Number and MLB sections. This is because you need to have one that is unique to your device while not being tied to an actual MacBook for iMessage, etc to function. There are a couple of ways to accomplish this, you can use Clover Configurator (probably easiest) to generate a serial using the shake buttons or you can simply make up some numbers/letters to replace the Xs. Once you have a serial you would like to try, go to http://www.everymac.com/ultimate-mac-lookup/



Paste in your serial number, hit the robot dohicky, and click Lookup.

If you’re greeted with a machine description, then your serial number is valid and correctly formatted. If not, pick another.



When you have one that is correct, go to https://checkcoverage.apple.comand check the serial number again. If you get the message that it is not valid, you are good to go and can use that serial number. If you are greeted with the picture of a MacBook and warranty information – STOP, pick another serial and repeat the whole process. This means that you have picked one that belongs to a physical MacBook that somebody owns. Using the serial number won’t work and will likely get your Apple ID banned.



Now, you need to add an MLB to Rt Variables, all I have ever done is taken my serial number and added 5 hex digits to the end. You also need to add a unique ROM to the same section. I always use the MAC address of my wifi.



Once you have all of this set up and saved in your config.plist, reboot and enjoy!





VoodooI2C



The main project is located here - https://github.com/alexandred/VoodooI2C

Compiled from the master, you will only have single touch functionality.



If you want all the gestures I demonstrated in the video, then either use the VoodooI2C kext I attached or build it with XCode from my fork here - https://github.com/blankmac/VoodooI2C/tree/FiveFingerGestures/VoodooI2C





Available Gestures



  • Two Finger Scrolling
  • Three Finger Swipes (These are stock and don’t need configuring)
    • Left – Control+LeftArrow – Mission Contrrol move one desktop left
    • Right – Control+RightArrow – MC move one desktop right
    • Up – Control+UpArrow – Show Mission Control
    • Down – Show Application Window
  • Four Finger Swipes (Some need setup)
    • Left – Command+Q Quit application
    • Down – Command+W Close Window (Or tab in a browser)
    • Right – F11 Show Desktop
    • Up – Control+F11 LaunchPad (must turn it on and set the shortcut in System Preferences)
  • Five Finger Swipes (Some need setup)
    • Left – Control+F9 Show notification center (must setup in System Preferences)
    • Down – Command+F11 Turn Dock hiding on/off (must setup in System Preferences)
    • Right – Command+Space Show Spotlight search
    • Up – Control+F10 In my system this launches an automator service which launches ‘KeyUp’, an onscreen keyboard app. Highly recommended, but set this shortcut or any of the preceding to whatever you prefer, obviously.


I added the gesture support for the Wacom and extrapolated the four and five finger gestures as the original project stops at three and was intended for a trackpad. The developer of the gesture engine (@coolstar on github) has said he may add additional ones. As long as I own the Elite, I will continue to update and refine the touchscreen where and when possible.
 

Attachments

  • PostInstallKexts.zip
    4.4 MB · Views: 819
  • refs.txt
    378 bytes · Views: 877
  • HPElite-DSDT-SSDT-Patches.zip
    9.1 KB · Views: 654
  • CLOVER-INSTALLUSB.zip
    4.7 MB · Views: 875
  • VoodooI2C.kext.zip
    70.6 KB · Views: 730
Last edited:
Joined
Dec 9, 2011
Messages
25
Motherboard
Z97-HD3
CPU
i7-4970
Graphics
GTX970
Wow Dude, This is amazing. You are awesome for not only making the tutorial but also making all the tweaks open source!
 
Joined
Dec 3, 2011
Messages
452
Motherboard
HP Elite X2
CPU
i5-7600U
Graphics
HD 620 2736 x 1834
Mac
  1. MacBook Pro
  2. Mac Pro
Classic Mac
  1. 128K
  2. 512K
Mobile Phone
  1. iOS
Wow Dude, This is amazing. You are awesome for not only making the tutorial but also making all the tweaks open source!

Thanks! I'll take some credit for figuring out the Elite, but let's not get carried away...Without RehabMan's process/patches/kexts there would be a lot left undone. And VoodooI2C represents the work of quite a few people. My part in that has been a very small and recent one. :)
 
Joined
Jan 3, 2017
Messages
9
Motherboard
HP Elite X2 1012
CPU
Skylake M3
Graphics
Intel HD 515
Hi, I followed your tutorial, however, I can't seem to get the iMessage/Facetime part to work.

When i run the iMessageDebug, the ROM and Board Serial Number says: failed.
If i check the config.plist on my EFI drive, it shows the ROM and Board Serial Number as expected.
As a result, i'm not able to get into iMessage or FaceTime and etc.

What am i doing wrong? Everything else works great!
 
Joined
Dec 3, 2011
Messages
452
Motherboard
HP Elite X2
CPU
i5-7600U
Graphics
HD 620 2736 x 1834
Mac
  1. MacBook Pro
  2. Mac Pro
Classic Mac
  1. 128K
  2. 512K
Mobile Phone
  1. iOS
Hi, I followed your tutorial, however, I can't seem to get the iMessage/Facetime part to work.

When i run the iMessageDebug, the ROM and Board Serial Number says: failed.
If i check the config.plist on my EFI drive, it shows the ROM and Board Serial Number as expected.
As a result, i'm not able to get into iMessage or FaceTime and etc.

What am i doing wrong? Everything else works great!
Hmm....I'm assuming you added the hex digits to the MLB (serial # + 5 hex digits) In my SMBIOS section, I leave the board serial number blank. I'm no expert at the iMessage stuff. I would try following the guide here to see if you get a better result- https://www.tonymacx86.com/threads/an-idiots-guide-to-imessage.196827/
it will tell you to leave the MLB blank so clearly there are many different ways to skin this particular cat. If that doesn't get you anywhere, post up your config.plist and we will figure it out.
 
Joined
Jan 3, 2017
Messages
9
Motherboard
HP Elite X2 1012
CPU
Skylake M3
Graphics
Intel HD 515
Hmm....I'm assuming you added the hex digits to the MLB (serial # + 5 hex digits) In my SMBIOS section, I leave the board serial number blank. I'm no expert at the iMessage stuff. I would try following the guide here to see if you get a better result- https://www.tonymacx86.com/threads/an-idiots-guide-to-imessage.196827/
it will tell you to leave the MLB blank so clearly there are many different ways to skin this particular cat. If that doesn't get you anywhere, post up your config.plist and we will figure it out.

Yes i tried that. No luck. Can't sign into iCloud or AppStore.
A few of the websites say something about having ethernet as en0; but we don't have ethernet.
How did you guys get that to work?
 
Joined
Dec 3, 2011
Messages
452
Motherboard
HP Elite X2
CPU
i5-7600U
Graphics
HD 620 2736 x 1834
Mac
  1. MacBook Pro
  2. Mac Pro
Classic Mac
  1. 128K
  2. 512K
Mobile Phone
  1. iOS
Yes i tried that. No luck. Can't sign into iCloud or AppStore.
A few of the websites say something about having ethernet as en0; but we don't have ethernet.
How did you guys get that to work?
It doesn't have to be ethernet, wifi as en0 will suffice provided you swapped in a compatible card.
 
Joined
Jan 3, 2017
Messages
9
Motherboard
HP Elite X2 1012
CPU
Skylake M3
Graphics
Intel HD 515
It doesn't have to be ethernet, wifi as en0 will suffice provided you swapped in a compatible card.

Hmm I don't have a compatible card yet. I was just using a USB wifi adapter. Where is a good place to get the dell wifi card? I don't see it on the dell website.

Do you think that is the problem?
 
Joined
Dec 3, 2011
Messages
452
Motherboard
HP Elite X2
CPU
i5-7600U
Graphics
HD 620 2736 x 1834
Mac
  1. MacBook Pro
  2. Mac Pro
Classic Mac
  1. 128K
  2. 512K
Mobile Phone
  1. iOS
Hmm I don't have a compatible card yet. I was just using a USB wifi adapter. Where is a good place to get the dell wifi card? I don't see it on the dell website.

Do you think that is the problem?
That is almost certainly the problem. If you're going to order directly from Dell, you have to call them. It's not listed on their site. You can also find the dw1560 card on eBay, but direct from Dell is the least expensive and you'll be certain to get a genuine card.

In the meantime you may be able to get away with using a nullethernet kext, but I have zero experience with it.
 
Top