Jump to content

Install OSX on Lenovo Thinkpad X201s (and maybe x201)


Leon

Recommended Posts

Install Yosemite with Clover
Yosemite.tiff

 

Credits

Goes to GhostRaider, RehabMan, EMlyDinEsH, m.gbt and JayMonkey.

 

Documentation

Clover Configuration

 

Prerequisites

  • Flashed Bios. Removed Whitelist to get WIFI working. (e.g. Atheros 9280 works OOB)
  • Retrieve EDID Sample EDID.txt
    • Mavericks running on your x201:
    • cd ~/Desktop/
      ioreg -l | grep IODisplayEDID | cat > EDID.txt
    • Linux running on your x201:
    • xrandr --verbose | grep -A8 EDID | grep -v EDID > EDID.txt
    • Remove every line break, spaces, <, >, |, .... ending up with a single line of hexadecimal code.
    • Save the result

Repair permissions and rebuild cache

Kext Utility, Kext Wizard or

# with terminal.app
sudo chown -R root:wheel /System/Library/Extensions
sudo chmod -R 755 /System/Library/Extensions
sudo kextcache -system-prelinked-kernel

Create USB Installer

Note: Execute commands in the code brackets with terminal.app

  • Download Yosemite installer from AppStore
  • Go to application folder. Right click „OS X Yosemite Installation“
  • Select "Show Package Contents". Go to „Contents/Shared/“. Open „InstallESD.dmg“
  • open "/Volumes/OS X Install ESD/BaseSystem.dmg"
    
  • Open disk Utility: Format USB drive. Select „Mac OS Extended (Journaled)“ and „GUID partition scheme“
  • Restore "BaseSystem.dmg" to your USB volume
  • Change the name of the USB volume to "USB“
  • cp "/Volumes/OS X Install ESD/BaseSystem.dmg" /Volumes/USB/
    cp -a "/Volumes/OS X Install ESD/BaseSystem.chunklist" /Volumes/USB/
    rm /Volumes/USB/System/Installation/Packages
    cp -a /Volumes/OS\ X\ Install\ ESD/Packages /Volumes/USB/System/Installation/Packages
    

Prerequisites USB Installer

  • mkdir /Volumes/USB/System/Library/Kernels
  • Using „Pacifist“ extract kernel from “OS X Installed ESD/Packages/Essentials.pkg/System/Library/Kernels/Kernel†and copy it to Volumes/USB/System/Library/Kernels/
  • mkdir /Volumes/USB/Hackintosh
    cp -r /Volumes/USB/System/Library/Extensions/AppleIntelHDGraphicsFB.kext /Volumes/USB/Hackintosh/

Install Clover to USB Installer

  • Download and open Clover EFI bootloader
  • Select destination "USB"
  • Settings:
    • Install Clover in the ESP
    • Bootloader: Install boot0af in MBR
    • Clover EFI: Clover EFI 64-bits SATA
    • Drivers64UEFI: DataHubDxe-64, EmuVariableUEFI-64, OsxAptioFixDrv-64, PartitionDxe-64
    • Install RC scripts on target volume
    • Optional RC scripts

Edit config.plist with Clover Configurator

  • Download Clover Configurator and open it
  • Select „Mount EFI","Check Partition“. Notice disk number from your USB drive
  • Select "Mount EFI partition" and choose your USB drive (e.g. disk1s1)
  • Select "Open Partition". EFI partition should now be mounted on your desktop
    • Add DSDT to EFI/CLOVER/ACPI/patched/
    • Add VoodooPS2Controller, FakeSMC, AppleIntelE1000e to /EFI/CLOVER/kext/10.10/
  • Select File/Open/EFI/CLOVER/config.plist sample.config.plist.zip
    • ACPI: Generates PStates, Generate CStates, Halt Enabler (do all three edits in old and new way)
    • Boot: Verbose, Timeout -1, kext-dev-mode=1, PBR
    • CPU: -
    • Devices: USB: Inject, Add ClockID, FixOwnership
    • Disable Drivers: -
    • GUI: -
    • Graphics: Patch VBios
    • Kernel Kext and Patches: Apple RTC, Asus AICPUPM

    • SMBios: MacBookPro6,2
    • System Parameters: Inject Kexts=Detect, Inject System ID
  • Save configuration and close it

Disable QE/CI Acceleration
Note: This step is necessary to reach the Yosemite installer. Screen will be laggy due to missing graphics acceleration. This will be fixed later in section Patch QE/CI Acceleration.

