Contribute
Register

[Guide] Lenovo u310/u410 Yosemite using Clover

Status
Not open for further replies.
Joined
May 10, 2014
Messages
159
Motherboard
ASUS Z97-K
CPU
Intel Core i7-4790k
Graphics
ASUS STRIX GeForce GTX 750TI
Mac
  1. 0
Classic Mac
  1. 0
Mobile Phone
  1. 0
So I am starting this as I could not find a thread that dealt with the u310 and exclusively used Clover. All the guides I have seen primarily rely on Multibeast, or Chameleon, which I wanted/needed to avoid.

I have Windows 8.1 installed and didn't want to lose this functioning install. So I needed to go with a Clover install, plus it just seems better to use the latest option.


The Hardware:
Lenovo u310, i5 3317U (1.7Ghz), Intel 4000 graphics.
Replaced the wifi card with BCM943225 HMB.
BIOS is 65CN90WW. I had the whitelist removed to allow it to boot with a different wifi card. Relevant settings are:
USB Legacy - Enabled
SATA Controller - AHCI
iRST Support - Enabled
Entry on S3 critical battery event - Enabled
Memory Remap - Enabled

Boot Mode - Legacy Supp
Boot Priority - UEFI First
USB Boot - Enabled
Set boot order to have USB first. This way you can let the install go unattended, as it takes some time, but will be able to boot back to the right place on its own. Change the order after install.


The Installer:
Follow this thread by RehabMan to make the USB installer. I won't reinvent the wheel, but some details...
-I partitioned my USB drive in 2 partitions, ~500MB MBR with fat32 for the EFI, and the rest HFS+J for the installer.
-I used the Clover installer, not CloverGrower.
-I used FakeSMC, GenericUSBXHCI, VoodooPS2Controller as linked in the post. GenericUSBXHCI will be replaced soon, but we need it for now.
-config_HD4000_1366x768 for the config.plist
-used createinstallmedia method of putting Yosemite installer on the USB


The Install:
First use disk utility to partition the target drive. I am installing to the SSD. Use GUID and HFS+J.

Install to this target drive.

Go get a tasty beverage. I recommend trying your hand at Aeropress coffee.

After a couple of reboots you should be able to select the installed drive from Clover. You are now in a (mostly) working Yosemite install.

Install Clover:
You will essentially repeat what we did to put Clover on the USB stick. Use the Clover installer again, but select the hard drive (SSD in my build) as your target.
For options select:

-Install for UEFI booting only
-Bluemac from themes
-OsxAptioFixDrv-64
-EmuVariableUefi-64
-Install RC scripts on target volume
-Install clover preference pane

-Again copy HFSPlus.efi to EFI/EFI/CLOVER/drivers64UEFI
-Again remove all versions from EFI/EFI/CLOVER/kexts and leave only Other
-Put the same 3 kexts in Other (FakeSMC, GenericUSBXHCI, VoodooPS2Controller). We will remove GenericUSBXHCI later after we have patched the DSDT, but for now it lets us use all the USB ports.
-Put ethernet kext in Other as well. RTL8100. http://www.insanelymac.com/forum/topic/296190-driver-for-realteks-rtl810x-fast-ethernet-series/ .

-Again make a copy of config_HD4000_1366x768 in EFI/EFI/CLOVER and rename it to config.plist

-Go to Clover preference pane and select “force mount selected ESP” at startup, as we’re going to be needing to do a fair amount in EFI until everything works. You’ll probably want to uncheck this after everything is running smoothly to prevent accidental changes later.

Reboot. When in Clover press F4 (and Fn+F4, as I’m not sure which one gets the job done) to grab a copy of DSDT. This and a number of SSDT files will be placed in EFI/EFI/CLOVER/ACPI/origin. We will need the DSDT file later, but these SSDT files are different than what we will generate in another step later, and I did not end up using them for anything.

Fixing all the other things:
So now we need to get everything else to work.

Clover Configurator
-Download Clover Configurator Yosemite Edition. http://www.tonymacx86.com/downloads.php?do=file&id=236 (update to the latest version within app after downloading).

