Jump to content

[GUIDE] Lenovo T460/T470 macOS with Clover and OpenCore


tluck
 Share

1,289 posts in this topic

Recommended Posts

@HarveyDX 

 

One can create a Sierra (10.12.x) installer on El Capitan.

i presume you did this recently so Sierra is 10.12.4 or 10.12.3

And i presume you made it like this:

 

sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/USB --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction

 

if so then mount the ESP of the USB.

copy the zip EFI contents as is onto the USB ESP. 

then edit the config.plist to make these 2 changes:

 

in the Graphics Section - change Inject Intel False to Inject Intel True

in the Devices section - change IntelGFX 0x0000 to 0x12345678

save this config.plist  and boot up the installer. 

 

I am driving a T460 i7 6600 and i am still in the early stages (though actually having quiet a number of toshs build already, but desktops, not laptops).

 

Kernel Panics / IGP issues on installer

I had the same kernel panics after creating the installer using unibe*st way ( i was used to it, looking at the alternative options here). Fixing this was not directly possible using what you described. Using the most recent clover version, adjusting Inject Intel / IntelGFX on the EFI partition of the stick did not work - when booting and checking the clover options, the options were not set.

 

Setting the options manually in the clover options under Graphics to the values you explained does work though - the installed boots and finishes the installation without any further issue.

 

SATA/AHCI 

Also a little hint, at least on my latest bios (1.23), the SATA AHCI option is no longer available - still had not issues with not having / setting it

 

 

Wifi?

My Bios: (1.23)

  1. Anybody aware if BCM94352Z DW-1560 is a good pick? If yes, reading about "Bios locks" so they wont work - how to identify if my BIOS is affected, or is that FUD in general? I have the most recent bios installed, updated yesterday
  2.  are there any better / easier picks for wifi? Have seen mentions of Airport for Broadcom 4360 - but not sure e.g. one of those https://www.amazon.com/Broadcom-Bcm94360cs-Bcm94360csax-Bluetooth-Wireless/dp/B00PDN4H9E would actually fit into the t460

 

RC Fix needed?

With the most recent version of clover, do i still need the rc fix?

  • Haha 1
Link to comment
Share on other sites

@myxored -

 

thanks for the report.

 

when i post a new zip (waiting for Sherlocks to fix gma.c - I will add 2nd non-SkyLake GFX config.plist option that one can select in Clover to boot from - good for the KP situation - installers or booting OS when the GraphicFramebuffer kext is not in cache. 

 

questions: 

WiFi:

there are no bios-whitelist issues. I use BCM94352Z DW-1560. I removed the standard intel card and dropped the Broadcom chip in its place. then with the kexts in the zip you are good to go.

 

rc fix - correct - the most recent version of clover has the same 80.nvram_save script v1.16.4

the rc.shutdown.d scripts are needed - either installed by recent Clover .pkg or by script in zip.

Link to comment
Share on other sites

@tluck

 

thanks for the report.

 

when i post a new zip (waiting for Sherlocks to fix gma.c - I will add 2nd non-SkyLake GFX config.plist option that one can select in Clover to boot from - good for the KP situation - installers or booting OS when the GraphicFramebuffer kext is not in cache. 

 

thanks

 

questions: 

wifi - yes I use BCM94352Z DW-1560. i removed the intel and dropped that chip in place. then with the kexts in the zip you good to go.

Did you had issue with bios-whitelists?

 

 

rc fix - correct - the most recent version of clover has the same 80.nvram_save script v1.16.4

 

 

Sorry, did not understand this one clearly. "correct" means you do no longer need it? :)

  • Sad 1
Link to comment
Share on other sites

there are no bios-whitelist issues

 

the rc.shutdown.d scripts are needed - either installed by recent Clover .pkg or by script in zip.

 

Once again, thank you - for the readers,  BCM94352Z DW-1560 will work

 

I have seen, that your "after installation scripts" do copy the kext on /S/L/E or /L/E are there any technical reasons you do not use the EFI partition and clover kext patches / loading? Doing so would ensure that upgrading the macOS does not always destroys the system. Could you explain your reasons, are there any kext which will not work loaded from CLOVER? Are the reasons connected to SIP? Thanks,

 

(i am in the chat right now, if you want to talk there)

Link to comment
Share on other sites

well i don't put anything in /S/L/E - these are all unchanged.  I use /L/E which is used for custom/3rd party kexts.

all the custom kexts can be in the ESP for clover to inject with one exception the X86PlatformPluginInjector.kext - which has a symbolic link to the original kext in /S/L/E. this kext overrides the original.

 

Upgrades will work without problems. just download from app store and reboot!

 

 

@espamac - 

check that there are these files:

$ ls -l /usr/local/bin/sleepwatcher /etc/rc.wakeup /etc/rc.sleep /Library/LaunchDaemons/de.bernhard-baehr.sleepwatcher.plist
-rw-r--r--  1 root  wheel    516 Dec 19 14:39 /Library/LaunchDaemons/de.bernhard-baehr.sleepwatcher.plist
-rwxr-xr-x  1 root  wheel   1026 Jan  9 09:46 /etc/rc.sleep
-rwxr-xr-x  1 root  wheel   1045 Jan  9 09:47 /etc/rc.wakeup
-rwxr-xr-x  1 root  staff  66120 Aug  3  2016 /usr/local/bin/sleepwatcher
  • Like 3
Link to comment
Share on other sites

@tluck 

 

could you explain, how you meant the framebuffer patch. You write, that if i booted using an alternate framebugger id, like i did with 0x12345678 right. (section 7. FrameBuffer Patch)

It then seems that you state, one does not longer need this patch after that, since the kext is in thekextcache? Could you probably explain, if that patch is mandatory in general or e.g. in the case i had to boot with inject intel / 0x12345678

 

patchmatic:

In your howto you basically mention anything, but not patchmatic in terms of how to get it. Since it iss not part of root/usr/local/bin .. one has to download it from https://code.google.com/archive/p/os-x-maciasl-patchmatic/downloadsand put it under /usr/local/bin .. you might want to mention this in your guide (or did i miss the point?)

Link to comment
Share on other sites

@myxored 

 

SkylakeFramebuffer - the way it works is this:

 

the AppleIntelSKLGraphicsFramebuffer.kext will KP unless you patch it.

Clover can do this patching only after is in the kext cache. but to get it the kext cache it needs to be loaded.

 

SO! how to get it loaded?

 

boot with bogus ID to bring system up in basic gfx mode.

manually patch the SkyLake FB binary (using the script skl_patch.bash). 

reboot

now the system can start using full Skylake GFX

 

the script will save the original binary as /Volumes/macOS/System/Library/Extensions/AppleIntelSKLGraphicsFramebuffer.kext/Contents/MacOS/AppleIntelSKLGraphicsFramebuffer.orig

you can move this file back to the original name (clover will handle the patching going forward) .

 

i will add 2 things to the zip

 

1) patchmatic

2) my unPatch script to move the patched binary back and rebuild the caches.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Thank you once again!

 

Sorry to add more questions, i hope this also helps others.

 

Extracting ACPI Tables *SOLVED*

When trying to create the own patched DSDT/SSDT (since i have the bios 1.23, not 1.22) i tried to extract my current ACPI tables, but that does not work. Pressing F4 during the view of the "clover boot manger" ( where i select the partition to boot from ) never resulted in ACPI/origin to be pupulated. I tried this while booting from the macOS EFI partition and also when booting from the installer with your EFI setup. Do i miss something obvious here?

 

I also tried using `patchmatic -extract` - i got some files but when running iasl i get 

External object resolution file      SSDT-17.aml
Input file SSDT-17.aml, Length 0x89 (137) bytes
ACPI: SSDT 0x0000000000000000 000089 (v02 CpuRef CpuSsdt  00003000 INTL 20160422)
Pass 1 parse of [SSDT]
ACPI Error: [_DSM] Namespace lookup failure, AE_ALREADY_EXISTS (20160422/dswload-462)
ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog (20160422/psobject-310)
Could not parse external ACPI tables, AE_ALREADY_EXISTS

So i guess using patchmatic might be just the wrong way?

 

In case use ask, the EFI partion if of type EFI - i read that people say it must be FAT32 for clover to be able to write to it, so i removed the EFI partition in the installer using gpt and created it again, formatted it with newfs_msdos -n 16 on copied the EFI over gain - but nothing changed.

 

Do i miss the point once again? Am i to stupid to press F4? ( Sure i pressed them all, ctrl + F4, fn+f4, F4 .. )

Thanks!

 

SOLUTION: Keeping that one above for google. I solved it by actually creating the EFI/CLOVER/ACPI/origin folder and then rebooting and pressing the shortcut

Using this method, i could successfully generate, install and boot ACPI files for Bios 1.23

 

FramebufferPatch 

