Contribute
Register

[Guide] Lenovo ThinkPad X240 [OpenCore 0.5.9]

Status
Not open for further replies.

Sniki

Moderator
Joined
Jan 5, 2016
Messages
2,313
Motherboard
HP Elite 8300 SFF
CPU
i7-3770
Graphics
Intel HD 3000 | GTX 1650 LP
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS

X240.png


Lenovo ThinkPad X240 using OpenCore (0.5.9)
Considering i haven't finished the OpenCore Bootloader guide yet, due to the big number of request for a OpenCore guide, here is the Open Core guide which is much more stable and faster than Clover, i have been using the OpenCore Bootloader since v0.0.2 and it has been my GO 2 bootloader on all my hackintosh hardware since that time.


Special Note
Please beginners, refrain from touching things into config.plist if you don't have enough hackintosh skills as we don't have a public guide in our forum yet for OpenCore. Everything provided in the EFI is already baked for you.

RESET NVRAM: please do not use this option, there is an issue from Lenovo's side on the 2-3 recent versions of Bios which after NVRAM reset, the Laptop get's bricked and you will have to flash original bios back with a SPI Programmer.


Preparation
The OpenCore EFI that i have provided is completely baked for you, which means all the possibly necessary kexts that may be required, all the Drivers and all the ACPI Patches the config.plist etc are there and configured for use OOB.

So everyone that plans to use this guide, is required to complete these small tweaks to have everything working:


1. SMBIOS values

Note: MacbookPro11,1 is the only SMBIOS that you should use, for that reason it is already set into the config.plist

In order to have iMessages and other iCloud Services make sure to port the values from your Clover config.plist
Open Config.plist of OpenCore EFI with PlistEditPro

Go to config.plist / PlatformInfo / Generic and copy/paste the values from Clover to the OpenCore config.plist file.
Or in case you don't have any IDs from previous setup, you can generate new ones.
SMBIOS.png

2. Wireless and Bluetooth

If you have a card like DW1560 / DW1830 / DW1820A the kexts:
  • AirPortBrcmfixup.kext
  • BrcmPatchRam3.kext
  • BrcmFirmwareData.kext
  • BrcmBluetoothInjector.kext
  • BT4LEContinuityFixup.kext
Are enabled by default so you don't have to touch anything, except:
DW1820A - Users should go and enable the SSDT-DW1820A that contains the fake-id and aspm disabled into:
EFI > OC > Config.plist > ACPI > Add > 11 > Enabled = YES

If you have a card like BCM94360CS2 / BCM94360NG:
these cards are supported natively so you need to disable the kexts that i listed above.
You can do that by going into config.plist > Kernel > Add > and find each one and change Enabled=No



Installation
For installation there are 3 options that you can try but first make sure you are using latest Clover guide where you have no kext installed into /Library/Extensions or you will have big problems, on my latest Clover guide i have noted that kexts shouldn't be installed into system anymore but EFI/Clover/kexts/Other, so the same principles apply here, all latest kexts are already included into this OpenCore EFI but /Library/Extensions should have no hackintosh kexts there.

Option 1: OpenCore EFI USB
This is the safest way to test it, all you have to do is get a USB drive, format it as HFS+J GPT, mount the USB EFI and copy the EFI of the OpenCore that i attached and simply reboot and boot from USB, you will maintain your installation but instead of your current Clover EFI you boot from the OpenCore EFI from USB.

Option 2: Replace Clover EFI with OpenCore EFI (prefered after Option 1 tested successfully and no problems spotted).
Mount the EFI partition of your HDD/SSD, compress the old EFI (Clover), delete the EFI folder and add the OpenCore EFI, reboot

Option 3: OpenCore USB Installer Same as Option 1 but if you prefer to clean install simply create the USB Installer like you usually do but after USB Installation media has been completed from terminal, mount EFI and place the OpenCore EFI and reboot, boot from USB and start installation.


Keyboard

Keyboard has been fully reworked, now the F4 (Mic Mute toggle) does work as mic mute with LED as well.
(F7) Projector key has been fixed, F8 now Disables/Enables WIFI and Shift+F8 does Disable/Enable Bluetooth.
(F9) opens System Preferences, (F10) Opens Spotlight Search, (F11) Mission Control, (F12) Launchpad
(Fn+Spacebar) now shows the Backlight HUD, there is also a CapsLock GUI indicator and a Fn+FnLock indicator.
All these keys require the ThinkPad Assistant in order to work, link to download:


Audio
Unfortunately these laptops are plagued by the very problematic ALC3232 Audio Codec that Lenovo decided to go with from the thousands of better options that they had, however overtime we almost completely fix it on macOS.
Docking Station is now supported but two Inputs as LineIn are not supported so i had to ditch Docking Station Microphone support from the Dock Combo Jack so users who want to use Microphone from their headset should plug the Headsets into the Laptop Combo Jack.
Auto switch now works perfect with my CodecCommander.kext and latest ALCPlugFix.

In order to have perfect audio, we need to install ALCPlugFix, Download latest ALCPlugFix from my repository:

place the extracted ALCPlugFix folder into desktop

Open Terminal and enter the following commands 1by1:
Code:
sudo spctl --master-disable
sudo mkdir /usr/local/bin/
cd desktop/ALCPlugFix
./install.sh
When the prompt appears to open/allow hda-verb and ALCPlugFix as third party Applications, press Open/Allow to enable them so they can load. Audio now should work perfect for you.


