Jump to content

Lenovo ThinkPad L420 macOS Sierra

- - - - - mac os sierra lenovo thinkpad l420 install

  • Please log in to reply
12 replies to this topic

#1
kosakgroove

kosakgroove

    Unix Shepherd

  • Members
  • PipPipPipPipPipPipPip
  • 709 posts
  • Gender:Male
  • Location:ALGARVE
  • Interests:The unexpected is the real
Lenovo Thinkpad L420 macOS Sierra Guide

Thanks to the good old mighty Clover Bootloader, we have so much better support for laptops and different alternative hardware. I have made a few HackBook Pros but without a shadow of a doubt this Lenovo L420 is almost a perfect Apple computer. Even better in some aspects if you ask me about it.

Lenovo theme on Clover in my L420

Attached File  screenshot2.png   148.4KB   44 downloads
Attached File  screenshot3.png   232.37KB   39 downloads

I will be quoting a good fellow of the community, tluck , who made an awesome guide for his Lenovo T420, and he also helped me achieve better functionality. Regards to you my friend.

I have already written a guide for installing and perfecting Mac OS X El Capitan on this PC, but I wanted to see how good Sierra could run, and OH BOY it is running like a charm. Here are the specs of the machine. In my case I added 8GB of RAM.

Attached File  Captura de pantalla 2017-05-18 a las 13.02.12.png   1.67MB   37 downloads

I understand this is not a highly popular laptop outside corporations, I don’t even know if it was ever sold to the general public, so I guess this post will help me know that hahah anyway a friend of mine gave me two of them, one with i5 another with i3. This tutorial applies to any of those models. It should also apply to older versions of Mac OS X all the way until Snow Leopard (little modifications required as well as appropriate kexts)


What is working
WiFi , Bluetooth, Airdrop (Wifi replaced with Atheros AR9285)
Full QE/CI acceleration with integrated Intel HD3000 graphics
Trackpad with 1 finger , 2 finger and 3 finger gestures
keyboard as well as function keys (brightness, volume)
Battery percentage
Sleep, Shutdown and Reboot
Sound working on ALC269 mobile
DVD Drive
DisplayPort audio and video
VGA out
USB 3.0 ExpressCard (Renesas)
iMessage and Facetime
Recovery Partition


What is not working
You tell me :thumbsup_anim:


1. Creating the install media

The best way to install macOS to our Hackintosh is definitely to create a USB with the latest version of macOS Sierra (10.12.5 as of writing this guide) and to use the createinstallmedia method. For that you will need either a Macintosh computer, an existing Hackintosh or a Virtual Machine running OS X 10.6 or above.

This way you will end up with a clean vanilla install , and with a recovery partition capable of booting and capable of using FindMyMac / FindMyiPhone
I won’t go into too much details about this since this is one of the first things you should know when attempting to Hackintosh.

This procedure is for a new macOS installation using a USB Installer.
Download macOS from the App Store - it is freely available
One can build a macOS USB installer with the standard macOS installer app downloaded from the "App Store". Download and extract the zip file from this post to build a Clover-based USB installer. This same bundle will be installed later on HD.

Install macOS to a GPT formatted disk using the standard Install macOS.app downloaded from the Apple Store.
Create a macOS USB installer
Partition an 8GB (or larger) USB formatted with GUID Partition Table (GPT)
- use the Partition Options... menu to change from MBR to GPT
- Name the partition USB - the install process will rename it, but it matches the script below.
- Use format: Mac OS Extended (Journaled) (formerly OS X Extended)

Note: if you have a larger USB (say 16GB) you can split into 2 8GB partitions, so you can have 10.12 and 10.11 installers on the same USB key

Run this command to copy the bits to the USB key:
Note: if using an older version of macOS, replace with the corresponding app name.


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

2. Install bootloader (Clover) to install media

You should select your USB in the Clover installer and then hit “Customize”
Select the next options:

Install Clover in the ESP
Install boot0ss in MBR
Clover EFI 64bits SATA
CSMVideoDxe-64
EmuVariableUEFI-64
OsxAptioFix2Drv-64
Fat64



3. Configuring the bootloader

After installation is complete, the EFI partition we want to configure will already be mounted, so we proceed to open it and do the following
Install HFSPlus.efi and NTFS.efi in drivers64UEFI folder and remove VboxHFS.efi. Because this PC doesn’t have any UEFI you should also install HFSPlus.efi and NTFS.efi to the drivers64 folder.