You write, that after patching it, it can be restored, so it will be immutable to macOS updates. But what happens if something flushes the kextcache, in this case i would need to "repatch" right?

Link to comment
Share on other sites

i added the origin folder to the zip (and reposted) ... thanks for all the details to get this install guide perfected.

 

yes - that's what you need to do if for some reason the standard kext becomes uncached. rewatch manually.   i  like to keep all the kexts in /S/L/E unmodified so the install procedures/update can clean update and replace things as needed.

Link to comment
Share on other sites

@tluck,

 

I had tried the sleepwatcher, it works. Thank you.

But the Bluetooth still does not work with  your modified BrcmNonPatchRAM2.kext patch.

 

And I found you deleted the /Library/LaunchDaemons/de.bernhard-baehr.sleepwatcher.plist in your new T460-distribute. Any problem for that?

Link to comment
Share on other sites

@superbboy - ah.  no wonder Espamac was having trouble with sleepwatcher - ok reposted the zip again with the de...plist file

 

so what do you mean BT doesn't work?  does it work before sleep?

Link to comment
Share on other sites

@vusun123 - did this work for you on the installer? I will test again but my initial attempt to add it to the installer failed.

It doesn't get injected properly or what ? I have long gone away from manually installing through USB and started using an external drive with a working copy of macOS, use AutoDMG to generate a working vanilla macOS installation and restore it via Disk Utility to my hacks, but I'm sure even booting the fresh restored macOS, IntelGraphicsDVMTFixUp.kext works correctly

Link to comment
Share on other sites

Just a little update of my side to ensure, what i have is the expected outcome:

 

What works:

 - Smooth / Glitchless graphics

 - Sound works well (output + mike)

 - Sound controls on the keyboard

 - Display brightness controls works (started to work after ACPI tables remade)

 - Ethernet

 - Trackpad and Trackpoint, though the trackpad feels pretty useless and has some ïtches"(Scrolling)

 - Trackpad buttons and scrollbutton

 - Booting from HDD without customizing config.plist

 - USB (both sides)

 - External Battery status/charge/

 - displayport works on FullHD

 - HDMI works on FullHD

 - DP + HDMI can be used at the same time ( yet FullHD tested, not quad)

 - Plugin in the Powercable, i can fold the notebook while both, HDMI / DP are still working ( no sleep)

 - Headphone jack (output)

 

 

What does not work":

 a ) Remap Option / Command key in the System Preferences - seems like the keyboard is not detected/assigned right, so the mapping is not applied?

 d ) Home/End buttons

 c ) Mike mute by control

 d) Microphone on the headphone jack is not working, it seems like the extern Microphone is still used - there is no option to select a different one in the input settings in macOS

 e) QuadHD not working, did though yet not apply patches from https://github.com/Floris497/mac-pixel-clock-patch-V2- so that is kind of expected for the IGP

 

 

--

 

a) After installing karabine elements, the option / command remaps are suddenly working (the one i made under prefs), i did not need to set them in karabine elements. Though after doing so, the FN key stopped working ( no event at all ) so i rebind it to capslock. Also all FN-Shortcuts like mute and so and need to be redone (configured) in karabiner elements then. It works in the end, but its kinda a hassle.

 

Rebinding pageup/down to first/last does not work with karabiner elements, since thats option+left/right and you cannot bind this. Are there any other ways?

Link to comment
Share on other sites

@myxored

 

a ) Remap Option / Command key in the System Preferences - seems like the keyboard is not detected/assigned right, so the mapping is not applied?
d ) Home/End buttons
c ) Mike mute by control

 

a- don't need karibiner

see /Library/Extensions/VoodooPS2Controller.kext/Contents/PlugIns/VoodooPS2Keyboard.kext/Contents/Info.plist

look in LENOVO section for key "Swap command and option" - change from True to False.

 

b- home/end works for me say in Safari - goes to top or bottom of page.

 

c- yeah mute mic doesn't do anything for me

 

@vusun123 

- yeah but the DVMT did not work for me on the installer or on a fresh install. the kernel log shows it made some patches but. so i don't know.

Link to comment
Share on other sites

Other for the installer

/L/E for the OS

Just to give this notice also, i do not install to /L/E, i keep all kext in EFI/CLOVER/kext/10.12 on the macOS partition and in other on the usb drive (installer). I am not touching /L/E nor toucheing /S/L/E at all - and it works like tluck expected.

 