-Backup config.plist from EFI/EFI/CLOVER. Then import it into Clover Configurator.
Kernel and Kext Patches: there should be a list of items under Kexts To Patch. These are part of the default config.plist we downloaded and were added by Rehabman. All have disabled: in front of the entry. This means that they are, wait for it, disabled.

To enable TRIM for the solid state drive double click on disabled:
IOAHCIBlockStorage and delete the disabled: part. Ensure that under find hex it shows 004150504C452053534400 . Under replace hex: 0000000000000000000000
InfoPlistPatch should remain unchecked.

Similarly, there are predefined fixes for HDMI audio. There are three entries with
disabled:
AppleIntelFramebufferCapri remove the disabled: from in front of them. This should get HDMI audio working when combined with the DSDT patch coming up below. I have attached a patched AppeIntelFramebufferCapri.kext at the bottom of this post for historical reasons, but with this method you should no longer need it.


Below largely relates to making iMessage/FaceTime work. It is taken from: http://www.tonymacx86.com/general-help/110471-how-fix-imessage.html#post671803

SMBIOS -> tap the magic wand and select the Macbook Air. Product name should now be MacBookAir5,2.
DO NOT accept the default serial number and such. This will cause problems later with iMessage and FaceTime as it’s the same number everytime and is blacklisted on Apple’s servers. I have not had any luck getting the Clover Configurator wizard to generate valid serial #s, though you can “shake” and generate new variable numbers. But they never worked for me on Apple’s website as discussed shortly.. I would instead recommend downloading Chameleon Wizard (http://www.tonymacx86.com/downloads.php?do=file&id=235), running it, and going to SMBios and selecting MacbookAir5,2 from the drop down list. Generate random week of manufacture and unique number. Copy the serial that is generated and paste it to selfsolve.apple.com. Make sure that you see this message, and ONLY this message:
We're sorry, the number you have provided cannot be found in our records. Please verify the number and try again, or contact us

If you get that, copy down all the info in Chameleon Wizard (or just save the SMBios.plist) and fill in the serial number in Clover Configurator.

Next open terminal and run
Code:
uuidgen
4 or so times (for maximum OCD randomization). Copy this number and paste it into SmUUID in Clover Configurator.


For Board Serial Number, copy the Serial Number you just brought in from Chameleon Wizard and add 5 alpha numeric characters to the end of it to get to 17 total characters.

WRITE THESE 3 IDENTIFIERS DOWN. Put them in Google Docs. Something. Just get copies off your Hackintosh. If you later need to reinstall you want to have these. This is what makes it the same Mac in the eyes of Apple’s servers. I would also strongly recommend getting this all done and set up prior to ever taking the build online.

Export the config.plist to EFI/EFI/CLOVER/Config.plist

Reboot.


Wifi

Next order of business for me was to get the wifi working, as I have no easily accessed ethernet. Refer to http://www.tonymacx86.com/network/104850-guide-airport-pcie-half-mini-v2-101.html for the specifics. I do have to say that the thread was a little confusing to me. The gist is that there are four ways to get the supported cards working. Use toledaARPT.kext, edit the native kext, patch DDST, or inject SSDT. There are plusses and minuses to each method. To me the easiest was to use Kext Wizard to install toledaARPT.kext. Read up to find the method that works best for you.

After you are done make sure that your network cards are sequential in their BSD names. Go to System Information and look at ethernet under hardware. It should have BSD name en0. Then go to network and click on WiFi (if you replaced your wifi card). It should have interface en1. If there is any skipping of numbers, if your ethernet is something other than en0, it is likely going to cause problems with iMessage. To fix, go to terminal and:
Code:
sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
Code:
[FONT=Verdana]sudo rm /Library/Preferences/SystemConfiguration/preferences.plist[/FONT]

Restart and they will hopefully be assigned the right BSD names.


To install kexts:

I used Kext Wizard
http://mac.softpedia.com/get/Utilities/Kext-Wizard.shtml
Rebuild cache after installing a new kext.

DSDT patching: download RehabMan’s iasl. https://bitbucket.org/RehabMan/acpica/downloads. Place in
/usr/bin

in terminal type:
Code:
sudo mv iasl /usr/bin/iasl
-copy DSDT.aml and any SSDT.aml files from EFI/EFI/CLOVER/ACPI/origin to a new folder on your hard drive
-in terminal navigate to the folder you just put the aml files in. Then type:
Code:
iasl -da -dl *.aml
this generates the dsl files we will work with in MaciASL. I always patch the dsl file, compile, and then save a copy as both dsl and aml. Compile after every patch you apply. Make copies of various stages of these patches so you can back up a step if something goes wrong. There is no way I know of to undo a patch if you just have one DSDT file you keep making all the changes to. After each issue is dealt with I would replace EFI/EFI/CLOVER/ACPI/patched/DSDT.aml and reboot. You could do all the patches (compiling after each one), install all the kexts, and then reboot, but if something goes wrong you likely will not know what step caused it.

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


USB/Insta wake from sleep
Open DSDT.dsl in MaciASL. Add http://raw.github.com/RehabMan/Laptop-DSDT-Patch/master as a source in preferences. Patch with:
-usb_7-series-multiplex.txt. Compile.
-usb_USB_7-series.txt. Compile.
-Save as DSDT, ACPI machine language binary.
-Place DSDT.aml that was just generated in EFI/EFI/CLOVER/ACPI/patched
-Remove GenericUSBXCHI from EFI/EFI/CLOVER/kexts/Other

Reboot


Lid sleep / brightness adjustments

Patch DSDT with graphics_PNLF
install ACPIbacklight.kext, downloadable at: https://bitbucket.org/RehabMan/os-x-acpi-backlight/downloads more discussion here: http://www.tonymacx86.com/yosemite-...ching-dsdt-ssdt-laptop-backlight-control.html

This gets lid sleep working and brightness working with Fn+Home and Fn+PgUp. It is not native control, but it does work well enough for me.

The hotkeys (F11 and F12 without Fn being pressed) will work as well, in finer steps than Fn+Home or Fn+PgUp, but there will not be a HUD display accompanying this. This appears to be driven by the more recent BIOS, older versions apparently had very few steps and very jerky transitions.

I will also plug Brightness Slider from the App Store. https://itunes.apple.com/us/app/brightness-slider/id456624497?mt=12 No affiliation, but it allows for a menu bar slider and easy mapping of the brightness controls


Sound
Download but don’t install AppleHDA.kext from http://www.tonymacx86.com/yosemite-...novo-u410-u310-yosemite-guide.html#post906637 Attached to this post you're reading as well.
NOTE, if you previously installed this kext you need to go back to a vanilla AppleHDA.kext for the rest of this to work. Info taken from http://www.tonymacx86.com/hp-probook-mavericks/118877-patch-applehda-kext-fly-clover-bootloader.html
Patch DSDT with audio_HDEF-layout12
Patch DSDT with SystemIRQ

Download bcc9's script modified by RehabMan. Also attached to this post.
Unzip it.
Code:
cd ~/whereeveryoudownloadedit/patch-hda
./patch-hda.pl -x 0x14f1506e

0x14f1506e is the vendor ID for the Conexant audio codec in the u310/410. If you really want to learn this yourself you can boot a live Linux USB and do a codec dump, but trust me on this one. It’s the same in all models of 310/410.

You should get something that looks like this:

Default target codec: 14f1506e detected.
Patching AppleHDA codec 11d41984 with 14f1506e
No codec range comparisons require patching
<dict>
<key>Name</key>
<string>AppleHDA</string>
<key>Comment</key>
<string>Expect 2 matches</string>
<key>Find</key>
<data>hBnUEQ==</data>
<key>Replace</key>
<data>blDxFA==</data>
</dict>

Copy everything between and including <dict>…</dict>

Open /EFI/EFI/CLOVER/Config.plist in TextEdit. Look for the section with KextsToPatch. Paste what you just copied somewhere between <array> and </array>. There’s a bunch of stuff already there, so take care you don’t paste in to the middle of another <dict> entry. Save config.plist.