Open the folder /EFI/Clover/kexts and delete all the folders starting by 10 and leave only the “other” folderIn the above mentioned “other” folder.
Place the kexts that I will quote next (you can download the ones attached to the post, but I always recommend the latest versions) :

ACPIBatteryManager.kext
AppleALC.kext
CodecCommander.kext
FakePCIID_XHCIMux.kext
FakePCIID.kext
FakeSMC, HWInfo, IntelCPUMonitor (HwSensors3 from Slice)
GenericUSBXHCI.kext (only if you use an USB3.0 ExpressCard)
RealtekRTL8111.kext
USBInjectAll.kext
VoodooPS2Controller.kext (tluck's version)

Attached File  L420 kextpack.zip   1.04MB   128 downloads


Notes on VoodooPS2 (tluck)

VoodooPS2Controller.kext (v1.8.25f) - New custom T420 version of RehabMans's PS2 Keyboad/TouchPad/TrackPoint
- This version has extra T420 definitions in the Info.plist files.
Tweaks to help with TrackPoint on startup
Jakibaki's cut/paste fix for middle button + scrolling fix.
if MiddeMouseScroll is set to true scrolling TrackPoint works.
Sierra PrefPane integration and other fixes (smoothness and caps-lock) by usr-sse2 (see this post on GitHub)
Modified Info.plist(s) to add LENOVO T420 override settings.
​TrackPad pressure FingerZ value set to 47 - up from default of 30 - change to suite your touch in VoodooPS2Controller.kext/Contents/PlugIns/VoodooPS2TrackPad.kext/Contents/Info.plist
Various Default overrides such as MouseMultiplier X and Y for TrackPoint.
Note: VoodooPS2Controller keyboard mappings have 3 or 4 finger swipe left/right to back/forward configured for Safari browser vs space swipe
Optional Key Map: This map works in El Capitan. Since the NX keys are in a state of flux for Sierra - it is disabled by default now. If you would want to use this new map, edit the Info.plist file and rename the T420 key map entry. The F1-F15 key mappings are VoodooPS2Controller.kext/Contents/PlugIns/VoodooPS2Keyboard.kext/Contents/Info.key.plist:
F1 - LCD Brightness Down
F2 - LCD Brightness Up
F3 - Mission Control App Selector
F4 - Launchpad
F5 -
F6 -
F7 - Mirror Displays
F8 - Disable/Enable TouchPad
F9 -
F10 - Mute Volume
F11 - Volume Down
F12 - Volume Up
PrtSc - Scan Previous Track
ScrLck - iTunes Play/Pause
Pause - Scan Next Track
Insert - Eject



After all the kexts are in the correct folder you should tweak your config.plist as follows, I recommend using a proper plist editor , the best is Xcode.


Attached File  config.plist.zip   4.82KB   108 downloads

Lenovo mostly whitelist the Wifi cards on their laptops (and some desktops) so you will have to use a custom BIOS for this. There is one here luckily.

If you need me to explain how to flash it then you shouldn’t really be Hackintoshing in the first place.
After you have flashed the BIOS make sure you set the SATA controller to AHCI. You should be able to boot from the Clover USB and install Mac OS X
Remember to use a GUID partition scheme for the drive you will use. Recovery partition should be generated automatically by the OS X installer.

4. Hopefully you boot and get to install macOS well.
Boot Clover from USB Installer and select Install macOS
Install the OS on your GPT disk on the macOS partition.

Make sure the drive is formatted using:
Scheme: GUID Partition Map (GPT)
Partition Name: macOS
Format: macOS Extended (Journaled)

Dual BOOT tip:
If you plan to dual boot Windows from the same HD - DO NOT make the 2nd partition NTFS or ExFAT with the Disk Utility app.
Make them both "Mac OS Extended (Journaled)"
Size the 2 partitions appropriately - but later you will delete/reformat the 2nd partition for Windows.


Click through GUI Install menus and wait for the installation to fully complete - on a spinning disk takes about 30-45 minutes.
Follow these Notes and Tips:
When the installer screens shows: "To pair a Bluetooth keyboard, turn it on and wait for your computer to connect to it.”
Hit the Space Bar to get past this step.

When installer seems to hang at: "About a second remaining”
Don’t Panic, this "second" may take about 10 minutes or more to finish.
Just wait for the installer to reboot the computer and continue the installation.
The whole install process takes about 1 hour to complete.

On the first boot from the HD when asked: "How Do You Connect?”
Select: “My computer does not connect to the Internet”
You can set up the network later after installation of the NIC driver kext.
Your Intel WiFi will not work. Period.


5. Next you have to install the boot loader to the HDD
You should select your USB in the Clover installer and then hit “Customize”
Select the next options:

Install Clover in the ESP
Install boot0ss in MBR
Clover EFI 64bits SATA
CSMVideoDxe-64
EmuVariableUEFI-64
OsxAptioFix2Drv-64
Fat64
Install all RC scripts to target partition

After installation is complete, the EFI partition we want to configure will already be mounted, so we proceed to open it and do the following
Again we install HFSPlus.efi and NTFS.efi in drivers64UEFI folder and remove VboxHFS.efi. Because this PC doesn’t have any UEFI you should also install HFSPlus.efi and NTFS.efi to the drivers64 folder. Also copy your ACPI files and config.plist at the right places.

6. In order to get everything working properly , follow these guidelines for ACPI tables patching.
Firstly, press F4 at Clover GUI in order to dump the native ACPI tables. You will most probably get a crash, a red screen full of weird black numbers and strange symbols, do not worry, just force shutdown. At the next boot if you look in /EFI/Clover/ACPI/origin you should have a bunch of files.
After getting MaciASL and acpica tools from RehabMan (always updated) and installing them, and adding rehabman’s laptop dsdt patch repository, which is this:

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


Delete all files except DSDT, SSDT-0 and SSDT-1 in /EFI/Clover/ACPI/origin

You should decompile the DSDT , SSDT-0 and SSDT-1 using the following commands (make sure you create a .txt document containing the following external references and place it in the same place where the ACPI files are)

External(MDBG, MethodObj, 1)External(_GPE.MMTB, MethodObj, 0)External(_SB.PCI0.LPCB.H_EC.ECWT, MethodObj, 2)External(_SB.PCI0.LPCB.H_EC.ECRD, MethodObj, 1)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)
Then do:

cd /path/to/your/filesiasl -da -dl -fe refs.txt *.aml
After obtaining the .dsl files you should open them and check for errors.
The only error you will find will be in one of the SSDTs and it can be fixed using the Remove _PSS placeholders patch to fix that SSDT that only contains info about the CPU and is full of “Package (0x06)”
When your files are nice and clean and in .dsl format you can happily apply the following patches to DSDT


Use the patch “Rename GFX0 to IGPU”
Use the patch “Rename B0D3 to HDAU”
Use the patch "DTGP" (easy to find with our buddy Google)
Use the patch "Fix _WAK Arg0 v2"
Use the patch "HPET Fix"
Use the patch "SMBUS Fix"
Use the patch "IRQ Fix"
Use the patch "RTC Fix"
Use the patch "OS Check Fix"
Use the patch "Fix Mutex with non-zero SyncLevel"
Use the patch "Add IMEI"
Use the patch “6 Series USB”
Use the patch "USB PRW 0x6D"
Use the patch "Audio Layout id 3"
Use the patch "L420 battery patch"

For Brightness keys (Q14 and Q15 in DSDT)

In Method _Q14 add at the end:

Notify (PS2K, 0x0206)Notify (PS2K, 0x0286)

In Method _Q15 add at the end:

Notify (PS2K, 0x0205)Notify (PS2K, 0x0285)
If you are lost with ACPI here is how you should place the code:

Attached File  Captura de pantalla 2017-05-18 a las 19.47.28.png   441.71KB   29 downloads

Little bonus, since the ThinkVantage key does absolutely nothing, I patched the DSDT so that when you hit that key, the fans will remain at 100% speed all the time. Hit it again and they go back to auto mode :D Cool Right? Replace your _Q19 method with this (credits to tluck)

Method (_Q19, 0, NotSerialized)  // _Qxx: EC Query            {                Name (FANS, One)                Store (HFSP, FANS)                XOr (FANS, 0x80, Local0)                If (Local0)                {                    Store (0x80, HFSP)                }                Else                {                    Store (0x07, HFSP)                }            }
Attached File  Captura de pantalla 2017-05-18 a las 19.48.53.png   435.38KB   26 downloads