@tluck seriously great work - i would love to see you putting this on github so i could help cleaning up some of those bash scripts, e.g. install_dsdt.... in the end you do a cp ss* SS* .. that will fail when ss* does not match, which it will not for probably every t460...

 

All over, just a great basement to build in!

Link to comment
Share on other sites

Just to give this notice also, i do not install to /L/E, i keep all kext in EFI/CLOVER/kext/10.12 on the macOS partition and in other on the usb drive (installer). I am not touching /L/E nor toucheing /S/L/E at all - and it works like tluck expected.

 

@tluck seriously great work - i would love to see you putting this on github so i could help cleaning up some of those bash scripts, e.g. install_dsdt.... in the end you do a cp ss* SS* .. that will fail when ss* does not match, which it will not for probably every t460...

 

All over, just a great basement to build in!

Using kext injection for long-term usage is a bad idea. Who knows when your Clover installation is borked and won't inject kexts for you. If you have tested your machine and confirmed it is stable, do install kexts to L/E or S/L/E

Link to comment
Share on other sites

Using kext injection for long-term usage is a bad idea. Who knows when your Clover installation is borked and won't inject kexts for you. If you have tested your machine and confirmed it is stable, do install kexts to L/E or S/L/E

 

I am using this for about 3 years on all my hackintoshs and a clover installation never "brokes", while L/E regularly did ( perm issues, something replaced something ). EFI is not mounted after boot, getting manipulated "suddenly" is nothing just "happens", very different with L/E.

 

Anyway, do you have a real-world example you lived through, where clover stopped working? I am of course curious and eager to learn about those things, my 6 boxes here run the clover only way since mavericks, with upgrades, still very solid.

Link to comment
Share on other sites

Note: I keep posting this so people know what to expect from the T460 tosh setup - i am doing a more brief / daily work test. If you actually find that not useful, tell me, i will stop posting this

 

Hint: if nothing is written behind an aspect, there is nothing to be done to get it done, its just plain working OOTB.

Hint: everything with a * means updated or added since the last update

 

 

--

 

What works:

 - Smooth / Glitchless graphics

 - Sound works well (output + mike)

 - Sound controls on the keyboard

 - Display brightness controls works (started to work after ACPI tables remade)

 - Ethernet

 - Trackpad and Trackpoint, though the trackpad feels pretty useless and has some ïtches"(Scrolling)

 - Trackpad buttons and scrollbutton

 - Booting from HDD without customizing config.plist

 - USB (both sides)

 - External Battery status/charge/

 - displayport works on FullHD *

 - HDMI works on FullHD *

 - DP + HDMI can be used at the same time ( yet FullHD tested, not quad) *

 - Plugin in the Powercable, i can fold the notebook while both, HDMI / DP are still working ( no sleep) *

 - Headphone jack (output) *

 - remap cmd/option buttons using this *

 - Home/End work as expected *

 

What does not work":

 a ) Mike mute by control (expected)

  B) Microphone on the headphone jack is not working, it seems like the extern Microphone is still used - there is no option to select a different one in the input settings in macOS *

 c) QuadHD not working, even with applied https://github.com/F...-clock-patch-V2 - opened an issue here

 

@tluck dies the displayfix not work, because we are not using the core driver? Under Sierra with my i7 4700 and the onboard HD4200 (desktop CPU) that fix worked, but i dont think i used a special IGP patched driver, so that might be the reason, right?

 
Link to comment
Share on other sites

@myxored

 

glad everything is working for you. everything works for me too!

 

on your not working list:

 

a - mic mute - i have no plans to implement - but correct - the key is not mapped to anything.

 

b - headphone with microphone - sometimes you need to plug-in and out and back in.

then SysPref Audio Input will show as

Line In        Audio line-in port

vs

Internal Microphone         Built-in but

 

c not sure about QuadHD - i only have HD monitor.

 

we are using all "core" standard apple kexts/drivers - what does "displayfix" not work mean? i am not familiar with this.

 

p.s. with your kexts in ESP - did you copy the binary into X86PlatformPluginInjector to make that work?

Link to comment
Share on other sites

ok. reposted the zip in the guide - should be the last update for awhile. :)

 

mostly cleaned up stuff based on recent feedback

 

21-Apr-2017 Update

  • Updated to Clover 4063
  • Added patchmatic and skylakeFB patch/unpatch tools/scripts
  • Cleaned up stuff
  • Tweaks for config.plist and added config.noSKL.plist - no need for SSDT-IGPU
  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...