Download DummyHDA.kext from here: Also attached to this post.

Go to the patched AppleHDA that you downloaded earlier but didn’t install. Unzip it, and right click on AppleHDA.kext and choose Show Package Contents. Navigate to AppleHDA.kext/Contents/Resources/ and copy Layout12.xml.zlib, and Platforms.xml.zlib. Now unzip DummyHDA.kext and navigate to DummyHDA.kext/Contents/Resources/ and paste them in there.

Next you need to edit the info.plist in DummyHDA.kext. Open info.plist in the patched AppleHDA.kext with TextEdit. It’s at: AppleHDA.kext/Contents/Plugins/AppleHDAHardwareConfigDriver.kext/Contents/info.plist. Search for <key>HDA Hardware Config Resource</key> . Then copy everything from there down through the next </array> (should stop right before <key>IOClass</key>). Now open config.plist in DummyHDA.kext/Contents/Info.plist in TextEdit. Again search for <key>HDA Hardware Config Resource</key>, highlight the corresponding section to what you just copied and delete it, then replace with what you copied. Save.

Install DummyHDA.kext to S/L/E with kext wizard. Rebuild/Repair permissions. Restart. That should get you an upgrade-proof working sound.

There are some known problems with the menu bar volume slider. So far I don’t know how to fix that, or if it can be fixed, but I also can just ignore it pretty well. There are also some oddities with remembering the volume level between restarts. The level is stored, but pressing the hotkey automatically adjusts to max volume with the first press, then adjusts from there.


Battery
Install ACPIBatteryManager.kext
Patch DSDT with battery_Lenovo-Ux10-Z580

I did not install ACAdapter patch to DSDT because rehab_ACPIACAdapter shows up in IOreg. I believe this takes the place of AppleACPIACAdapter, and so far I have not noted any problems when on AC.


HDMI
Patch DSDT with graphics_HD4K_low


Power Management

Generate SSDT
Go to https://github.com/Piker-Alpha/ssdtPRGen.sh and follow the ReadMe
Copy to /EFI/EFI/CLOVER/ACPI/patched/SSDT.aml
Open Clover Configurator. Check Drop OEM under ACPI.


To Do:

I am still having some issues with Airplay mirroring, but believing that it is more likely a problem with my wifi/router situation. Airplay audio works fine. To test mirroring I will need to find some other Apple TVs to play with. I'm tentatively saying that this is working properly, but haven't been able to test thoroughly and welcome any feedback from those that have.


Thanks:

Primarily to RehabMan, who is nearly omnipresent on these forums, as well as cwk9852 whose combined 310/410 post linked to earlier got my first Mavericks build running and largely informed this build.


EDIT:
Links updated to original sources. Ethernet kext updated. AppleHDA.kext and AppleCapriBuffer attached to this post for ease of access. Revised method of patching AppleHDA to allow for on the fly patching.

 

Attachments

  • AppleHDA.kext.zip
    1.2 MB · Views: 513
  • AppleIntelFramebufferCapri.kext.zip
    133.3 KB · Views: 355
  • patch-hda.zip
    10.5 KB · Views: 375
  • DummyHDA.kext.zip
    4.7 KB · Views: 334
Lenovo u310 Yosemite build with Clover

-Put ethernet kext in Other as well. I used RealTekR1000SL.kext from this thread:
http://www.tonymacx86.com/hp-probook/100670-4x40s-owners-please-test-realtekr1000sl-kext.html. This is theoretical at this point, as I don’t use ethernet. AppleRTL8169Ethernet is what is typically recommended, but we’re not using Multibeast. Someone feel free to correct me on what should be used here.

http://www.insanelymac.com/forum/topic/296190-driver-for-realteks-rtl810x-fast-ethernet-series/

Lid sleep / brightness adjustments
Patch DSDT with graphics_PNLF
install ACPIbacklight.kext (hotKoffy)

This gets lid sleep working and brightness working with Fn+Home and Fn+PgUp. It is not native control, but it does work well enough for me.

The hotkeys (F11 and F12 without Fn being pressed) will work as well, in finer steps than Fn+Home or Fn+PgUp, but there will not be a HUD display accompanying this. This appears to be driven by the more recent BIOS, older versions apparently had very few steps and very jerky transitions.

http://www.tonymacx86.com/yosemite-...ching-dsdt-ssdt-laptop-backlight-control.html

Sound
Install AppleHDA.kext from http://www.tonymacx86.com/yosemite-...novo-u410-u310-yosemite-guide.html#post906637
Patch DSDT with audio_HDEF-layout12
Patch DSDT with SystemIRQ

You could build an injector for AppleHDA and use Clover patches here instead of patching AppleHDA directly...

I probably have a script that create the necessary files here...

I did not install ACAdapter patch to DSDT because rehab_ACPIACAdapter shows up in IOreg. I believe this takes the place of AppleACPIACAdapter, and so far I have not noted any problems when on AC.

Correct. The "AC Adapter Fix" DSDT patch is the "old" solution.

(Note: near as I can figure things are working, as P states seem to be changing but I am only seeing 4 different states. Additionally, I do not see X86PlatformPlugin in IORegistryExplorer.)

Without X86PlatformPlugin, you have an issue. Read guide: http://www.tonymacx86.com/yosemite-laptop-support/146870-guide-native-power-management-laptops.html
 
Lenovo u310 Yosemite build with Clover


I believe I have done everything in there, but can review when I get home.
-Did not mess with AppleIntelCPUPowerManagement.kext as it is patched in Clover with AsusAICPUPM
-KernelPm is true, as this was in your config_HD4000_1366x768 config. Given that this is an Ivy bridge and not a Haswell system is leaving this set to true going to cause any problems?
-DropOEM is set in Clover
-I do have generate P states and generate C states on in Clover. I don't think that would cause a problem, as elsewhere in that thread you recommended turning them on when people were having
X86PlatformPlugin errors.
-I did not override the processor type when generating SSDT with ssdtPRgen. I don't recall what flashed by, but I thought it successfully identified the processor as Ivy Bridge.
-There are some commonly referenced DSDT patches I did not do, as I had not encountered a problem where they seemed necessary. Maybe this is that problem? graphics_Rename-GFX0, system_SMBUS, system_RTC, system_ADP1, system_MCHC, system_Mutext were not applied.

 
Lenovo u310 Yosemite build with Clover

I believe I have done everything in there, but can review when I get home.
-Did not mess with AppleIntelCPUPowerManagement.kext as it is patched in Clover with AsusAICPUPM
-KernelPm is true, as this was in your config_HD4000_1366x768 config. Given that this is an Ivy bridge and not a Haswell system is leaving this set to true going to cause any problems?
-DropOEM is set in Clover
-I do have generate P states and generate C states on in Clover. I don't think that would cause a problem, as elsewhere in that thread you recommended turning them on when people were having
X86PlatformPlugin errors.
-I did not override the processor type when generating SSDT with ssdtPRgen. I don't recall what flashed by, but I thought it successfully identified the processor as Ivy Bridge.
-There are some commonly referenced DSDT patches I did not do, as I had not encountered a problem where they seemed necessary. Maybe this is that problem? graphics_Rename-GFX0, system_SMBUS, system_RTC, system_ADP1, system_MCHC, system_Mutext were not applied.


Download patchmatic: https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/RehabMan-patchmatic-2015-0107.zip
Extract the 'patchmatic' binary from the ZIP. Copy it to /usr/bin, such that you have the binary at /usr/bin/patchmatic.

In terminal,
Code:
rm -Rf ~/Downloads/RehabMan
mkdir ~/Downloads/RehabMan
cd ~/Downloads/RehabMan
patchmatic -extract

Post contents of Downloads/RehabMan directory (as ZIP).

Also, post ioreg: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.

And output from:
Code:
kextstat|grep -y acpiplat
kextstat|grep -y appleintelcpu
 