Delete

  • AppleIntelHDGraphicsFB.kext and
  • AppleIntelHDGraphics.kext

from /Volumes/USB/System/Library/Extensions.

 

Install Yosemite

  • Boot with the USB installer and install Yosemite
  • Reboot
  • At Clover boot screen select "Boot OS X from 'your HD'
  • Complete Yosemite Post Installation

Note I: If reboot fails, press space at Clover boot screen and select "boot without caches".
Note II: I needed a workaround at this step to reach the post installation. So if above steps do not work for you too, then boot into Single User Mode:

mount -uw /
cd /System/Library/Extensions
rm -rf AppleIntelHDGraphics.kext
rm -rf AppleIntelHDGraphicsFB.kext
sudo rm -rf /System/Library/Caches/*
shutdown -r now
  • At Clover boot screen select "Boot OS X from 'your HD'
  • Complete Yosemite Post Installation

Post Installation

Once you reach the desktop

  • delete AppleIntelHDGraphics* from /System/Library/Extension
  • Repair permissions and rebuild caches
  • Reboot with USB installer. At Clover boot screen select "Boot OS X from 'your HD'

Note: If reboot fails, press space at Clover boot screen and select "boot without caches".
 

Install Clover to your HDD
After reboot repeat steps

  • Install Clover to USB Installer, and
  • Edit config.plist with Clover Configurator

with same settings as before, except choose destination „your HDD“. Reboot without USB installer.

 

Patch QE/CI Acceleration with Clover on-the-fly

Add

  • AppleIntelHDGraphicsFB.kext from /Volumes/USB/Hackintosh and
  • AppleIntelHDGraphics.kext, AppleIntelHDGraphicsGA.plugin, AppleIntelHDGraphicsGLDDriver.bundle, AppleIntelHDGraphicsVADriver.bundle from here according to your 10.10.x version

to /System/Library/Extension

 

Open Clover Configurator and select File/Open/EFI/CLOVER/config.plist

  • Graphics: Patch VBios, Inject EDID
    • ​Custom EDID [Hex]: Copy your EDID inside this field

Note: The following patch can be used if your internal display has a native resolution of 1280x800.

Go to "Kernel and Kext Patches" and add Patched_FB.tiff

General Patch
0F45C842898C33F00100
90909042898C33F00100

SingleLink Patch 1
C7070100000041C74720
C7070000000041C74720

SingleLink Patch 2
FFB800600009BE006000040F44F009D6
FFB800600008BE006000040F44F009D6

SingleLink Patch 3
3C033080
00033080

LVDS+VGA Patch 1
3049011101100800
3049011105100800 

LVDS+VGA Patch 2
3049010101000800
3049010105000800

SingleLink LW1
498B8424980600000FB64018C1E013410B466C4189466C498B8C249800000089810C000F00498B8424980600000FB64018C1E013410B4668
418B466C25FFFFC7FF0D0000000090909090904189466C498B8C249800000089810C000F00418B466825FFFFC7FF0D000000009090909090 

Note I: The following patch can be used if your internal display has a native resolution of 1440x900.

Note II: I could not test the patch for 1440x900 as i am using 1280x800. So if LW1 is not working you have to choose another LinkWidth.

Go to "Kernel and Kext Patches" and add

General Patch
0F45C842898C33F00100
90909042898C33F00100

LVDS+VGA Patch 1
3049011101100800
3049011105100800 

LVDS+VGA Patch 2
3049010101000800
3049010105000800

DualLink LW1
498B8424980600000FB64018C1E013410B466C4189466C498B8C249800000089810C000F00498B8424980600000FB64018C1E013410B466841
418B466C25FFFFC7FF0D0000000090909090904189466C498B8C249800000089810C000F00418B466825FFFFC7FF0D00000000909090909041
  • Reboot.

QE/CI should now work.

Note: Further graphics related information can be found here.
 

Check network card for "en0"
Go to System Profiler/Ethernet cards/BSD-Name. If the ethernet card is not indicated as „en0“

  • delete „NetworkInterfaces.plist“

under /Library/Preferences/SystemConfiguration/. Reboot.
 

Enable Bluetooth switch in menu bar

Broadcom Model BCM2045B, VendorID = 0A5C, ProductID = 217F

Edit: IOBluetoothFamiliy.kext/Contents/Plugins/BroadcomBluetoothHostControllerUSBTransport.kext/Contents/Info.plist

Find and replace

<key>idProduct</key>
	<integer>33292</integer>
<key>idVendor</key>
	<integer>1452</integer> 

With

<key>idProduct</key>
	<integer>8575</integer>
<key>idVendor</key>
	<integer>2652</integer>

Sleep/Wake, Brightness, Battery Status

  • Add ACPIBatteryManager.kext and ACPIBacklight.kext to /S/L/E

Power Management
Speedstep SpeedStep.tiff
Temperature, idle Temperature_Idle.tiff
 

WWAN
-
 

Sound with Clover on-the-fly
Headphone, internal speaker, internal and external mic is working. Audio.tiff

Note: To get audio working with Clover on-the-fly you have to install the patched AppleHDA first.
Add LayoutID "12" to config.plist with Clover Configurator.

  • Device/Audio/Inject/12

Repair Permissions and rebuild caches. Reboot.

When audio is working

  • delete patched AppleHDA from S/L/E

Add

  • original AppleHDA, and
  • DummyHDA to S/L/E

Edit config.plist directly, not with Clover Configurator.
Note: Clover Configurator will convert the values to HEX, so we have to add the patch manually and place it inside the "KextToPatch Array". Don`t copy and paste the comments <!— ... -->.

	<key>KernelAndKextPatches</key>
	<dict>
		<key>AppleRTC</key>
		<true/>
		<key>AsusAICPUPM</key>
		<true/>
		<key>KextsToPatch</key>
		<array>
                        <!— Patch starts here -->
			<dict>
				<key>Comment</key>
				<string>Binary Patch</string>
				<key>Find</key>
				<data>
				hBnUEQ==
				</data>
				<key>Name</key>
				<string>AppleHDA</string>
				<key>Replace</key>
				<data>
				aVDxFA==
				</data>
			</dict>
                        <!— Patch ends here -->
		</array>
	</dict>

Repair Permissions and rebuild caches. Reboot.

As there are some sound assertion, they will not prevent the kext to work, but will spam your console output, we get Clover to patch against those.

 

Edit config.plist directly, not with Clover Configurator.
Note: Clover Configurator will convert the values to HEX, so we have to add the patch manually and place it inside the "KextToPatch Array". Don`t copy and paste the comments <!— ... -->.

	<key>KernelAndKextPatches</key>
	<dict>
		<key>AppleRTC</key>
		<true/>
		<key>AsusAICPUPM</key>
		<true/>
		<key>KextsToPatch</key>
		<array>
                        <!— Patch starts here -->
			<dict>
				<key>Comment</key>
				<string>No Sound Assertions</string>
				<key>Find</key>
				<data>
				U291bmQgYXNzZXJ0aW9uIA==
				</data>
				<key>Name</key>
				<string>AppleHDA</string>
				<key>Replace</key>
				<data>
				AAAAAAAAAAAAAAAAAAAAAA==
				</data>
			</dict>
                        <!— Patch ends here -->
		</array>
	</dict>

Note: Since i have no docking station, i removed headphone and mic for the docking station, in the patch. So keep in mind if you decide to work with one, using this patched kext. Patched_AppleHDA.rtf

1. CODEC : Conexant CX20585 
2. ADDRESS : 0
3. VENDOR ID : Hex: 0x14f15069 [Decimal: 351359081]
4. Pin Complex Nodes with Control Name

Node 19 : Pin Default 0x042140f0 , HP Out at Ext Right
Node 1b : Pin Default 0x04a190f0 , [Jack] Mic at Ext Right
Node 1f : Pin Default 0x901701f0 , [Fixed] Speaker at Int N/A
Node 23 : Pin Default 0x90a601f0 , [Fixed] Mic at Int N/A

Corrected Verb Data:
at Node 19: 10 10 21 04
at Node 1b: 20 10 81 04
at Node 1f: 30 01 17 90
at Node 23: 40 01 a0 90

ConfigData
01971c10 01971d10 01971e21 01971f04
01a71cf0 01a71d00 01a71e00 01a71f40
01b71c20 01b71d10 01b71e81 01b71f04
01c71cf0 01c71d00 01c71e00 01c71f40
01d71cf0 01d71d00 01d71e00 01d71f40
01e71cf0 01e71d00 01e71e00 01e71f40
01f71c30 01f71d01 01f71e17 01f71f90
02071cf0 02071d00 02071e00 02071f40
02271cf0 02271d00 02271e00 02271f40
02371c40 02371d01 02371ea0 02371f90

PathMaps:Pin Complex->Audio Output (Hex values)
Speaker :	31->16 (0x1f->0x10)
Headphone :	25->17 (0x19->0x11)

Pin Complex -> Audio Selector -> Audio Input
Internal Mic :	35->20 (0x23->0x14)
External Mic :	27->23->22 (0x1b->0x17*->0x16)

Enable SSD Trim
Edit config.plist directly, not with Clover Configurator.
Note: Clover Configurator will convert the values to HEX, so we have to add the patch manually and place it inside the "KextToPatch Array". Don`t copy and paste the comments <!— ... -->.

	<key>KernelAndKextPatches</key>
	<dict>
		<key>AppleRTC</key>
		<true/>
		<key>AsusAICPUPM</key>
		<true/>
		<key>KextsToPatch</key>
		<array>
                        <!— Patch starts here -->
			<dict>
				<key>Comment</key>
				<string>Trim SSD</string>
				<key>Find</key>
				<data>
				QVBQTEUgU1NEAA==
				</data>
				<key>Name</key>
				<string>IOAHCIBlockStorage</string>
				<key>Replace</key>
				<data>
				AAAAAAAAAAAAAA==
				</data>
			</dict>
                        <!— Patch ends here -->
		</array>
	</dict> 

Open Clover Configurator and confirm that it will show odd, but correct values:

Find: 4150504C452053534400
Replace: 00000000000000000000

Default Startup Disk
Edit config.plist in Boot section with Clover Configurator:

  • Disable verbose mode (finally, when you are happy with your setup)
  • Disable "-1"
  • Set Timeout, e.g. "3" ("0", GUI is not invoked)
  • sudo nvram -c
  • Set Startup Disk in System Preferences and reboot.

iMessage

Read here.

 

Updates

10.10.3, Status: Success, App Store, Mods: Bluetooth Patch

 

Working Status

12.03: Patched AppleHDA.kext following EMlyDinEsH´s guide. Updated section Sound.
13.03: Vanilla AppleHDA patched with Clover on-the-fly. Add DummyHDA.kext in kexts.zip and updated section Sound.

28.03: Added brightness control via Fn keys to DSDT.

30.03: Keyboard re-map, swapped keys ^ with <. And cmd, option/alt, control. No need to change them in System Preferences.

21.04: Added new DSDT. USB working after awake from sleep. Sleep status indicator light is working accordingly the sleep/wake phases. (Thx Rosnoun)

Kexts.zip

DSDT.zip

  • Like 3
Link to comment
Share on other sites

Yes tutorial from calabash work for me ........... :-P  :-P  :-P  :-P  :-P  :-P

my laptop specs is thinkpad x201 intel i5 520m and resolution is 1280x800 .It is important to dont install and Patched AppleIntelHDGraphicsFB ....NOT WORK FOR 1280x800 download this AppleIntelHDGraphicsFB and replace with original not delete any other original AppleIntelHDGraphics kext after this Repair and Rebuild and you have full graphics QE/CI. This tuto is only for resolution is 1280x800.....!!!!!

 

Many Many thanks to calabash for the help offered me and the many hours spent for me.

AppleIntelHDGraphicsFB.kext.zip

post-60033-0-06894800-1426772753_thumb.png

Link to comment
Share on other sites

With your method you have an unsigned kext installed.

kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleIntelHDGraphicsFB.kext 

You have to know which LW (Link Width) you are using, otherwise no chance for clover to patch this. For more information read #1 and #1141.

 

There are no patched kext in the QECI folder; it includes the original FB. You can download unsigned, patched kext here.

Link to comment
Share on other sites

I think I'm going to try this during the Easter on my x201 :).
And what about temperature on Yosemite? Is it high or normal like 35-50 degrees?

And also is it worth to install Yosemite or stick to the Mavericks in your opinnion, guys.

Link to comment
Share on other sites

Nice work!

 

The method to have QE/CI working is surprising. I had succeeded to have it work with the patched Frame Buffer, but I had to modify the _DSM method of the VID device in DSDT and the SMbios in config.plist had to be set using MacBookPro6,2 (6,1 shall work also)

 

Calabash, I have the Qualcomm Gobi 2000 but I had to remove it to plug the Wifi Dell half mini PCI-e. Anyway, I haven't found any way to make it work under OS-X. Have you ordered a different type of WWAN card? For my bluetooth I will check tonight but I'm starting to think that I don't have the Bluetooth module installed in the laptop... Anyway, I'd like to have a Bluetooth 4.0 capability, do you know which bluetooth module may work?

 

For the USB after sleep, I managed to have it worked by using the AppleACPIPlatform rolled back from mountain lion, but using it make the serial number disappear in the "about" pane. Since I had enabled iMessage and I don't want to touch anything that may change hardware signature, I have removed it... If someone could give it a try, it should be fine...

 

Calabash, could you post your config.plist please?

Link to comment
Share on other sites

i suggest to start from scratch.

Which LW do you use with your working FB?

Today i have read an interesting post. "Force kext to load" http://clover-wiki.zetam.org/Configuration/KernelAndKextPatches#ForceKextsToLoad

The last two post could be helpful. http://www.insanelymac.com/forum/topic/286092-guide-1st-generation-intel-hd-graphics-qeci/page-60?do=findComment&comment=2123353

Create an clover usb installer and try with this methode with differents LW without the clover patch. When you have find the right one then add patch to clover.

 

I use the Single Link Normal LW1 LVDS+VGA

The thing you are referring to is not related to my problem I think but it allows me to understand why I had troubles to set up a working USB installer

 

I've done some experimentation and I now have the original unmodified FB with on the fly clover patch (I think). To be able to do so, I've added _DSM method to IGPU device in your DSDT (and DTPG method that you can add by patching from Rehabman repo). With your DSDT, I can't boot. With adding _DSM, it works... I had noticed the same behavior with the other method of modified FB... I have to have a EDID injected properly to make graphics work...

During my experimentation to try to have wake working the method has grown up with propoerties that may not be necessary. Anyway this works as is. Here is my _DSM:

               Method (_DSM, 4, NotSerialized)
                {
                    Store (Package (0x16)
                        {
                            "device_type", 
                            Buffer (0x08)
                            {
                                "display"
                            }, 

                            "model", 
                            Buffer (0x12)
                            {
                                "Intel HD Graphics"
                            }, 

                            "AAPL,HasPanel", 
                            Buffer (0x04)
                            {
                                0x01, 0x00, 0x00, 0x00
                            }, 

                            "AAPL,os-info", 
                            Buffer (0x14)
                            {
                                /* 0000 */    0x30, 0x49, 0x01, 0x11, 0x01, 0x10, 0x08, 0x00, 
                                /* 0008 */    0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                /* 0010 */    0xFF, 0xFF, 0xFF, 0xFF
                            }, 

                            "VRAM,totalsize", 
                            Buffer (0x04)
                            {
                                0x00, 0x00, 0x00, 0x12
                            }, 

                            "AAPL,backlight-control", 
                            Buffer (0x04)
                            {
                                0x01, 0x00, 0x00, 0x00
                            }, 

                            "AAPL,BacklightRestore", 
                            Buffer (0x04)
                            {
                                0x01, 0x00, 0x00, 0x00
                            }, 

                            "AAPL,Haslid", 
                            Buffer (0x04)
                            {
                                0x01, 0x00, 0x00, 0x00
                            }, 

                            "@0,backlight-control", 
                            Buffer (0x04)
                            {
                                0x01, 0x00, 0x00, 0x00
                            }, 

                            "@0,AAPL,boot-display", 
                            Buffer (0x04)
                            {
                                0x01, 0x00, 0x00, 0x00
                            }, 

                            "@0,built-in", 
                            Buffer (One)
                            {
                                0x01
                            }
                        }, Local0)
                    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                    Return (Local0)
                }
Link to comment
Share on other sites

Yes tutorial from calabash work for me ........... :-P  :-P  :-P  :-P  :-P  :-P

my laptop specs is thinkpad x201 intel i5 520m and resolution is 1280x800 .It is important to dont install and Patched AppleIntelHDGraphicsFB ....NOT WORK FOR 1280x800 download this AppleIntelHDGraphicsFB and replace with original not delete any other original AppleIntelHDGraphics kext after this Repair and Rebuild and you have full graphics QE/CI. This tuto is only for resolution is 1280x800.....!!!!!

 

Many Many thanks to calabash for the help offered me and the many hours spent for me.

Hi Cooper1..

 

I have the same machine as you... meaning i5 520m with 1280x800 resolution.

Can you please share your config.plist in the EFI?

 

Thanks

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...