Problem Reporting and Troubleshooting
Please provide proper Problem Reporting (archive) which includes the EFI and a copy of IOREG.
IOREG should be saved with the correct working version of IOregistryExplorer that can be found here:
Also like i said above i recommend only more advanced users and even them to do proper problem reporting with well documented problem reporting with clear description or solution.

Before posting, please read the official Acidanthera Open Core Configuration.pdf file which includes all the informations on how to create a config.plist and all the quirks and patches with all their descriptions provided (attached at the end of this post)
 

Attachments

  • Configuration.pdf
    571.8 KB · Views: 921
  • Differences.pdf
    532 KB · Views: 626
  • OC-0.5.9-EFI.zip
    5.9 MB · Views: 1,917
Last edited:
Changelog (13.07.2020)
  • Added missing BrcmFirmwareData.kext to fix Bluetooth problems on DW1560 and DW1820A (tested both cards using my AirPods and they work perfect now)
  • Added new SSDT-DW1820A build from scratch which is more optimized and includes user customizable options like brcmfx-country , brcmfx-driver, pcie-aspm-default and only works under macOS without affecting other OS
  • Changed BlacklistAppleUpdate to No and replaced with run-efi-updater = No NVRAM variable (this should fix the random system variable corrupted message)
  • Added Keyboard Fn+FnLock and Caps lock into SSDT-KBD for ThinkPadAssistant to have GUI feedback for these Buttons.
  • Reverted layout-id from 15 to 28 to use the new patched AppleALC.kext with Docking Station Support and auto switch
  • Added CodecCommander.kext and ALCPlugFix to fix audio problems with static/high pitch noise
  • Fixed Low volume on Speakers compared to Windows, would like some feedback on this.
  • Added Framebuffer patches for MiniDisplayPort and VGA to fix Video Output on these ports
  • Added -rtsx_mimic-linux boot-arg to fix SD Card Detection and initialization after wake from sleep
  • Disabled ResetNVRAM boot option as there is an issue on 2-3 latest lenovo bios versions that after resetting NVRAM the laptop will get bricked and will need to flash stock bios with SPI Programmer to fix it.
 
Last edited:
Known Issues
  • Docking Station Audio Jack has no input support, only output because we can't use two inputs as LineIn.
  • SD Card Reader after wake from sleep can't eject normally, you have to Force Eject.
  • Kernel Panic into an Instant Reboot when attempting sleep, restart or Shutdown while External Display connected on one of the Docking Station Video Ports (DisplayPort, DVI, VGA)
  • No DisplayPort Audio when using the Docking Station DisplayPort
 
Last edited:
Hi! I have the x240 laptop and tried your EFI but it was stuck in the beginning.

Can say that my configuration doesn't have replaced wi-fi card, its still intel card installed. But hack previously made by your clover-guide accepted me getting to the installer, and macOS got worked. With yet installed intel card.

What can I do to fix this problem?
IMG_0280.jpeg
 
Thanks for your expected OpenCore for x240!

Everything work on my Laptop!!!! The only problem is with Bluetooth on a DW1560 card, but WIFI works.
 
Hi! I have the x240 laptop and tried your EFI but it was stuck in the beginning.

Can say that my configuration doesn't have replaced wi-fi card, its still intel card installed. But hack previously made by your clover-guide accepted me getting to the installer, and macOS got worked. With yet installed intel card.

What can I do to fix this problem?
View attachment 474756
Disable kexts like:
- AirportBrcmFixup.kext
- BT4LEContinuityFixup.kext
- BrcmPatchRam3.kext
- BrcmBluetoothInjector.kext

You can do that by going into config.plist > Kernel > Add >
The 4 last entries are from these kexts, expand them and disable them since you have the Intel WIFI

Also as usual, attach problem reporting files so we can see what is happening.
Thanks for your expected OpenCore for x240!

Everything work on my Laptop!!!! The only problem is with Bluetooth on a DW1560 card, but WIFI works.
Attach Problem Reporting files
 
Disable kexts like:
- AirportBrcmFixup.kext
- BT4LEContinuityFixup.kext
- BrcmPatchRam3.kext
- BrcmBluetoothInjector.kext

You can do that by going into config.plist > Kernel > Add >
The 4 last entries are from these kexts, expand them and disable them since you have the Intel WIFI

Also as usual, attach problem reporting files so we can see what is happening.

Attach Problem Reporting files

Already done, sorry. It was made earlier than I wrote the message. I am not new to opencore in writing and understanding the config, but not enough for self-solving problems.

Kexts deleted and the entries from "Kernel > Add" were deleted too.

The same picture here.

Files in attachments.
 

Attachments

  • EFI.zip
    3.4 MB · Views: 306
  • opencore-2020-06-08-210443.txt
    256 KB · Views: 268

Attachments

  • EFI.zip
    3.4 MB · Views: 291
  • IOReg.zip
    685.8 KB · Views: 199
Already done, sorry. It was made earlier than I wrote the message. I am not new to opencore in writing and understanding the config, but not enough for self-solving problems.

Kexts deleted and the entries from "Kernel > Add" were deleted too.

The same picture here.

Files in attachments.
I will check more in-depth but since others are having success i assume either Bios/Firmware related or misconfiguration somewhere. Will check first, those were just some logical assumptions.
 
Status
Not open for further replies.
Back
Top