Guide for Installing OS X on Lenovo IdeaPad Y510p


Guide for Installing OS X on Lenovo IdeaPad Y510p

 

Source: http://www.insanelymac.com/forum/topic/303276-guide-for-installing-os-x-on-lenovo-ideapad-y510p/page-1

Always visit the original source as that will be more updated. This is just for my reference.

 
Overview:

  • This guide will always be incomplete (this is not a mac anyway) and I will refine it overtime time as needed
  • This guide is intended to help the very newbies having Lenovo Y510p to taste either OS X Yosemite (10.10.x) or OS X El Capitan (10.11)
  • As some may have different partition layout or different hardware, it should be noted this is not a definite guide and you must adapt according to the situation you have
  • For every step there might be other ways to do it better (or worse). The experts here in this forum may not agree with some of the steps mentioned here. This is what I had to do to get it working for my liking but comments and suggestions are very welcome indeed.
  • The work introduced here is gathered and collected from many sources. My contribution is the least of all and I will try to give credit where it belongs as much as I remember. For any work I forgot to give credit I apologise for not remembering the source.

Disclaimer:

 

Although no one ever reported broken Y510p because of this guide, still I hold no responsibility for broken systems. Proceed at your own risk, read, read again, and ask before attempting something you are not OK with. Whoever is going to use part or all of this guide, please backup everything you are going to tinker with first.​

What Works and What Does not (for both Yosemite and El Capitan)
Simply put, almost everything works if the post-installation fixes are followed carefully. In summary:

What Works  :thumbsup_anim: 

  • Graphics with full acceleration QE/CI (using Intel GPU only)
  • Audio using AppleHDA
  • HDMI Audio
  • Ethernet (LAN)
  • WiFi / Bluetooth (after replacing the Intel card (incompatible) with a compatible one like Broadcom BCM4352 for example
  • Sleep (also sleep on Lid Close)
  • Brightness
  • Battery
  • Keyboard / Touchpad
  • CPU Power Management
  • Web-Cam
  • All USB ports

Issues and What does not work  :thumbsdown_anim: 

  • Intel GPU / Restart issue: There is a problem related to graphics occurs when display goes off then on, like when system sleeps and wake for example, which results in no display on restart. More details and a workaround for this problem are introduced in Post Installation / graphics section.
  • Wake on LID open: Currently is not working but I believe this one can be fixed.
  • Nvidia GPU (built-in): This will have to be disabled as OS X does not support Optimus technology.
  • Nvidia GPU (external/ultrabay, for those who have it): This will have to be removed before using OS X. It was possible to boot with this GPU and the built-in Nvidia GPU without Intel GPU like it is possible in Windows / Linux. However, there are issues prevents configuring those Nvidia GPUs correctly. There is a work started inthis thread to try booting OS X with this graphics configuration but the work is in very early stage and seem halt as well as the interest of the community is quiet low for this regard.

1. Introduction

Spoiler

This guide intends to help installing OS X Yosemite and El Capitan on Lenovo IdeaPad Y510p. There are many ways to install OS X on this machine but I will focus only on vanilla installation and only UEFI. So no myHack, no niresh, no iAtkos, no U-Beast, no what so ever with all respect to the developers behind these tools and distributions.

Lenovo Y510P released with different configurations and is adjustable. My model have the built-in Hard Disk Drive (SSHD 1TB+8GB Cache SSD integrated) in addition to second Nvidia graphics card in the caddy. In Windows with the second Nvidia GPU present we see no trace of intel card which means the first Nvidia (the built-in not the external) is apparently attached to the display in a configuration that OS X do not know so the only option for now is to skip both Nvidia GPUs altogether. Therefor, the external Nvidia GPU must be removed and the switchable Nvidia GPU (Optimus) should be disabled, to prevent other problems, either via BIOS or by DSDT/SSDT patches.

There are many ways to dual boot Windows and OS X on Lenovo Y510p (and in general). In this guide I will stick with having Windows installed first in UEFI mode because this what any one would have initially once he buy this computer. At the beginning when I start writing this guide I only had the HDD and wrote that those who have SSD inside should not have any problem to adapt. Now that I have an SSD and booting off from it I will add it to the guide as well although nothing much would change.

For those who think of doing like me (i.e. to get an SSD to put both Windows 8.1 and OS X and their apps on it and keep the HDD for data only), you first have to put the SSD in place of the HDD inside (to benefit from the connector speed). Normally you either don’t have a place for the HDD or you are using a caddy but in all cases I suggest and advice to leave the HDD outside and work with the SSD only for now. Now you can proceed with the guide just as if installing on HDD with only one exception which is to fix TRIM after installation (explained later in the guide).

Since Lenovo Y510P have Windows installed in UEFI mode, I will simply install OS X in EFI mode and use Clover EFI bootloader to be able to boot either OS since both would be installed in EFI. A problem that we might have for such type of configuration (both Windows and OS X in EFI on the same HDD) is that OS X needs bigger EFI partition than that created by Windows (assuming Windows is installed first). In this case, OS X installer will refuse to format the partition we prepared for OS X installation. We have to sort this problem out before trying to install OS X at all.

This guide is split into several parts. First we create a space to install OS X in. Next we modify the size of EFI partition to remedy the mentioned problem. We then prepare a USB installer for OS X and use it to install. Finally we do some post-installation fixes to have more juice from the system.

Are you ready? Let’s go …

2. Preparing a Partition for OS X

Spoiler

There are many ways to do this, the easiest is to use Disk Management in Windows to shrink the last partition and create a new one in the space. Any other partitioning tool can be used for that matter.
My HDD was partitioned to have EFI partition, MS reserved partition, MS recovery partition, Windows partition, and Data partition. I used Disk Management in Windows to shrink a partition and free some space, then formatted that partition and labeled it “MacOSX”. The size of that partition is optional but I suggest to have it no less than 50GB to allow space for apps to be installed later on OS X. The label is optional too, we just need to keep record of that label so we don’t accidentally ruin any important partition later. Once we have the partition formatted (either fat32, exFat, or NTFS), we can proceed to the next step.

3. Increasing EFI Partition Size

Spoiler

As I said above, there’s a problem when trying to format the created partition for OS X while trying to install it. OS X will fail to format the created partition (we labeled it “MacOSX”) as HFS+ because of small EFI partition size since OS X requires big ‘enough’ EFI partition. So before attempting to install OS X, we’ll have to increase the size of that partition.

A default install of Windows 8.1 creates ~300MB Recovery partition, ~100MB EFI partition, and 128MB MSR (Microsoft Reserved) partition. This process (originally byRehabMan and slightly modified by me) removes the mentioned partitions and creates bigger EFI:

  • Boot Windows installer USB (you should have one ready of course)
  • Press Shift+F10 for recovery command line
  • Type: diskpart
  • Type: list disk (verify disk 0)
  • Type: select disk 0
  • Type: list part (you should see all partitions)
  • Type: select part 2 (part 2 is EFI part)
  • Type: assign
  • Type: list vol (to find out the drive letter assigned to EFI and Windows partitions, lets assume they were E: and C: respectively)
  • press Shift+F10 for another command prompt
  • Type: robocopy e:\efi c:\efi.bak /mir
  • Switch back to original command prompt (the one running diskpart)
  • Type: select part 1
  • Type: delete part override
  • Type: select part 2
  • Type: delete part override
  • Type: select part 3
  • Type: delete part override
  • Type: create part efi size=528 (the space left by removing all three partitions Recovery, EFI, and MSR)
  • Type: format quick fs=fat32 label=”EFI”
  • Type: assign
  • Type: list vol (to find out new drive letter, assume it is F: )
  • Switch back to other command prompt window (the one just running cmd)
  • Type: robocopy c:\efi.bak f:\EFI /mir
  • Type: exit
  • Switch to original command prompt (the one running diskpart)
  • Type: exit
  • Type: exit
  • Hit: Alt+F4 at the Windows installer to quit

Steps from 1 to 12 create backup of EFI partition contents so we can restore the contents after creating a bigger EFI and have Windows bootable. Then 13-18 it removes all three partitions Recovery, EFI, and MSR. Step 19 creates a new EFI partition with arbitrary size (put 528 which is the sum of previous EFI, Recovery, and MSR sizes). Step 20 format and label the new EFI partition, and finally step 24 restores EFI partition contents from the backup we created earlier.

At this point, I verify that Windows still boots and it should. Now I have 4 main partitions EFI, Windows, Data, and “MacOSX”.

4. Preparing OS X USB Installer

Spoiler

There are many guides on the web to do it, I will use virtual installation of OS X on windows to create the USB installer. If you have a working OS X somewhere else you could use that too. The USB should be no less than 8GB and you should have downloaded Yosemite/El Capitan Installer App from AppStore, ShowHiddenFiles app, Clover EFI bootloader, CloverConfigurator, HFSPlus.efi, FakeSMC.kext, and VoodooPS2Controller.kext / SmartTouchpad.kext. All these are available in Downloads section near the end of the thread.

The following are the steps to create the USB installer:

  • Plug the USB in and mount it in OS X.
  • Open Disk Utility, select the USB from the list, click on Partition tab, choose 1 partition in Partition Layout, click options button, choose GUID Partition Table, and click Apply. You can format the created partition in the USB as Mac OS Extended and label it as “MacOSX Installer”. Selecting GUID scheme creates a hidden EFI partition on the USB so the USB actually contains 2 partitions with only 1 visible.
  • Run ShowHiddenFiles app and click “Show Special Files”
  • Go to Applications folder and right click the Yosemite/El Capitan Installer App > Show package Contents > Contents > SharedSupport > and mount InstallESD.dmg. This will mount a disk labeled “OS X Install ESD”.
  • From the new window appeared, right click BaseSystem.dmg and choose Open. The image will be mounted as “OS X Base System”.
  • Go back to Disk Utility and Restore the disk “OS X Base System” to our created USB partition “MacOSX Installer”. Close Disk Utility once it is done, we are not going to need it anymore.
  • On the desktop there will be 2 disks with the label “OS X Base System”. One of them is mounted from BaseSystem.dmg and the other belongs to our USB which is the larger one. Rename the larger one to “MacOSX Installer”.
  • Now open the disk labeled “OS X Install ESD” on desktop and copy both files BaseSystem.chunklist and BaseSystem.dmg to the root of “MacOSX Installer”. Also copy the folder “Packages” to “MacOSX Installer” > System > Installation after removing the link with the same name there.
  • Start installing Clover on the USB (the partition “MacOSX Installer”) with these options:
    • Install for UEFI booting only.
    • Install Clover in the ESP.
    • Themes > BootCamp (or whatever)
    • Drivers64UEFI > EmuVariableUefi-64, OsxAptioFixDrv-64, PartitionDxe-64

Once you are done, you will find a disk labeled “EFI” belongs to the USB (the hidden one now visible). Open that, “EFI” > EFI > Clover, and using any plist editor (PlistEdit Pro is prefect) or CloverConfigurator app, edit config.plist with the following and save the file before closing it:

  • ​​ACPI > DSDT > Fixes > Remove All
  • ACPI > DSDT > DropTables > Remove All
  • ACPI > SSDT > Generate > CStates > false
  • ACPI > SSDT > Generate > PStates > false
  • Boot > Arguments > -v dart=0 darkwake=0 nv_disable=1 kext-dev-mode=1
  • Devices > FakeID > IntelGFX > 0x0
  • Graphics > Inject > Intel > true
  • Graphics > ig-platform-id > 0x0a260006 (you can try others)
  • SMBIOS > (set it to MacBookPro11,1)
  • Replace “VBoxHFS.efi” with downloaded “HFSPlus.efi” in the folder “Drivers64UEFI”.
  • Copy the two kexts downloaded (FakeSMC.kext and VoodooPS2Controller.kext / SmartTouchpad.kext) into Kexts > 10.10 (or into Kexts > other).

Now the USB installer is ready for prime time.

5. Installing OS X

Spoiler

In this section we shall use the USB to install OS X but first let’s edit couple of settings in BIOS. Shutdown the computer and press the novo key (on the left) and select to enter BIOS. From there, disable discrete graphics card (Nvidia) and disable secured booting. Exit saving changes and press F12 once Lenovo logo appears.

  • Select the USB from the Boot menu that will appear.
  • Clover will load in seconds, select “Boot from MacOSX Installer” and hit enter.
  • In a minute or two the installer will be ready. Format the partition prepared earlier as “Mac OS Extended (Journaled)” and install OS X. The computer will restart after installation is finished.
  • Boot again from the USB and this time select to boot from “MacOSX” entry.
  • The installed OS X will run and you should have touchpad and keyboard working. Use them to finish the first time initialisation and creating the account.
  • Install Clover almost the same why you did while creating the USB installer but with small changes to be made:
  • Tick “Install all RC scripts on target volume”.
  • Tick “Install Clover Preference Pane”.
  • Also edit config.plist to reflect these:
    • ACPI > SSDT > SortedOrder > List the order of the SSDT’s (normally they should be SSDT.aml, SSDT-6.aml, SSDT-7.aml to match the tables names in BIOS. The AutoPatcher will return different names but rename the files accordingly)
    • Boot > Arguments > dart=0 darkwake=10 kext-dev-mode=1
    • Devices > FakeID > IntelGFX > 0x04128086
    • SMBIOS >
      • iMac14,2 should be OK but it is usually for desktops
      • MacBookPro 11,1 without issues (in the past this SMBIOS used to be problematic with Firefox-flash but not anymore).
      • MacBookPro 11,2 will generally work nice but with few-seconds delay for touchpad upon booting for those who have Synaptics touchpad. If you have Synaptics touchpad try to avoid this SMBIOS and use any one of the other two but if you have ELAN touchpad there is no problem reported.
  • Restart and boot from USB, select “Clover Boot Options”, and choose “Add Clover boot options for all entries”.
  • Restart without USB and Clover will boot off the EFI partition and you can boot straight into MacOSX.

6. Post Installation
Once logged in, you will have a working system with full resolution 1920×1080 but with glitches and only 7MB (check Apple-Menu > About This Mac) which makes the experience awful. Also no Sound, no WiFi, no Brightness Control, no Battery Management, no Sleep, and more. Follow the steps below to fix most of the issues and have a better working system. Many of these steps will require DSDT/SSDT patching to get things working and these patches are not covered in this guide. Instead, I really recommend the reader to visit this awesome guide by intruder16: DSDT/SSDT Auto-Patcher for Lenovo Y510p Ideapad. It provides a brilliant method to auto patch all ACPI files with the required patches for our laptop without experimenting (which usually ends with error for newbies).

6.1 Graphics

Spoiler

Apple has removed support for Intel Mobile HD4600 and to make it work we have to fake OS X to pretend it is another supported graphics card and this can be achieved in several ways. The most recent and clean method to use is OS-X-Fake-PCI-ID by RehabMan and I advice everyone to read about it in this topic and carefully apply the method. Moreover, there are two additional things that should be covered here to fix some graphic glitches.

6.1.1 Enabling QE/CI
In brief, this is what should be done to fix the graphics and enable QE/CI:

  • Download, un-compress, and install FakePCIID.kext and FakePCIID_HD4600_HD4400.kext in /S/L/E or Clover kexts.
  • Add 9MB cursor framebuffer patch in Clover (as described in the linked topic) to fix few glitches that often appear when using ig-platform-id = 0x0a260006.
  • Setting FakeID for IntelGFX of 0x04128086 either in Clover or by patching DSDT

6.1.2 Fixing 16-bit colour (gradients)
Normally, OS X will run in good colours after enabling QE/CI. However, it was found that anything sets the display off then on results in dirty graphics that have colour gradients as described in this topic. Some examples of the actions that reproduce this problem are:

  • Putting display to sleep (with system not sleeping)
  • Putting system to sleep: on system wake the display will have to return on from off state
  • Changing system resolution: the display have to turn off then on
  • Connecting an external display: the internal display have to turn off then on

These events requires re-initialisation for the graphic driver but it seems the driver re-initialise incorrectly. As a result, the graphics related memory hold wrong data for some graphic registers which indirectly affects the restart functionality. Once the system is restarted in any of these scenarios, the POST (where Lenovo logo should appear) has no display and so is Clover and beyond if an OS is selected and booted using keyboard blindly. However, this is a graphic driver issue and has nothing to do with power or reboot function itself.

To fix the 16-bit colour gradient issue, our forum member vusun123 suggested using a custom EDID (google EDID if you don’t know what it is) and his suggestion workedbrilliantly. To apply the custom EDID, all you have to do is to add the following to Graphics section in Clover’s config.plist:

<key>Graphics</key>
<dict>
    <key>InjectEDID</key>
    <true/>
    <key>CustomEDID</key>
    <data>
    AP///////wAw5BYEAAAAAAAXAQSQIxN4ChXVnllQmCYOUFQAAAABAQEBAQEB
    AQEBAQEBAQEBGjaAoHA4H0AwIDUAWcIQAAAZAAAAAAAAAAAAAAAAAAAAAAAA
    AAAA/gBMRyBEaXNwbGF5CiAgAAAA/gBMUDE1NldGMS1UTEMyAGw=
    </data>
    .. .. .. .. ..
</dict>

Note 1:
These are the lines to add and do NOT replace the whole section, apply common sense.
Note 2:
Although the custom EDID fixes the 16-bit colour issue, the restart side-effect is still there and needs a fix. There is a workaround though:

  • If you did not trigger the graphic-restart issue (no display off/on switch) then use Restart function as you wish.
  • If you triggered the graphic-restart issue then use Shutdown instead of Restart and Power on again. It is a good advice anyway not to hot-reboot between different OS’s as some devices do not initialise properly.
  • If you triggered the graphic-restart issue and used Restart already and stuck in a black screen, calm down and do not panic. Just know you are on Clover bootloader and control it using keyboard:
  • If you were planning to boot OS X, blindly choose it using keyboard and hit Enter. Now press Ctrl+Shift+Eject to set the display to sleep then press any key and the display will return. [Eject key is mapped to Insert for VoodooPS2Controller.kext users]
  • If you were planning to boot Windows, blindly choose it using keyboard and hit Enter and wait until Windows boots completely. Now press Fn+F1 to set Windows to sleep, then press any key to wake up the machine and display will be back on.

6.1.3 Fixing OS X boot graphic glitch
The following patch for IOGraphicsFamily.kext is required to fix a graphics glitch on second boot screen for Yosemite (10.10.2+) :

<dict>
    <key>Comment</key>
    <string>Boot graphics glitch, 10.10.2+</string>
    <key>Find</key>
    <data>
    QYjE6xE=
    </data>
    <key>Name</key>
    <string>IOGraphicsFamily</string>
    <key>Replace</key>
    <data>
    QYjE6zE=
    </data>
</dict>

This one is for El Capitan 10.11:

<dict>
	<key>Comment</key>
	<string>Boot graphics glitch, 10.11</string>
	<key>Find</key>
	<data>
	AQAAdRc=
	</data>
	<key>Name</key>
	<string>IOGraphicsFamily</string>
	<key>Replace</key>
	<data>
	AQAAdBc=
	</data>
</dict>

Note:
There will still be a glitch in the transition between first and second boot stages which there is no fix for it at the moment. The only improvement that can be made is to enable Legacy Support in BIOS which will replace the transition glitch with black screen. Beware that enabling Legacy Support will trigger incorrectly initialization to graphic driver for OS X which will result in no display upon rebooting from OS X.

6.2 Audio

Spoiler

6.2.1 Enabling native AppleHDA
There are two methods to fix audio in OS X. The first is to use VoodooHDA which is a generic audio driver that support wider range of sound chips out of the box (acceptable with issues). The second method is to patch AppleHDA.kext for our audio chip to have native sound (better and clearer) which is a complicated process. Now that we have AppleHDA working perfectly, the guide will only offer using AppleHDA.

Getting AppleHDA.kext patched to work correctly for our Y510p indeed toke much time reading guides and trying things. I have to give Mirone the credit he deserve for his awesome guide and the patched kext he provided that enabled most of the audio features but not external mic support. Our forum member intruder16 did his best and succeeded to get this the right way. Basically what have to be done is:

  • Patching the binary of AppleHDA to support our audio chip (either in place or in Clover’s config.plist)
  • Adding the correct audio codecs to AppleHDA either directly or by using a helper kext to have all audio functions
  • Making a change in DSDT or in Clover’s config.plist to use the proper audio layout
  • There is also an additional kext to install to help restoring audio after sleep/wake

For those who want to learn (I recommend all to learn because this is why we are all here), you can find some good information in this post. Otherwise, head over Y510p-OSX-AppleHDA and use that script to create and install the helper kext. You will also find instructions on how to properly configure Clover so the audio solution is complete. From now on, these information will not be available in this guide to keep everything organized.
6.2.2 Fixing HDMI & HDMI Audio
Connecting the laptop to an external display through HDMI means the display will be responsible for audio output instead of the laptop audio system. This feature is broken on many hackintoshes (ours included) and here you will find the procedure to fix it:

  • Make sure AppleHDA is working
  • Patch the DSDT/SSDT that have the device at address 0x00030000 to rename it from B0D3 to HDAU. (the patch is included in Auto-Patcher)
  • Put FakePCIID_Intel_HDMI_Audio.kext in Clover’s kexts folder (optionally can be installed in /S/L/E)
  • Patch AppleIntelFramebufferAzul.kext for HDMI-audio (there are other patches for other configurations if this one did not work)
    <dict>
        <key>Comment</key>
        <string>HDMI-audio, port 0105, 0x0a260005 0x0a260006, 0x0d220003, 0x0a2e000a, 0x0a26000a</string>
        <key>Find</key>
        <data>
        AQUJAAAEAACHAAAA
        </data>
        <key>Name</key>
        <string>AppleIntelFramebufferAzul</string>
        <key>Replace</key>
        <data>
        AQUJAAAIAACHAAAA
        </data>
    </dict>
  • Set this option in clover’s config.plist:
    <key>Devices</key>
    <dict>
        ....
        <key>UseIntelHDMI</key>
        <true/></dict>
  • Clear cache and reboot
  • Now when you connect the laptop to an external display through HDMI you will find new entry in System Preferences > Sound > Output for HDMI which means sound is now controlled by the external display.

HDMI Issues and workarounds:

  • If HDMI display is connected after OS X is booted (hot plug), the display will be distorted on the built-in display. This may need a new patch for AppleIntelFramebufferAzul.kext to get fixed but a workaround is to use the external display to change the built-in display resolution to anything then back to 1920×1080 again.
  • If HDMI display is turned off (or display mode is switched from HDMI) while OS X is running, OS X will freeze for second every few seconds. Turning the external display on (or switching to HDMI mode) again, or disconnecting the HDMI cable will fix the freezing and everything will be normal.

6.3 Ethernet (LAN)

Spoiler

To fix Ethernet we can utilize the solution by Mieze by first downloading the driver AtherosE2200Ethernet.kext (link in downloads section) then following the steps from his topic:

  • Goto /S/L/E and delete ALXEthernet.kext. (If you don’t have this it is OK)
  • Recreate the kernel cache.
  • Open System Preferences and delete the corresponding network interface, e. g. en0.
  • Reboot.
  • Install the new driver and recreate the kernel cache. I recommend to use Kext Wizard or a similar utility for the installation.
  • Reboot
  • Open System Preferences again, select Network and check if the new network interface has been created automatically or create it manually now.
  • Configure the interface.

6.4 Wi-Fi

Spoiler

The built-in WiFi card in Lenovo Y510P won’t work with OS X and I had to replace mine with Broadcom BCM4352 AC WLAN BT4.0 Wi-Fi card that is compatible with Y510P and OS X. For this card to work, OS X needs to see this card as one of those defined in AirPortBrcm4360.kext (inside IO80211Family.kext). Also, the same kext have to be patched to enable 5GHz.

PS: if you have other chip than mine or the given patch didn’t work for you, I advice you to visit Toleda’s topic to find all the up-to-date information.

6.4.1 Broadcom Airport Extreme
Put FakePCIID_BCM94352Z_as_BCM94360CS2.kext in Clover’s kexts folder (optionally can be installed in /S/L/E) and reboot.

6.4.2 Enable AC (5GHz)
There are 3 different Clover patches to try depending on the WiFi chip country. For me, the required patch is:

<dict>
    <key>Comment</key>
    <string>10.10-BCM94352-5GHz-US-FCC-dv</string>
    <key>Find</key>
    <data>
    QYP8/3QsSA==
    </data>
    <key>Name</key>
    <string>AirPortBrcm4360</string>
    <key>Replace</key>
    <data>
    ZscGVVPrKw==
    </data>
</dict>

After putting the patch in config.plist, nothing more is needed but a reboot.

6.5 Bluetooth

Spoiler

In order to use BCM4352 Bluetooth with OS X, we will use BrcmPatchRAM to activate it. Head over Rehabman’s fork of BrcmPatchRAM (link in download section) and read how to install it. Basically, you will need to download BrcmPatchRAM and install two kexts from the archive depending on OS X version and install location.

  • For Yosemite 10.10.x: install both BrcmPatchRAM.kext and BrcmFirmwareRepo.kext in /S/L/E
  • For El Capitan 10.11: install both BrcmPatchRAM2.kext and BrcmFirmwareRepo.kext in /S/L/E

Ignore the rest of the kexts in the archive.

6.6 Proper CPU Power Management

Spoiler

This is important as it affects many aspects of the system specially sleep. To get proper CPUPM, either download and use the latest version of ssdtPRGen.sh to produce CPUPM SSDT.aml (Secondary System Description Table), or, use the one generated by AutoPatcher. Either way, put the resulting SSDT.aml into EFI/Clover/ACPI/patched among other patched tables.

6.7 Sleep

Spoiler

At this moment the system might not sleep for many reasons like problems with USB, Network interrupting sleep, and not having AppleLPC.kext loaded on startup. If you are going to use AutoPatcher (recommended) then it will do everything for you and you can skip the rest of this section.

If you will go manually and still reading, I’ll try to cover all the requirements for perfect sleep but this will involve DSDT patches so you should be familiar with the process. You have to know how to use MaciASL, extract native ACPI tables (from Clover), disassemble tables using iasl, and fix common problems while patching.
The Laptop Patch Repository by Rehabman is a must have with MaciASL. Add it and it won’t harm to add his Debugging Patch Repository too.

6.7.1 AppleLPC.kext is not loading
This kext is essential for sleeping. To test if it is loaded or not fire off Terminal and issue the command kextstat then look for com.apple.driver.AppleLPC in the output. If it is there then the kext is loaded and nothing to do in this section. If not, edit your DSDT in MaciASL and patch it with “Haswell-LPC”. Reboot and use kextstat again to confirm AppleLPC.kext is loaded fine.

6.7.2 Fix EHC1/EHC2 Kernel Assertions
You can test if there are problems prevents sleep using the command pmset -g assertions. If you got anything with EHC1 or EHC2 then it probably USB related problem and you might need to patch the DSDT with “7-series/8-series usb” and/or “SMBUS Fix”.

6.7.3 Workaround for EHC1/EHC2/XHC Instant-Wake
If you got OS X to sleep but found it to wake immediately then look for wake reason in system.log using Console app. If the reason is found related to either EHC1, EHC2, or XHC then the easy workaround is to delete/comment the code related to powering on/off to these devices from DSDT which is the name _PRW for each of them.

6.7.3 Sleep on LID close
Out of the box LID open/close is not functioning. A workaround is available in Rehabman’s laptop patch repository and also in AutoPatcher that remove _PRW for LID but this method completely break the functionality of Wake on LID open. Since Wake on LID open is not working at the moment either way, this workaround is all what we have now.

6.8 Brightness

Spoiler

Getting brightness to work perfectly is a process of several steps that I’ll cover in order of importance:

6.8.1 Patching DSDT or SSDT
Skip this if you have used AutoPatcher. Either DSDT or one of the SSDTs (whichever contains IGPU definition) have to be patched with “Brightness fix (Haswel)” from Rehabman’s Laptop Repository. Doing this correctly will result in having the brightness slider visible in System Preferences > Displays.

6.8.2 ACPIBacklight.kext
This is a must have kext that gets the job done assuming DSDT/SSDT is already patched. With this kext the brightness slider will function normally.

6.9 Battery Management

Spoiler

This one is important but easy to fix, just download the latest version of “ACPIBatteryManager.kext” and put it in Clover’s kexts folder, reboot.

6.10 Keyboard and Touchpad

Spoiler

In this section I will cover how to activate the keyboard and touchpad. Moreover, I will show how to control brightness using Fn+Up and Fn+Down.
6.10.1 Activating Keyboard and Touchpad
There are two variants of Ideapad Y510p with regards to Touchpad so each variant will require different Kext to enable PS2Controller:

  • The first one with Synaptics touchpad and basically VoodooPS2Controller kext by RehabMan is great and reliable. In addition, EMlyDinEsH updated his SmartTouchpad kext so now it works very nice with Synaptics Clickpad available on Y510p with more features and it is worth checking out (both links in downloads)
  • The other one with Elantech touchpad and the driver by EMlyDinEsH is the only option which is great anyway for this hardware (link in downloads)

6.10.2 Controlling brightness using Fn+Up and Fn+Down
At the moment, you can control the brightness using the slider in System Preferences > Display. To get the default key combination for Y510P working we cannot use Karabiner or OS X shortcuts as the events are buried deep down. Therefore, the DSDT have to be patched and ACPIKeyboard kext by RehabMan may be required. (link in Downloads)

We will use Auto-Patcher for this:

  • If you have Synaptics touchpad and are using VoodooPS2Controller then choose Synaptics when prompted by the Auto-Patcher script. You don’t need ACPIKeyboard kext in this case as the needed functionality is built into VoodooPS2Controller already.
  • If you have Synaptics or ELAN touchpad and are using SmartTouchpad kext by EMlyDinEsH then choose ELAN when prompted by the Auto-Patcher script. In this case, however, you will need ACPIKeyboard kext as the needed functionality is not built into SmartTouchpad.

The above part may be confusing but I will update it once intruder16 update his script.

6.11 Enabling SSD TRIM

Spoiler

For those who are using SSD the OS should support TRIM which is a technology to removes any deleted file completely to enhance SSD performance and increase its lifespan. It is said that newer SSD have their own built-in technology to do this without any effort from the OS but not-so-new SSD’s does not have this. To get OS X Yosemite to offer TRIM support to our SSD, we have to put this patch in Clover’s config.plist:
And reboot the system.

6.12 USB 3.0

Spoiler

[Yosemite] Both USB 3.0 ports will work OOB but may not power on again after wake from sleep (at least with 10.10). To fix this issue, we will patch AppleUSBXHCI, the native usb driver, with just one patch through clover:

<dict>
    <key>Comment</key>
    <string>Enable USB3 after wake for Intel 8 series chipset</string>
    <key>Find</key>
    <data>
    xoDIAAAAAQ==
    </data>
    <key>Name</key>
    <string>AppleUSBXHCI</string>
    <key>Replace</key>
    <data>
    xoDIAAAAAA==
    </data>
</dict>

[El Capitan] I have used the same patch for 10.10 with 10.11 without a problem but I noticed that all USB devices are routed to USB2 controller with that patch active. Without it, El Capitan will still route them to USB2 controller until system goes to sleep then wake. Thereafter, USB3 controller will handle the devices without routing. There is a technical situation here and I’m investigating it but despite that, all USB ports will work no matter that patch is applied or not. You can choose to use the patch above with 10.11 or not, it’s up to you, until further notice.

Links & Downloads

Spoiler

This section contains all links to all the downloads required to get the best installation for Lenovo Y510p so far.

  • ShowHiddenFiles app: Link
  • Clover EFI bootloader: Link
  • CloverConfigurator: Link
  • HFSPlus.efi: Link
  • RehabMan / FakeSMC: Link
  • RehabMan / OS-X-ACPI-Keyboard: Link
  • RehabMan / OS-X-Fake-PCI-ID: Link
  • RehabMan / OS-X-ACPI-Backlight: Link
  • RehabMan / OS-X-ACPI-Battery-Driver: Link
  • RehabMan / BrcmPatchRAM: Link
  • RehabMan / VoodooPS2Controller: Link
  • EMlyDinEsH / SmartTouchPad: Link (register in the forum and download attachment on first post)
  • Ahmed_ais / Y510p-OSX-AppleHDA: Link
  • Ethernet Driver: Link
  • Clover’s config.plist (This have everything you need and somethings you may not need. It lacks SMBIOS details but you can use CloverConfigurator to fill it as mentioned in the guide):
    • Yosemite 10.10: Link
    • El Capitan 10.11: Link
  • Modified CloverEFI theme ios7: Link

Need HELP??  :help: 

Spoiler

  • Make sure you have CAREFULLY READ the entire guide. I have the same laptop as yours (mostly) so it is unexpected to have unique issue unless you have a faulty machine.
  • Search the topic (and the web in general) for the things you have questions about before asking. The answer for your question may be few posts away so save your time and other’s.
  • If you still want to ask for help, you are welcome but you have to know that no one here have super powers to sense the problems without details. Some problems are well-known and small amount of evidence is enough for diagnosing them but many problems are not. Therefore, in general, this is my advice whenever you try to report a problem or ask for help:
    • Introduce the problem in clear words
    • Provide as much information as you can in form of logs, screenshots and/or dumps
    • State whether the issue is reproducible and list some of the ways to reproduce it.
    • State the things you have tried and the results you found

Credits