After all the ACPI tables are properly patched save them all and compile your tables

cd /path/to/patched/tablesiasl *.dsl
After getting the resulting patched aml files, place them in /EFI/Clover/ACPI/patched for Clover to load it
Finally you will need to generate an SSDT using ssdtPRGen.sh

Note:
- If you want working brightness in Sierra make sure to download my ACPI files pack and use the provided SSDT-PNLF
- Also if you use Atheros AR9285 like me you can use the attached SSDT-2 and see if it works, otherwise provide here your DSDT


7. After you have your DSDT, SSDT-0, SSDT-1 and SSDT (the one generated by the script) , along with SSDT-PNLF and SSDT-2 if you need them, place them all together in /EFI/Clover/ACPI/patched and in the ACPI section of your config.plist make sure to "Drop OEM" tables and set the "Sorted Order"


Overall I would say this laptop is quite perfect for a Hackintosh , I use it for a few months and I love it, hope you do too.

This Hack is functioning almost 100% in Mac OS X and certainly it performs so much better than in Windows
Enjoy our fully functional Hack

Attached File  Captura de pantalla 2017-05-18 a las 19.24.16.png   1.3MB   24 downloads

General Notes and Random Fixes

The stock Intel WiFi will not work. The common approach is use a modded BIOS and replace the WiFi with a Broadcom or Atheros chip (I went for AR9285).

Enable (turn on) Bluetooth so the green light is showing on the LCD bezel (do from Windows or Ubuntu).
Also make sure the side switch is set to green too!
When using external headphones or speakers, may need to plug and unplug 1 or 2 times for recognition.

iMessage/Facetime may not register without overriding the Clover generated values with real ROM and MLB values from a real Apple Mac. Search thread for ROM to get more info.
​Clover can possibly generate proper values and inject using RtVariables - use mac address -- see wiki for details.


Hibernation - Use OsxAptioFix2Drv-64.efi instead of OsxAptioFixDrv-64.efi UEFI driver for restart from hibernation. Suggested settings if you don't want or use hibernation:
sudo pmset -a hibernatemode 0
rm /var/vm/sleepimage
if you want hibernation, then set hibernate mode to 7 (mode 7 is like mode 3 but without encryption) - may need to manually edit this value into the plist file now.
sudo pmset -a hibernatemode 7
Note: Booting up from the hibernated image may have jumbled or blank LCD until you do a sleep/wake cycle to reset the LCD.

Add boot option darkwake=0 if you would like to disable power nap and have the lid wake the gfx instead of hitting extra key.

TrackPoint may not be responsive on startup (random occurance) - a sleep/wake cycle should revive it.



Here are my patched tables if you need them :)
Attached File  L420 patched ACPI Sierra.zip   28.77KB   74 downloads

#2
Tetonne

Tetonne

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 488 posts
  • Gender:Male

Great :) 



#3
kosakgroove

kosakgroove

    Unix Shepherd

  • Members
  • PipPipPipPipPipPipPip
  • 709 posts
  • Gender:Male
  • Location:ALGARVE
  • Interests:The unexpected is the real

Great :)

Happy to hear you like the guide ! If you know someone with a similar spec Lenovo share the word :)


Sent from my iPhone using Tapatalk

#4
XentriX0110

XentriX0110

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts

Hello,

 

 I tried using your  SSDT-2 with my DSDT and tried using yours with your config but unfortunately could not get it to work. I boot up with a black screen.

 

I am using the same wifi card and have installed the modified Bios.

 

attached link is my DSDT and Config file that is working for me, any help is much appreciated.

 

https://filebin.ca/3...DTandConfig.zip

 

 

 Also if you use Atheros AR9285 like me you can use the attached SSDT-2 and see if it works, otherwise provide here your DSDT



#5
kosakgroove

kosakgroove

    Unix Shepherd

  • Members
  • PipPipPipPipPipPipPip
  • 709 posts
  • Gender:Male
  • Location:ALGARVE
  • Interests:The unexpected is the real

Hello,

I tried using your SSDT-2 with my DSDT and tried using yours with your config but unfortunately could not get it to work. I boot up with a black screen.