Lenovo u310 Yosemite build with Clover

Code:
kextstat|grep -y acpiplat
   13    2 0xffffff7f827c4000 0x65000    0x65000    com.apple.driver.AppleACPIPlatform (3.1) <12 11 7 6 5 4 3 1>
and
Code:
kextstat|grep -y appleintelcpu
   21    0 0xffffff7f82467000 0x2b000    0x2b000    com.apple.driver.AppleIntelCPUPowerManagement (218.0.0) <7 6 5 4 3 1>
   30    0 0xffffff7f82462000 0x3000     0x3000     com.apple.driver.AppleIntelCPUPowerManagementClient (218.0.0) <7 6 5 4 3 1>
 

Attachments

  • Patcmatic files.zip
    19 KB · Views: 182
  • u310 IOReg.ioreg
    1.6 MB · Views: 306
Lenovo u310 Yosemite build with Clover

Code:
kextstat|grep -y acpiplat
   13    2 0xffffff7f827c4000 0x65000    0x65000    com.apple.driver.AppleACPIPlatform (3.1) <12 11 7 6 5 4 3 1>
and
Code:
kextstat|grep -y appleintelcpu
   21    0 0xffffff7f82467000 0x2b000    0x2b000    com.apple.driver.AppleIntelCPUPowerManagement (218.0.0) <7 6 5 4 3 1>
   30    0 0xffffff7f82462000 0x3000     0x3000     com.apple.driver.AppleIntelCPUPowerManagementClient (218.0.0) <7 6 5 4 3 1>

X86PlatformPlugin is loaded. Why do you believe it is not?
 
Lenovo u310 Yosemite build with Clover

X86PlatformPlugin is loaded. Why do you believe it is not?
I guess I was looking for the wrong thing. I did not see X86PlatformPlugin in IORegistryExplorer under CPU 0, but apparently that's not the exact wording I should have been looking for anyway.

If I've got power management behaving appropriately, this just leaves AirPlay as the one thing I'm aware of that isn't working. You have it working on your u430 I believe. I'm assuming that AirPlay video won't work given that there is only the integrated HD4000 graphics on the 310 and I think you need a dedicated video card + integrated graphics to make AirPlay mirroring work? The Airplay icon shows up in the menu bar. If I try to connect it thinks for awhile and then says it can't, then the icon goes away.

But it seems like Airplay audio should work, and at least through my AppleTV it doesn't.
 
Lenovo u310 Yosemite build with Clover

I guess I was looking for the wrong thing. I did not see X86PlatformPlugin in IORegistryExplorer under CPU 0, but apparently that's not the exact wording I should have been looking for anyway.

I don't know how you could miss it:
Screen Shot 2015-02-18 at 7.52.32 AM.png

If I've got power management behaving appropriately, this just leaves AirPlay as the one thing I'm aware of that isn't working. You have it working on your u430 I believe. I'm assuming that AirPlay video won't work given that there is only the integrated HD4000 graphics on the 310 and I think you need a dedicated video card + integrated graphics to make AirPlay mirroring work? The Airplay icon shows up in the menu bar. If I try to connect it thinks for awhile and then says it can't, then the icon goes away.

I've tested AirPlay mirroring. Not sure if that's what you're referring to. You do not need a discrete card for AirPlay mirroring.
 
Lenovo u310 Yosemite build with Clover

I don't know how you could miss it:
View attachment 126962
Well that does look glaringly obvious. I swear it wasn't there when I looked yesterday. I will check again.


I've tested AirPlay mirroring. Not sure if that's what you're referring to. You do not need a discrete card for AirPlay mirroring.
Yes, that was what I was referring to. So apparently it should be possible. But it's not working for me. Off to do more research it appears.
 
Lenovo u310 Yosemite build with Clover

...
Yes, that was what I was referring to. So apparently it should be possible. But it's not working for me. Off to do more research it appears.

What are you using for WiFi? Could be you have work left to do regarding making your WiFi appear as AirPort native.
 
Status
Not open for further replies.
Back
Top