Contribute
Register

[Guide] Lenovo Yoga 2 Pro El Capitan using Clover UEFI

Joined
Nov 30, 2010
Messages
157
Motherboard
Alienware 17 M1
CPU
i7-8750H
Graphics
GTX 2070
Mac
  1. MacBook Pro
Classic Mac
  1. iMac
Mobile Phone
  1. iOS
I - Overview

The purpose of this guide is to aid in the installation of OS X El Capitan, onto the Lenovo Yoga 2 Pro. The main issue with installation will be the QHD+ graphics of the Intel HD4400, where we need to set the DMVT Pre-Allocated value to 96MB. This setting is available in the bios, but not enabled by default. There is also a wi-fi whitelist in the bios, which will allow only Intel wi-fi adapters (none supported in OS X). This guide will assist in removing these roadblocks, and allow us to enjoy OS X on our Yoga 2 Pros

Most of the methods/kexts/scripts below were already available on this site, and just needed to be brought together. Thanks to RehabMan, as a majority of the work below is his. Also thanks to the-darkvoid, toleda, emueller, Austere.J, PeterQuinn (bios-mods), ryman95, and laurajuliette for their contributions. I apologize if I have left anyone out!

** This post assumes you are installing 10.11.6 - the final version of El Capitan **


II - Pre-Installation

Bios – The bios on the Yoga 2 Pro is locked, which means we can’t flash a modified bios. A modified bios would allow us to:
1) set DMVT Pre-allocated memory to 96MB
2) unlock the bios for future flashing
3) remove the whitelist wi-fi restriction
4) flash patched bios - optional, but required to use Broadcom WiFi. For flashing and patched BIOS, please see (https://www.bios-mods.com/forum/Thread-Request-Lenovo-Yoga-2-Pro-76cn31ww-Whitelist-Removal).

The most important thing for installing OS X will be setting the DMVT Pre-Allocated value. Luckily, this can be done without flashing the bios. This guide by Austere.J (http://www.insanelymac.com/forum/topic/305710-guide-intel-hd-graphics-5500-on-os-x-yosemite-10103/) will allow us to set the DMVT Pre-Allocated value to 96MB, using the EFI shell. While this will allow us to install OS X, this is not the process this guide will be using. Instead , we will unlock the bios and set this value in the bios.

Unlocking the Bios
Using the method by PeterQuinn from the bios-mods forum (https://www.bios-mods.com/forum/Thread-Request-Lenovo-Yoga-2-Pro-76cn31ww-Whitelist-Removal?page=9), we will use Linux (Ubuntu) to show the Advanced menu tab, which will allow us to set the DMVT Pre-Allocated value and also unlock the bios for future flashing (think white-list removal!).

Disclaimer #1 – I am not a linux expert, and likely will not be able to provide much support for Linux/Ubuntu.

Disclaimer #2 – although this method is safe, I am not responsible if this bricks your laptop! Anytime you modify the bios you will be assuming a certain amount of risk


The following are the steps to unlock your bios, and get us on our way to installing OS X on our Yoga 2 Pro

1 – Boot into Linux 14.04 using UEFI (F12 at startup of Yoga 2 Pro). I used a bootable USB with Ubuntu, and this guide will assume you know how to create a bootable USB for Linux (and also use Ubuntu). Once booted, you can install to the hard drive, but this guide will assume you will choose Try Ubuntu Without Installing. Also, only version 14.04 is supported, as other versions may not be able to unlock the bios

2 – Once in go to Files, select Computer , and verify the following exists: /sys/firmware/efi/efivars/SCUShowHiddenPage8be4df61-93ca-11d2-aa0d-00e098032b8c. This is what we will modify to show the Advanced menu tab in out bios

3 – open terminal (if you have installed Linux already, you may be able to proceed to step 4)
A – enable the Universe repository –
Code:
sudo add-apt-repository universe
B – update the package list -
Code:
sudo apt-get update
C- install ghex –
Code:
sudo apt-get install ghex

4 - Run the code provided by PeterQuinn -
Code:
sudo ghex /sys/firmware/efi/efivars/SCUShowHiddenPage-8be4df61-93ca-11d2-aa0d-00e098032b8c
. This will bring up the ghex GUI
Screenshot%20from%202016-01-10%2018%3a50%3a29.png

5 – Change the last value from 00 to 01
Screenshot%20from%202016-01-10%2018%3a53%3a18.png

6 – Save your work (File, Save).

7 – Restart laptop, enter bios (F2) and the Advanced menu tab should now be available
IMG_1111.JPG

8 – In the Advanced menu tab, open Video Configuration
IMG_1131.JPG

9 - Under IGD – DVMT Pre-Allocated change value to 96 MB
IMG_1112.JPG

10 – Go back to the Advanced menu, and open Chipset Configuration

11 – Arrow down to the bottom, and set BIOS Lock to Disabled
IMG_1127.JPG

12 – Exit saving changes (F10)



III - Installation

Follow the Clover guide (http://www.tonymacx86.com/el-capita...de-booting-os-x-installer-laptops-clover.html) using version V3330 or better. As stated in the guide, install FakeSMC and VoodooPS2Controller to the EFI\Clover\kexts\other folder, on the USB Installer (and later to the HDD). Creation and installation should be standard, but until the graphics are patched you will need to boot without injecting Intel graphics. This can be done by editing the config.plist (enabled by default), or by unchecking the option during the boot process (during boot, select Options\Graphics Injector Menu\ uncheck InjectIntel)



IV - Post-Installation

1 - Install Clover to HDD (also covered in the Clover guide above)

2 - Install RehabMan’s config_HD4600_4400_4200plist from (https://github.com/RehabMan/OS-X-Clover-Laptop-Config)
- Change ig-platform-id of config.plist to 0x0a2e0008
- add the HD4400 Azul Framebuffer Size 96MB patch to config.plist, from emueller’s thread (http://www.tonymacx86.com/yosemite-...novo-yoga-2-pro-hd4400-qhd-qe-ci-working.html) ( or modify existing Enable 96MB DVMT-prealloc, 0x0a2e0008 patch)
- add AppleHDA patches from RehabMan U430 repo (https://github.com/RehabMan/Lenovo-U430-Touch-DSDT-Patch) (listed in config_install.plist)
- (optional) add Broadcom WiFi and BT patches from toleda’s guide (http://www.tonymacx86.com/network/104850-guide-airport-pcie-half-mini-v2.html)



3 - Install Kexts (all courtesy of Rehabman, with links to their repositories):
- (https://github.com/RehabMan/OS-X-Fake-PCI-ID) FakePCIID, FakePCIID_Intel_HD_Graphics, optional - FakePCIID_Broadcom_WiFi, FakePCIID_Intel_HDMI_Audio
- (https://github.com/RehabMan/OS-X-BrcmPatchRAM) BrcmFirmwareRepo, BrcmPatchRAM2 (if swapping Broadcom wifi/bt )
- (https://github.com/RehabMan/Lenovo-U430-Touch-DSDT-Patch) AppleHDA_ALC283 and Clover patches from the U430 repo – follow instructions!
- (https://github.com/RehabMan/OS-X-ACPI-Battery-Driver) ACPIBatteryManager
- (https://github.com/RehabMan/OS-X-Intel-Backlight) Intell Backlight for El Capitan
- (https://github.com/RehabMan/OS-X-Null-Ethernet) NullEthernet (optional, recommended if using USB WiFi)


4 – DSDT / SSDT

Follow the guide in the El Capitan Laptop Support (http://www.tonymacx86.com/el-capitan-laptop-support/152573-guide-patching-laptop-dsdt-ssdts.html). Extract files during Clover boot, by pressing the F4 key prior to boot. Also, extracted files may differ, due to laptop hardware and BIOS settings. The fixes below apply to my Yoga 2 Pro, with the i7-4500U and 8GB RAM.

As stated in the guide above, create a file called refs.txt, and enter this into file:
Code:
External(MDBG, MethodObj, 1)
External(_GPE.MMTB, MethodObj, 0)
External(_SB_.PCI0.LPCB.H_EC.ECRD, MethodObj, 1)
External(_SB_.PCI0.LPCB.H_EC.ECWT, MethodObj, 2)
External(_SB_.PCI0.LPCB.H_EC.ECMD, MethodObj, 1)
External(_SB_.PCI0.PEG0.PEGP.SGPO, MethodObj, 2)
External(_SB_.PCI0.GFX0.DD02._BCM, MethodObj, 1)
External(_SB_.PCI0.SAT0.SDSM, MethodObj, 4)
External(_GPE.VHOV, MethodObj, 3)
External(_SB_.PCI0.XHC.RHUB.TPLD, MethodObj, 2)
External(_GPE.OSUP, MethodObj, 1)
Place this file in your extracted DSDT/SSDT folder, and disassemble after removing non-DSDT/SSDT files:
Code:
iasl -da -dl -fe refs.txt *.aml

DSDT:
• Remove _DSM methods
• Rename GFX0 to IGPU
• Rename B0D3 to HDAU
• Fix _WAK Arg0 v2
• Audio Layout 3
• IRQ Fix
• [bat] Lenovo Yoga 2 Pro
• SMBUS Fix
• HPET Fix
• RTC Fix
• OS Check Fix
• Fix Mutex with non-zero SyncLevel
• Fix PNOT/PPNT
• Add IMEI
• USB _PRW 0x6D (instant wake)


SSDT-0, SSDT-1, SSDT-3, SSDT-8
• Rename GFX0 to IGPU

SSDT-2 :
• Remove _PSS placeholders
• Rename GFX0 to IGPU

SSDT4x/5x/6x delete

SSDT7 :
• Rename GFX0 to IGPU
• Rename B0D3 to HDAU
• Brightness Fix (Haswell/Broadwell)

Generate SSDT.aml in MaciASL (Tools/Generate SSDT, use values 15W, 3000 max, 1800 min).

Install all .aml files to EFL/CLOVER/ACPI/patched, then check Drop OEM in the config.plist (ACPI tab)


5 – patching IOKit to remove pixel clock limitations

From the-darkvoid github:

Run the following code in order to patch IOKit in order to disable CheckTimingWithRange

Code:
sudo perl -i.bak -pe 's|\xB8\x01\x00\x00\x00\xF6\xC1\x01\x0F\x85|\x33\xC0\x90\x90\x90\x90\x90\x90\x90\xE9|sg' /System/Library/Frameworks/IOKit.framework/Versions/Current/IOKit
sudo codesign -f -s - /System/Library/Frameworks/IOKit.framework/Versions/Current/IOKit

*** The first boot with Inject/Intel=true needs to be 'without caches' because you're coming from a state where graphics drivers are not in cache. Clover can patch only things it loads. In the case of graphics drivers not in cache (due to booting without injection previously), the patches won't be applied unless you boot without caches.

After that you can rebuild cache:

Code:
sudo touch /System/Library/Extensions && sudo kextcache -u /

And then boot normally... (thanks again RehabMan!) ***


V - Fun time!!!

At this point, you should be able to reboot, and everything should be working. The work can be done in multiple stages, but you will need to boot without injecting Intel until the last step is complete (framebuffer patch). Random notes from installs:

- I had to install VoodooHDA on one install, to get past a sound assertion error. was able to successfully load AppleHDA_ALC283 after this, but did not track down the issue
- until graphics are working properly, system boots at 3200x1800 resolution. Booting with micro-HDMI monitor attached, resolution was ~800x600, so might be easier to work at this resolution
- HDMI audio has not been tested
- brightness keys still need to be mapped (currently FN/Home +, FN/PgUp -)
- El Capitan installed as only OS on drive
 
Last edited:

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,247
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
...
2 - Install RehabMan’s config_HD4600_4400_4200plist from (https://github.com/RehabMan/OS-X-Clover-Laptop-Config)
- Change ig-platform-id of config.plist to 0x0a260008

You can simply boot without injection (from Clover GUI) or set config.plist/Graphics/Inject/Intel=true. Since 0xa260008 is not a valid ig-platform-id, it simply disables the graphics drivers which falls back to VESA mode.

- add the HD4400 Azul Framebuffer Size 96MB patch to config.plist, from emueller’s thread (http://www.tonymacx86.com/yosemite-...novo-yoga-2-pro-hd4400-qhd-qe-ci-working.html) ( or modify existing Enable 96MB DVMT-prealloc, 0x0a2e0008 patch)

Note there is a 96mb patch already in the config.plist from my repo (but disabled).


5 – patch framebuffer

Download the script to change the frambuffer (http://www.tonymacx86.com/attachmen...novo-yoga-2-pro-hackintosh-pathiokitelcap.zip) provided by laurajuliette, extracted from the-darkvoid’s XPS9530-OSX repository. Run the script that matches your version of El Capitan (guide was installed using 10.11.1, updated to 10.11.2 and ran new script).

FYI: This has nothing to do with the framebuffer. This is patching IOKit to remove pixel clock limitations. Fraembuffer is patched via config.plist.

- I had to install VoodooHDA on one install, to get past a sound assertion error. was able to successfully load AppleHDA_ALC283 after this, but did not track down the issue

ALC283 is the same as my Lenovo u430. You can use AppleHDA_ALC283.kext in my u430 repo...

https://github.com/RehabMan/Lenovo-U430-Touch-DSDT-Patch

Requirements:
- Clover bootloader
- config.plist must have the four AppleHDA patches from my config.plist in the repo
- AppleHDA.kext must be vanilla
- CodecCommander.kext installed to /S/L/E: https://github.com/RehabMan/EAPD-Codec-Commander
- AppleHDA_ALC283.kext installed to /S/L/E
- rebuild cache following the procedure detailed in the u430 guide: http://www.tonymacx86.com/yosemite-...ideapad-u330-u430-u530-using-clover-uefi.html
- DSDT patches "IRQ Fix" and "Audio Layout 3".
 
Joined
Nov 30, 2010
Messages
157
Motherboard
Alienware 17 M1
CPU
i7-8750H
Graphics
GTX 2070
Mac
  1. MacBook Pro
Classic Mac
  1. iMac
Mobile Phone
  1. iOS
You can simply boot without injection (from Clover GUI) or set config.plist/Graphics/Inject/Intel=true. Since 0xa260008 is not a valid ig-platform-id, it simply disables the graphics drivers which falls back to VESA mode.


Note there is a 96mb patch already in the config.plist from my repo (but disabled).



FYI: This has nothing to do with the framebuffer. This is patching IOKit to remove pixel clock limitations. Fraembuffer is patched via config.plist.



ALC283 is the same as my Lenovo u430. You can use AppleHDA_ALC283.kext in my u430 repo...

https://github.com/RehabMan/Lenovo-U430-Touch-DSDT-Patch

Requirements:
- Clover bootloader
- config.plist must have the four AppleHDA patches from my config.plist in the repo
- AppleHDA.kext must be vanilla
- CodecCommander.kext installed to /S/L/E: https://github.com/RehabMan/EAPD-Codec-Commander
- AppleHDA_ALC283.kext installed to /S/L/E
- rebuild cache following the procedure detailed in the u430 guide: http://www.tonymacx86.com/yosemite-...ideapad-u330-u430-u530-using-clover-uefi.html
- DSDT patches "IRQ Fix" and "Audio Layout 3".

- I booted without injection from Clover, but makes sense that injecting an invalid id would serve the same purpose

- I modified the 96MB patch, since it seemed to be missing digits. I will go back and test the original patch as is...

- I have made the correction for patching IOKit. Sloppy notes on my part!

- I used your U430 repo, and the process outlined, but don't think I installed audio on the first boot. Was more concerned with getting graphics running first
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,247
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
- I booted without injection from Clover, but makes sense that injecting an invalid id would serve the same purpose

Booting without injection is easier and more straitforward than using an invalid ig-platform-id.

- I modified the 96MB patch, since it seemed to be missing digits. I will go back and test the original patch as is...

No missing digits.

Also... should be mentioned in the guide... The first boot with Inject/Intel=true needs to be 'without caches' because you're coming from a state where graphics drivers are not in cache. Clover can patch only things it loads. In the case of graphics drivers not in cache (due to booting without injection previously), the patches won't be applied unless you boot without caches.

After that you can rebuild cache:
Code:
sudo touch /System/Library/Extensions && sudo kextcache -u /

And then boot normally...


- I used your U430 repo, and the process outlined, but don't think I installed audio on the first boot. Was more concerned with getting graphics running first

Not sure what you mean by 'installed audio'...
 
Joined
Nov 30, 2010
Messages
157
Motherboard
Alienware 17 M1
CPU
i7-8750H
Graphics
GTX 2070
Mac
  1. MacBook Pro
Classic Mac
  1. iMac
Mobile Phone
  1. iOS
updated guide for first boot with Inject/Intel=true

'installed audio' meant installing AplleHDA_ALC283 kext and adding patches. I was trying to do one part at a time, and was saving the audio portion until alter...
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,247
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
updated guide for first boot with Inject/Intel=true

You still have this "Change ig-platform-id of config.plist to 0x0a260008"

Does not make any sense.
 
Joined
Nov 30, 2010
Messages
157
Motherboard
Alienware 17 M1
CPU
i7-8750H
Graphics
GTX 2070
Mac
  1. MacBook Pro
Classic Mac
  1. iMac
Mobile Phone
  1. iOS
updated to 0x0a2e0008, which is in my config.plist. more sloppy notes
 
Joined
Aug 19, 2015
Messages
68
Motherboard
Gigabyte z170 HD3P
CPU
Core i5 6400
Graphics
GTX 970
Mobile Phone
  1. iOS
My ssdt files seem to be in a different order. The patches you need for 7 were the ones I could apply to 4. Seems like it's odd. Could you help me with advice of which ones I should keep? Linux listed 6, 7, 8 in a folder called dynamic.

I tried excluding these, but it breaks my battery status, even without replacing the dsdt.

Note that the ssdts are already edited. If needed, I also attached the original amls.

I'm pretty bad at understanding dsdt/ssdt, so help would be greatly appreciated.
View attachment Archive.zipView attachment amlfromlinux.zip
 

Attachments

  • amls.zip
    35.5 KB · Views: 220
Joined
Aug 19, 2015
Messages
68
Motherboard
Gigabyte z170 HD3P
CPU
Core i5 6400
Graphics
GTX 970
Mobile Phone
  1. iOS
maybe it is related to me having the core i5 version, not sure.

Anyhow, if you can help me fix this, I'd super grateful. At the moment I am using some elses ssdts, which is a bad idea.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,247
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
My ssdt files seem to be in a different order. The patches you need for 7 were the ones I could apply to 4. Seems like it's odd. Could you help me with advice of which ones I should keep? Linux listed 6, 7, 8 in a folder called dynamic.

I tried excluding these, but it breaks my battery status, even without replacing the dsdt.

Note that the ssdts are already edited. If needed, I also attached the original amls.

I'm pretty bad at understanding dsdt/ssdt, so help would be greatly appreciated.
View attachment 172047View attachment 172051

The guide in post #1 extracts native ACPI using Clover, not Linux.
 
Top