I am using the same wifi card and have installed the modified Bios.

attached link is my DSDT and Config file that is working for me, any help is much appreciated.

https://filebin.ca/3...DTandConfig.zip


Also if you use Atheros AR9285 like me you can use the attached SSDT-2 and see if it works, otherwise provide here your DSDT

Your first step would be to find a PXSX device in your ioreg, which indicates in what adress the device is ( RP01, RP02,RP03, etc)then you should edit the SSDT2 since in my case it is located in RP02 but in yours it can be different,

Worst case scenario just use toledaARPT.kext which is still working for macOS Sierra and AR9285

Regards mate


Sent from my iPhone using Tapatalk

#6
XentriX0110

XentriX0110

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts

Your first step would be to find a PXSX device in your ioreg, which indicates in what adress the device is ( RP01, RP02,RP03, etc)then you should edit the SSDT2 since in my case it is located in RP02 but in yours it can be different,

Worst case scenario just use toledaARPT.kext which is still working for macOS Sierra and AR9285

Regards mate


Sent from my iPhone using Tapatalk

Took the easy way out and installed the kext you mentioned. Working well thank you.

Sent from my SM-G935T using Tapatalk

#7
Marco1984

Marco1984

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 193 posts
Hi does it guide works with T420s? Thanks


Sent from my iPhone using Tapatalk Pro

#8
cola4an

cola4an

    InsanelyMac Protégé

  • Members
  • Pip
  • 3 posts
  • Gender:Male
  • Location:Bavaria
 
Hello,
had received a L420. The thing really looks like new.
I have another WLAN card installed and flashed ModBios.
I have tried the instructions now 10 times. The installation runs through, but after the first boot from the SSD,
the screen will be black and the mouse pointer will appear in the upper left corner.
I just can not get the thing to run. Probably am too stupid. :wallbash: 
Would anyone be so nice and would give me his EFI folder?
 
 
thank you in advance
 
colafan

 



#9
cola4an

cola4an

    InsanelyMac Protégé

  • Members
  • Pip
  • 3 posts
  • Gender:Male
  • Location:Bavaria

66vnbyt9.jpg

 

Hi, this is what i get when i boot with -verbose, looks like he can`t find the directory /etc/tc.installer_cleanup

Any Ideas ?

 



#10
kosakgroove

kosakgroove

    Unix Shepherd

  • Members
  • PipPipPipPipPipPipPip
  • 709 posts
  • Gender:Male
  • Location:ALGARVE
  • Interests:The unexpected is the real
Hi mate, this looks to me as if your FakeSMC is not loading properly or your AHCI is not loading..
I am very busy at the moment so i can’t really help but check other versions of FakeSMc and also try to use FixSATA in Clover menu
Regards

#11
palloiilja

palloiilja

    InsanelyMac Protégé

  • Members
  • Pip
  • 1 posts

 

 

Hi, this is what i get when i boot with -verbose, looks like he can`t find the directory /etc/tc.installer_cleanup

Any Ideas ?

 

Hi, did you manage to get this working? I'm getting stuck at same point with same messages



#12
cola4an

cola4an

    InsanelyMac Protégé

  • Members
  • Pip
  • 3 posts
  • Gender:Male
  • Location:Bavaria

Hello,

I had unfortunately no success. I have tried various FakeSMC and made in Clover Fix_SATA. Both did not bring anything.

The last week I had but no time to continue to test.

Would still be interested in a solution.

 

greetz



#13
kosakgroove

kosakgroove

    Unix Shepherd

  • Members
  • PipPipPipPipPipPipPip
  • 709 posts
  • Gender:Male
  • Location:ALGARVE
  • Interests:The unexpected is the real

Hello,

I had unfortunately no success. I have tried various FakeSMC and made in Clover Fix_SATA. Both did not bring anything.

The last week I had but no time to continue to test.

Would still be interested in a solution.

 

greetz

Hey buddy, please give us some info on the machine, from a Linux Live USB,

things like lshw , lspci -v would be useful! Also, my ACPI tables may not be working for you, since there are always variations in the machine, so trial and error with the ACPI patching and read the guide well!







Also tagged with one or more of these keywords: mac, os, sierra, lenovo, thinkpad, l420, install

  Topic Stats Last Post Info

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2017 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy