Jump to content

[Guide] Asus K50IN-SX152 - Installing Mac OS X 10.6.8


4 posts in this topic

Recommended Posts

0.png

 

I DON'T PROVIDE ANY SUPPORT IN CASE OF DISTROS, IN MY OPINION THEY ARE PIECE OF {censored} AND A COMPLETE WASTE OF TIME

I decided to create this tutorial mostly because of the fact that there isn't really any good one + the only detailed I know is the one from applelife.ru which is obsolete and actually not very good in my humble opinion. I hope that my work will be appreciated and will come to use to some of you. I have to mention that even though this tutorial is based on my work with Asus K50IN, it may be helpful also for people who own Asus K70IO or others with MCP79 chipset.

 

Firsly, specification:

 

1. Model: Asus K50IN-SX152

2. Processor: Intel® Core2 Duo CPU T6600 (SSE 2, SSE 3)

3. Southbridge: MCP79

4. Graphics card: NVIDIA GeForce G102M

5. Audio: ALC662

6. LAN: RTL8111/8168B

7. WLAN: Atheros AR9285

8. HDD and Optical disc recorder - SATA

9. Keyboard and touchpad - PS/2

10. Webcam: Chicony CNF7129

11. Card reader: Alcor AU6433

 

Let's sum up the final effect...

 

Works:

- SpeedStep (P-States and C-States)

- Graphics card (QE/CI)

- Audio (internal microphone, external microphone set as line in, speakers, headphones)

- LAN

- WLAN

- Touchpad (tap-to-click, vertical two-finger scrolling etc. - if you are going to dual boot with Windows using Chameleon - avoid restarting Microsoft's OS to boot Mac OS X - touchpad goes crazy then - the only way to fix this issue is to use Acronis OS Selector for example)

- Battery status

- Shutdown/Restart

- Sleep

- Webcam

- Card reader (recognised as internal Apple card reader)

 

Doesn't work:

- Restart after waking up from sleep

- Deep sleep (the system is properly restored to the state from before hibernation but system alert is being played all the time...)

 

1. Installation

 

Before starting with all the steps I describe in this tutorial, I recommend updating your BIOS to the newest version. At the moment is it: 223. Download my archive with all needed files (you can find it near the end of this tutorial - and put in on a USB stick, for example - to have easy access to the files) also.

 

I am not going to write about how to install the system itself, simply download a boot CD of your choice and install Mac OS X (remember to put GraphicsEnabler=No flag during install and first boot from hdd and do first part of post-configuration tasks on Mac OS X 10.6 or 10.6.3, not higher!)

 

When Mac OS X is installed (version 10.6 or 10.6.3) and booted from the first time from your HDD, we can move to post-configuration.

 

2. Post-configuration

 

Download Combo Update 10.6.8 and install it (do not restart yet!). Now we can take care of bootloader - it will allow your system to boot from HDD, without using the boot CD, you can find it in the attached archive - its file name is Chameleon-2.0-RC5-r828.pkg. If the installer doesn't run properly at first - try again until it does.

 

Install it on your system partition (do not log out yet!). The next step is to create your Extra along with KextStore. Run terminal (Applications->Tools->Terminal) and type the following comands, pressing Enter after each line:

 

sudo -s (type your password, don't be afraid that you can't see it, it's normal)
mkdir /Extra 
mkdir /Extra/KextStore

 

So... we have the folders, let's fill them with data :P

 

Go to your system partition, open recently created Extra and place there smbios.plist and com.apple.boot.plist from my archive. If you are curious what you can find inside :) : + if you are going to install the system on laptop with other CPU - make sure to edit smbios.plist!

 

smbios.plist:

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SMbiosversion</key>
<string>MBP51.88Z.007E.B05.0905051508</string>
<key>SMboardproduct</key>
<string>Mac-F42D86C8</string>
<key>SMfamily</key>
<string>MacBook Pro</string>
<key>SMmanufacter</key>
<string>Apple Inc.</string>
<key>SMproductname</key>
<string>MacBookPro5,1</string>
<key>SMcputype</key>
<string>769</string>
<key>SMexternalclock</key>
<string>200</string>
<key>SMmaximalclock</key>
<string>2200</string>
<key>SMmemspeed</key>
<string>800</string>
<key>SMmemtype</key>
<string>19</string>
<key>SMserial</key>
<string>W884094J1GA</string>
<key>SMsystemversion</key>
<string>1.0</string>
</dict>
</plist>

 

com.apple.boot.plist:

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Kernel</key>
<string>mach_kernel</string>
<key>Kernel Flags</key>
<string>npci=0x2000</string>
<key>GraphicsEnabler</key>
<string>Yes</string>
<key>GraphicsMode</key>
<string>1366x768x32@60</string>
<key>Legacy Logo</key>
<string>Yes</string>
<key>DSDT</key>
<string>/Extra/DSDT.aml</string>
<key>SMBIOS</key>
<string>/Extra/smbios.plist</string>
<key>SystemType</key>
<string>2</string>
<key>Theme</key>
<string>LoginToLion</string>
<key>Boot Banner</key>
<string>No</string>
</dict>
</plist>

 

The next step is to install Kext Wizard (I wouldn't surprise you if I say that you can find it inside my archive with needed files? ;) Oh well... from now on - simply pretend that I say it every time when telling you to use something without explaining where to download it). Using this little app, install the following kexts to Extra:

 

AppleACPIBatteryManager, AppleACPIPS2Nub, ApplePS2Controller, EvOreboot, FakeSMC, NullCPUPowerManagement

 

This set, along with Chameleon, will allow you to boot the system without boot CD.

Reboot Mac OS X (this time you have to press power button after seeing MACH reboot - EvOreboot isn't working yet) - this time without boot CD inside your optical drive. I recommend using -v -f flags, you simply type them when you get into Chameleon boot menu and press "Enter".

 

When the system is up and running - you can move to the next step.

 

3. Preparing DSDT for modification

 

Extract your DSDT using Ubuntu Live CD 9.04 (you can find many tutorials on the Internet, simply search for it). You can download the ISO here:

 

http://old-releases.ubuntu.com/releases/9.04/

 

Ok, supposing that you've already got your DSDT file (you can find it inside of ACPI-Tables.zip, you will recognise it after the beginning of its name :P), I am going to help you with the whole process of modifying it.

 

Firsly, download the newest version of TextWrangler and iASLMe.

 

http://www.barebones.com/products/textwrangler/

 

http://www.insanelymac.com/forum/index.php?showtopic=189272

 

Search for the newest version of iASLMe on the last pages of the topic (attachments on the first page aren't updated). During writing this tutorial, I was using iASLMe_UB_23_06_2011.

 

Install both applications, drag our DSDT on iASLMe icon. We have to do this to make the code inside of it "readable" for a regular text editor. Open output .dsl file using TextWrangler.

 

The code will be easier to interpret if you makes some changes in preferences.

Choose "Edit->Text options..." and set it just like on the screenshot below:

 

1.png

 

To check correctness of our DSDT we have to drag our .dsl file on iASLMe. If compilation results in Compilation complete. 0 Errors, 0 Warnings, 0 Remarks.. - you can move to the next step. Otherwise, we should fix it. I am not able to predict how will your DSDT look like, so I am going to present you the fixes I had to use in my case.

 

My clean DSDT, after decompilation and re-compilation returned:

 

Compilation complete. 2 Errors, 42 Warnings, 1 Remarks...

 

It's not really a big problem to fix and - as to be honest - we don't have to take care of warnings but I am a pedant-type so... :P I recommend copying whole log of compilation to have an easy way to look into it. Let's paste it into a new text document of TextWrangler and search for "error". In my case, the first one was:

 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5071:					 Return (Zero)
Error	4080 -															 Invalid object type for reserved name ^  (found ZERO, requires Buffer)

 

5071 is the line where the error occurs so, using "Search->Go to line" we go to this line.

 

Method (_CRS, 0, NotSerialized)
		{
			If (OSFL ())
			{
				Return (Zero)
			}
			Else
			{
				Return (LCRO (^^PCI0.IMAP.PR0E))
			}
		}

 

The compiler returns information about invalid object type: it's ZERO while Buffer is required. Let's change Zero to Buffer (Zero) {} then.

 

This is how this part will look after modification:

 

Method (_CRS, 0, NotSerialized)
		{
			If (OSFL ())
			{
				Return (Buffer (Zero) {})
			}
			Else
			{
				Return (LCRO (^^PCI0.IMAP.PR0E))
			}
		}

 

One error left. Compile your DSDT by dragging your .dsl file on iASLMe icon and copy the log, then search for "error" again. In my case, the last error was:

 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   6265:			 Name (_HID, "pnp0c14")
Error	4124 -																 Non-hex letters must be upper case ^  (pnp0c14)

 

Again, we go to the line where the error occurs:

 

Name (_HID, "pnp0c14")

 

This time it's even easier to fix - we clearly can see that the compiler tells us to change "pnp0c14" to "PNP0C14" - do it then :)

 

Name (_HID, "PNP0C14")

 

Our DSDT is free of errors now. If you don't care about warnings and remark - you can move to the next step, otherwise - please read on...

 

What is left is to get rid of 42 warnings and one remark. Let's have a look at the warnings:

 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   2980:					 Method (ADVD, 0, NotSerialized)
Warning  1088 -															  Not all control paths return a value ^  (ADVD)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5709:							 If (LOr (MP0P (Local6), MP1P (Local6)))
Warning  1093 -																Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5709:							 If (LOr (MP0P (Local6), MP1P (Local6)))
Warning  1093 -																Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5711:								 Multiply (MCRS (Local6), 0x08000000, BF0F)
Warning  1093 -																	 Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5713:								 If (MPCR (Local6))
Warning  1093 -															   Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5715:									 If (MP0P (Local6))
Warning  1093 -																   Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5717:										 If (MP1P (Local6))
Warning  1093 -																	   Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5728:								 If (MP0P (Local6))
Warning  1093 -															   Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5730:									 Store (MP0N (Local6), Local5)
Warning  1093 -																	  Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5734:									 If (MP1P (Local6))
Warning  1093 -																   Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5736:										 Store (MP1N (Local6), Local5)
Warning  1093 -																		  Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5740:								 If (LGreater (BNKN, MCDB (Local5)))
Warning  1093 -																		 Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5742:									 Store (MCDB (Local5), BNKN)
Warning  1093 -																	  Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5745:								 If (LLess (BNKX, MCDB (Local5)))
Warning  1093 -																	  Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5747:									 Store (MCDB (Local5), BNKX)
Warning  1093 -																	  Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5750:								 If (LGreater (COLN, MCDC (Local5)))
Warning  1093 -																		 Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5752:									 Store (MCDC (Local5), COLN)
Warning  1093 -																	  Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5755:								 If (LLess (COLX, MCDC (Local5)))
Warning  1093 -																	  Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5757:									 Store (MCDC (Local5), COLX)
Warning  1093 -																	  Called method may not always return a value ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5798:			 Method (MP0P, 1, NotSerialized)
Warning  1088 -													  Not all control paths return a value ^  (MP0P)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5826:			 Method (MP1P, 1, NotSerialized)
Warning  1088 -													  Not all control paths return a value ^  (MP1P)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5854:			 Method (MPCR, 1, NotSerialized)
Warning  1088 -													  Not all control paths return a value ^  (MPCR)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5882:			 Method (MP0N, 1, NotSerialized)
Warning  1088 -													  Not all control paths return a value ^  (MP0N)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5910:			 Method (MP1N, 1, NotSerialized)
Warning  1088 -													  Not all control paths return a value ^  (MP1N)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5938:			 Method (MCRB, 1, NotSerialized)
Warning  1088 -													  Not all control paths return a value ^  (MCRB)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5966:			 Method (MCRS, 1, NotSerialized)
Warning  1088 -													  Not all control paths return a value ^  (MCRS)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   5994:			 Method (MCDB, 1, NotSerialized)
Warning  1088 -													  Not all control paths return a value ^  (MCDB)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   6017:			 Method (MCDC, 1, NotSerialized)
Warning  1088 -													  Not all control paths return a value ^  (MCDC)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   6295:			 Method (WMNV, 3, NotSerialized)
Warning  1088 -													  Not all control paths return a value ^  (WMNV)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   7136:			 Acquire (MUTE, 0x03E8)
Warning  1105 -									   Result is not used, possible operator timeout will be missed ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   7150:			 Acquire (MUTE, 0x03E8)
Warning  1105 -									   Result is not used, possible operator timeout will be missed ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   7165:			 Acquire (MUTE, 0x03E8)
Warning  1105 -									   Result is not used, possible operator timeout will be missed ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   7180:			 Acquire (MUTE, 0x0FFF)
Warning  1105 -									   Result is not used, possible operator timeout will be missed ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   7194:			 Acquire (MUTE, 0x03E8)
Warning  1105 -									   Result is not used, possible operator timeout will be missed ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   7209:			 Acquire (MUTE, 0x03E8)
Warning  1105 -									   Result is not used, possible operator timeout will be missed ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   7224:			 Acquire (MUTE, 0x03E8)
Warning  1105 -									   Result is not used, possible operator timeout will be missed ^ 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   8970:			 Return (One)
Warning  1128 -												Reserved method should not return a value ^  (_Q0E)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   9001:			 Return (One)
Warning  1128 -												Reserved method should not return a value ^  (_Q0F)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl  10256:			 Method (GMLE, 1, Serialized)
Warning  1088 -													  Not all control paths return a value ^  (GMLE)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl  10269:			 Method (SMLE, 1, Serialized)
Warning  1088 -													  Not all control paths return a value ^  (SMLE)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl  10289:			 Method (WLLC, 1, NotSerialized)
Warning  1088 -													  Not all control paths return a value ^  (WLLC)

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl  10946:				 Return (\_SB.PCI0.IXVE.IGPU.ADVD ())
Warning  1093 -																	   Called method may not always return a value ^

 

Firstly, we have to take care of all Not all control paths return a value warnings. I will show you an example which is clear enough to give you an idea on how to work with the rest.

 

Method (MP0P, 1, NotSerialized)
		{
			If (LEqual (Arg0, Zero))
			{
				Return (P0P0)
			}

			If (LEqual (Arg0, One))
			{
				Return (P0P1)
			}

			If (LEqual (Arg0, 0x02))
			{
				Return (P0P2)
			}

			If (LEqual (Arg0, 0x03))
			{
				Return (P0P3)
			}

			If (LEqual (Arg0, 0x04))
			{
				Return (P0P4)
			}
		}

 

In general - at the end of the part where warning occurs, we have to add "Return (Zero)":

 

Method (MP0P, 1, NotSerialized)
		{
			If (LEqual (Arg0, Zero))
			{
				Return (P0P0)
			}

			If (LEqual (Arg0, One))
			{
				Return (P0P1)
			}

			If (LEqual (Arg0, 0x02))
			{
				Return (P0P2)
			}

			If (LEqual (Arg0, 0x03))
			{
				Return (P0P3)
			}

			If (LEqual (Arg0, 0x04))
			{
				Return (P0P4)
			}
				Return (Zero)
		}

 

When we are done with all warnings of this type, we go straight to "Reserved method should not return a value". Again - I am going to show you an example:

 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl   8970:			 Return (One)
Warning  1128 -												Reserved method should not return a value ^  (_Q0E)

 

Return (One)

 

One of my warnings is connected with this line. It's obvious that we simply have to remove it. It's the easiest way to return nothing :P

 

To finish with all warnings we also have to take care of these:

 

Acquire (MUTE, 0x03E8)
Warning  1105 -							 Result is not used, possible operator timeout will be missed ^

 

The fix is very easy (again!). Simply change all Acquire (MUTE, 0x03E8) to Acquire (MUTE, 0xFFFF).

 

If you are still reading this, you must be a pedant-type, just like me... let's move to remark then :P

 

/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl	159:		 Name (_T_0, Zero)
Remark   5111 -													   Use of compiler reserved name ^  (_T_0)

 

Find all "_T_0" within whole DSDT and replace them to "T_0". Congrats! Your DSDT should compile with this result:

 

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks

 

4. DSDT modifying

 

DTGP method

 

Before:

 

(...)
DefinitionBlock ("DSDT.aml", "DSDT", 1, "K50IN", "K50IN000", 0x00000000)
{
Scope (_PR)
{
	Processor (P001, 0x01, 0x00004010, 0x06) {}
	Alias (P001, CPU0)
}

Scope (_PR)
{
	Processor (P002, 0x02, 0x00004010, 0x06) {}
	Alias (P002, CPU1)
}

Scope (_PR)
{
	Processor (P003, 0x03, 0x00004010, 0x06) {}
	Alias (P003, CPU2)
}
(...)

 

After:

 

(...)
DefinitionBlock ("DSDT.aml", "DSDT", 1, "K50IN", "K50IN000", 0x00000000)
{
Method (DTGP, 5, NotSerialized) 
{ 
	If (LEqual (Arg0, Buffer (0x10) 
			{ 
				/* 0000 */	0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, 
				/* 0008 */	0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B 
			})) 
	{ 
		If (LEqual (Arg1, One)) 
		{ 
			If (LEqual (Arg2, Zero)) 
			{ 
				Store (Buffer (One) 
					{ 
						0x03 
					}, Arg4) 
				Return (One) 
			} 

			If (LEqual (Arg2, One)) 
			{ 
				Return (One) 
			} 
		} 
	} 

	Store (Buffer (One) 
		{ 
			0x00 
		}, Arg4) 
	Return (Zero) 
}
Scope (_PR)
{
	Processor (P001, 0x01, 0x00004010, 0x06) {}
	Alias (P001, CPU0)
}

Scope (_PR)
{
	Processor (P002, 0x02, 0x00004010, 0x06) {}
	Alias (P002, CPU1)
}

Scope (_PR)
{
	Processor (P003, 0x03, 0x00004010, 0x06) {}
	Alias (P003, CPU2)
} (...)

 

Deleting Aliases:

 

Before:

 

(...)
Scope (_PR)
{
	Processor (P001, 0x01, 0x00004010, 0x06) {}
	Alias (P001, CPU0)
}

Scope (_PR)
{
	Processor (P002, 0x02, 0x00004010, 0x06) {}
	Alias (P002, CPU1)
}

Scope (_PR)
{
	Processor (P003, 0x03, 0x00004010, 0x06) {}
	Alias (P003, CPU2)
}

Scope (_PR)
{
	Processor (P004, 0x04, 0x00004010, 0x06) {}
	Alias (P004, CPU3)
}
(...)

 

After:

 

(...)
Scope (_PR)
{
	Processor (P001, 0x01, 0x00004010, 0x06) {}
	Processor (P002, 0x02, 0x00004010, 0x06) {}
	Processor (P003, 0x03, 0x00004010, 0x06) {}
	Processor (P004, 0x04, 0x00004010, 0x06) {}
}(...)

 

We also have to change CPU0->P001, CPU1->P002, CPU2->P003 and CPU3->P004 within whole DSDT!

 

OS detection

 

Before:

 

(...)
Method (OSYS, 0, NotSerialized)
{
	Store (0x10, Local0)
	If (CondRefOf (_OSI, Local1))
	{
		If (_OSI ("Windows 2000"))
		{
			Store (0x12, Local0)
		}

		If (_OSI ("Windows 2001"))
		{
			Store (0x13, Local0)
		}

		If (_OSI ("Windows 2001 SP1"))
		{
			Store (0x13, Local0)
		}

		If (_OSI ("Windows 2001 SP2"))
		{
			Store (0x13, Local0)
		}

		If (_OSI ("Windows 2001.1"))
		{
			Store (0x14, Local0)
		}

		If (_OSI ("Windows 2001.1 SP1"))
		{
			Store (0x14, Local0)
		}

		If (_OSI ("Windows 2006"))
		{
			Store (0x15, Local0)
		}
	}(...)

 

After:

 

(...)
Method (OSYS, 0, NotSerialized)
{
	Store (0x10, Local0)
	If (CondRefOf (_OSI, Local1))
	{
		If (_OSI ("Windows 2000"))
		{
			Store (0x12, Local0)
		}

		If (_OSI ("Windows 2001"))
		{
			Store (0x13, Local0)
		}

		If (_OSI ("Windows 2001 SP1"))
		{
			Store (0x13, Local0)
		}

		If (_OSI ("Windows 2001 SP2"))
		{
			Store (0x13, Local0)
		}

		If (_OSI ("Windows 2001.1"))
		{
			Store (0x14, Local0)
		}

		If (_OSI ("Windows 2001.1 SP1"))
		{
			Store (0x14, Local0)
		}

		If (_OSI ("Windows 2006"))
		{
			Store (0x15, Local0)
		}

		If (_OSI ("Darwin")) 
		{ 
			Store (0x15, Local0) 
		}
	}(...)

 

PIC

 

Before:

 

(...)
Device (PIC)
			{
				Name (_HID, EisaId ("PNP0000"))
				Name (_CRS, ResourceTemplate ()
				{
					IO (Decode16,
						0x0020,			 // Range Minimum
						0x0020,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
					IO (Decode16,
						0x00A0,			 // Range Minimum
						0x00A0,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
					IRQNoFlags ()
						{2}
				})
			}(...)

 

After:

 

(...)
Device (PIC)
			{
				Name (_HID, EisaId ("PNP0000"))
				Name (_CRS, ResourceTemplate ()
				{
					IO (Decode16,
						0x0020,			 // Range Minimum
						0x0020,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
					IO (Decode16,
						0x00A0,			 // Range Minimum
						0x00A0,			 // Range Maximum
						0x00,			   // Alignment
						0x02,			   // Length
						)
				})
			}(...)

 

Enabling SMBus

 

Before:

 

(...)
Device (SMB0)
		{
			Name (_ADR, 0x00030002)
			OperationRegion (SMAD, PCI_Config, 0x20, 0x08)
			Field (SMAD, DWordAcc, NoLock, Preserve)
			{
				SB1,	32, 
				SB2,	32
			}

			OperationRegion (SMCF, PCI_Config, 0x48, 0x10)
			Field (SMCF, DWordAcc, NoLock, Preserve)
			{
				SMPM,   4, 
				SMT1,   28, 
				SMT2,   32
			}(...)

 

After:

 

(...)
Device (SMB0)
		{
			Name (_ADR, 0x00030002)
			Device (BUS0)
			{
				Name (_CID, "smbus")
				Name (_ADR, Zero)
				Device (DVL0)
				{
					Name (_ADR, 0x57)
					Name (_CID, "diagsvault")
				}
			}

			OperationRegion (SMAD, PCI_Config, 0x20, 0x08)
			Field (SMAD, DWordAcc, NoLock, Preserve)
			{
				SB1,	32, 
				SB2,	32
			}

			OperationRegion (SMCF, PCI_Config, 0x48, 0x10)
			Field (SMCF, DWordAcc, NoLock, Preserve)
			{
				SMPM,   4, 
				SMT1,   28, 
				SMT2,   32
			}(...)

 

Audio injection

 

Before:

 

(...)
Device (HDAC)
		{
			Name (_ADR, 0x00080000)
			Name (SCID, Zero)
			Name (SACW, Zero)
			Method (_PS0, 0, NotSerialized)
			{
				If (SCID)
				{
					Store (Zero, PMDS)
					Store (Zero, PMEN)
					Store (SCID, CDID)
					Store (SACW, AOCW)
				}
			}

			Method (_PS3, 0, NotSerialized)
			{
				Store (AOCW, SACW)
				Store (CDID, SCID)
				Store (One, PMST)
				Store (0x03, PMDS)
				Store (One, PMEN)
			}(...)

 

After:

 

(...)
Device (HDEF)
		{
			Name (_ADR, 0x00080000)
			Method (_DSM, 4, NotSerialized) 
			{ 
				Store (Package (0x08) 
					{ 
						"subsystem-id", 
						Buffer (0x04) 
						{ 
							0xF3, 0x16, 0x00, 0x00 
						}, 

						"subsystem-vendor-id", 
						Buffer (0x04) 
						{ 
							0x43, 0x10, 0x00, 0x00 
						}, 

						"layout-id", 
						Buffer (0x04) 
						{ 
							0x0C, 0x00, 0x00, 0x00 
						}, 

						"PinConfigurations", 
						Buffer (Zero) {} 
					}, Local0) 
				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) 
				Return (Local0) 
			}
			Name (SCID, Zero)
			Name (SACW, Zero)
			Method (_PS0, 0, NotSerialized)
			{
				If (SCID)
				{
					Store (Zero, PMDS)
					Store (Zero, PMEN)
					Store (SCID, CDID)
					Store (SACW, AOCW)
				}
			}

			Method (_PS3, 0, NotSerialized)
			{
				Store (AOCW, SACW)
				Store (CDID, SCID)
				Store (One, PMST)
				Store (0x03, PMDS)
				Store (One, PMEN)
			}(...)

 

Cosmetic fix injecting graphics card information (without it in System Profiler it will be called "Unknown", new Chameleon version fixes the problem but it doesn't show RAM information properly, so I'd rather use the one from my archive and add this fix to DSDT):

 

Before:

 

(...)
Name (DONE, Zero)
				Name (DOSF, One)
				Name (BRNC, Zero)
				Method (_INI, 0, NotSerialized)
				{
					GETD ()
				}

				Method (_DOS, 1, NotSerialized)
				{
					And (Arg0, 0x03, DOSF)
					Store (ShiftRight (Arg0, 0x02), BRNC)
					And (BRNC, One, BRNC)
				}(...)

 

After:

 

(...)
Name (DONE, Zero)
				Name (DOSF, One)
				Name (BRNC, Zero)
				Method (_DSM, 4, NotSerialized) 
				{ 
					Store (Package () 
						{ 
							"@0,compatible", 
							Buffer (0x0B) 
							{ 
								"NVDA,NVMac" 
							}, 

							"@0,device_type", 
							Buffer (0x08) 
							{ 
								"display" 
							}, 

							"@0,name", 
							Buffer (0x0F) 
							{ 
								"NVDA,Display-A" 
							}, 

							"@1,compatible", 
							Buffer (0x0B) 
							{ 
								"NVDA,NVMac" 
							}, 

							"@1,device_type", 
							Buffer (0x08) 
							{ 
								"display" 
							}, 

							"@1,name", 
							Buffer (0x0F) 
							{ 
								"NVDA,Display-B" 
							}, 

							"device_type", 
							Buffer (0x0C) 
							{ 
								"NVDA,Parent" 
							}, 

							"model", 
							Buffer () 
							{ 
								"NVIDIA GeForce G102M" 
							}, 

							"rom-revision", 
							Buffer () 
							{ 
								"62.79.78.00.06" 
							} 
						}, Local0) 
					DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) 
					Return (Local0) 
				} 
				Method (_INI, 0, NotSerialized)
				{
					GETD ()
				}

				Method (_DOS, 1, NotSerialized)
				{
					And (Arg0, 0x03, DOSF)
					Store (ShiftRight (Arg0, 0x02), BRNC)
					And (BRNC, One, BRNC)
				}(...)

 

Time Machine fix

 

Before:

 

(...)
Device (P0P6)
		{
			Name (_ADR, 0x00150000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x11, 0x04))
			}(...)

 

After:

 

(...)
Device (P0P6)
		{
			Name (_ADR, 0x00150000)
			Device (LAN) 
			{ 
				Name (_ADR, Zero) 
				Method (_DSM, 4, NotSerialized) 
				{ 
					Store (Package (0x04) 
						{ 
							"built-in", 
							Buffer (One) 
							{ 
								0x01 
							}, 
							   "name", 
							Buffer (0x24) 
							{ 
								   "Realtek RTL8111/8168B PCI-E Gigabit" 
							} 
						}, Local0) 
					DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) 
					Return (Local0) 
				} 
			}

			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x11, 0x04))
			}(...)

 

OS detection 2

 

Before:

 

(...)
Method (MSOS, 0, NotSerialized)
	{
		If (CondRefOf (_OSI, Local0))
		{
			If (_OSI ("Windows 2001"))
			{
				Store (OSXP, OSFG)
			}

			If (_OSI ("Windows 2001 SP1"))
			{
				Store (OSXP, OSFG)
			}

			If (_OSI ("Windows 2001 SP2"))
			{
				Store (OSXP, OSFG)
			}

			If (_OSI ("Windows 2006"))
			{
				Store (OSVT, OSFG)
			}

			If (_OSI ("Linux"))
			{
				Store (OSEG, OSFG)
			}

			If (_OSI ("Windows 2009"))
			{
				Store (OSW7, OSFG)
			}

			Return (OSFG)
		}(...)

 

After:

 

(...)
Method (MSOS, 0, NotSerialized)
	{
		If (CondRefOf (_OSI, Local0))
		{
			If (_OSI ("Windows 2001"))
			{
				Store (OSXP, OSFG)
			}

			If (_OSI ("Windows 2001 SP1"))
			{
				Store (OSXP, OSFG)
			}

			If (_OSI ("Windows 2001 SP2"))
			{
				Store (OSXP, OSFG)
			}

			If (_OSI ("Windows 2006"))
			{
				Store (OSVT, OSFG)
			}

			If (_OSI ("Darwin"))
			{
				Store (OSVT, OSFG)
			}

			If (_OSI ("Linux"))
			{
				Store (OSEG, OSFG)
			}

			If (_OSI ("Windows 2009"))
			{
				Store (OSW7, OSFG)
			}

			Return (OSFG)
		}(...)

 

LID sleep fix (enables sleep after closing lid):

 

Before:

 

(...)
Device (LID)
	{
		Name (_HID, EisaId ("PNP0C0D"))
		Method (_LID, 0, NotSerialized)
		{
			Store (One, Local0)
			^^PCI0.SBRG.EC0.DL9F ()
			Store (^^PCI0.SBRG.EC0.RPIN (0x06), Local0)
			^^PCI0.SBRG.EC0.DL9F ()
			If (LEqual (Local0, Ones))
			{
				Store (One, Local0)
			}

			Return (Local0)
		}
	}(...)

 

After:

 

(...)
Device (LID)
	{
		Name (_HID, EisaId ("PNP0C0D"))
		Name (LIDS, One)
		Method (_LID, 0, NotSerialized)
		{
			Store (^^PCI0.SBRG.EC0.RPIN (0x06), LIDS)
			XOr (LIDS, One, Local0)
			If (Local0)
			{
				Notify (SLPB, 0x80)
			}

			Return (LIDS)
		}
	}(...)

 

WLAN injection

 

Before:

 

(...)
Device (P0P7)
		{
			Name (_ADR, 0x00160000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x11, 0x04))
			}

			Method (_PRT, 0, NotSerialized)
			{
				If (PICM)
				{
					Return (AR07)
				}

				Return (PR07)
			}
		}(...)

 

After:

 

(...)
Device (P0P7)
		{
			Name (_ADR, 0x00160000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x11, 0x04))
			}

		 Device (ARPT)
			{
				Name (_ADR, Zero)
				Name (_PRW, Package (0x02)
				{
					0x0B, 
					0x05
				})
				Method (_DSM, 4, NotSerialized)
				{
					Store (Package (0x0C)
						{
							"AAPL,slot-name", 
							Buffer (0x08)
							{
								"AirPort"
							}, 

							"device-id", 
							Unicode ("*"), 
							"device_type", 
							Buffer (0x08)
							{
								"AirPort"
							}, 

							"model", 
							Buffer (0x34)
							{
								"Atheros 9285 8802.11 b/g/n Wireless Network Adapter"
							}, 

							"subsystem-id", 
							Buffer (0x04)
							{
								0x89, 0x10, 0x00, 0x00
							}, 

							"subsystem-vendor-id", 
							Buffer (0x04)
							{
								0x3B, 0x1A, 0x00, 0x00
							}
						}, Local0)
					DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
					Return (Local0)
				}
			}

			Method (_PRT, 0, NotSerialized)
			{
				If (PICM)
				{
					Return (AR07)
				}

				Return (PR07)
			}
		}(...)

 

In my DSDT, I have also renamed the following names to look it more like in MacBook Pro's. I have to remind you that it isn't like: replace all from XX->XY. APIC isn't the same as PIC e.g.!:

 

PIC -> IPIC

DMAD -> DMAC

TMR -> TIMR

RTC0 -> RTC

COPR -> MATH

OMSC -> LDRC

SBRG -> LPCB

USB0 -> OHC1

USB2 -> EHC1

RHUB -> HUB1

 

5. Post-configuration part II

 

So... we've got our own DSDT, let's use some of its potential and delete NullCPUPowerManagement from our Extra finally.

In the main directory of Extra (where smbios.plist is) paste compiled DSDT with .aml extension. Then we put my audio fix - LegacyHDA_ALC662-v.1 and AnyCardReader to Extra/KextStore.

 

The next step is replacing 3 files in System/Library/Extensions (one of them is a cosmetic fix - after updating to 10.6.8, our controller is no longer identified as MCP79 AHCI even though the part regarding MCP79 is exactly the same in AppleAHCIPort 10.6.7 and 10.6.8 (our dev id is still there...), I wasn't able to find any other way to fix the issue than replacing new AppleAHCIPort to the one from Mac OS X 10.6.7... well... I am not a real fan of rollbacks but when there is no alternative and the system isn't going to be updated anymore...):

 

AppleAHCIPort, AppleHDA, IOAudioFamily

 

Why do we have to replace AppleHDA? Unfortunately, after waking up from sleep - our audio was broken... patched IOAudioFamily fixes the problem but it isn't developed since Mac OS X 10.6.2 and it doesn't work not only with Mac OS X 10.6.8 (what is obvious since AppleHDA has got a new structure) but also with 10.6.7. I am not able to create an update to this kext so we have to use older AppleHDA until I learn how to do this or someone else creates one.

 

Finally, we can make our bootloader look nicer. Paste my Themes folder to Extra and use Kext Wizard to rebuild cache, fix permissions etc. (in general - check all options). Be patient - it takes a while!

 

Reboot with -v flag to know if something goes wrong - it's the last time you have to see this ugly screen, I promise :P

 

6. Fixing "Your device or computer could not be verified. Contact support for assistance" error while logging into App Store

 

It occurs when your WLAN in on en0 instead of LAN. To fix this we have to delete NetworkInterfaces.plist from:

 

/Library/Preferences/SystemConfiguration

 

Then we have to reboot, go to network preferences and delete both inferfaces. Re-add them in this order:

 

- Ethernet

- AirPort

 

7. Fixing a problem with webcam

 

As you've probably observed - our webcam is working OOTB but the video is upside down. iGlasses provides an easy fix to this. After installing, simply turn on PhotoBooth and use "Rotate" option to set the video into proper position, then click on "Default" to load this setting automatically.

 

This app works with most applications I know, for example: Skype, Messenger for Mac or PhotoBooth.

 

8. Creating shortcuts without Fn

 

Unfortunately, we can't use Fn keys on Mac OS X. Thanks to ControllerMate we are able to create our own shortcuts to system functions. I am going to show you how to create such on example of volume control:

 

After first run, we will see a window like the one below:

 

2.png

 

Check "Start Page", then in "Palette" windows, on the right side of the screen, find "Apple Keyboard":

 

3.png

 

Double click on its icon, you will see a list like this:

 

4.png

 

After we press any key on our keyboard, a "diode" near this key on the list is going to blink. In this example we are going to set our volume control keys this way:

 

F9 - mute

F10 - volume down

F11 - volume up

 

Before we do so, we have to make sure that none of the keys is being used by system (for example - F12 is a default shortcut for ejecting CD/DVD, that's why I had to leave it, even though on our keyboard, it's a part of Fn for volume control).

We can check it in "System preferences->Keyboard->Shortcuts". Uncheck all shortcuts connected with F9, F10 and F11:

 

5.png

 

Then, go back to ControllerMate and drag every key (F9, F10 and F11) from "Palette to the main window of the app.

 

The next step is to choose "Windows->Keystrokes Palette". From this window, drag all three icons representing volume control to the main window of ControllerMate.

 

6.png

 

All that is left is to create the shortcuts finally. We do so by dragging OFF icon from key to its function. Final effect of my work with this app is visible below:

 

7.png

 

Choose "File->Save" and quit the application - shortcuts should be working now :) (ControllerMate doesn't have to work all the time, it has its own helper app that runs in background)

 

9. Express your gratitude by writing a few words on effects of working with this tutorial ;)

 

final.png

 

Needed files:

 

http://dl.dropbox.com/u/20095030/asus_k50in_data.zip

Link to comment
Share on other sites

  • 6 months later...

great tutorial - i still don't have sound working properly (think its alc269), using voodoo, and my webcam is upside down.. only using unmodified generated dstm right now perhaps you might have some suggestions on what i could do to that as these lap tops are similar

Link to comment
Share on other sites

  • 1 month later...

Well, man_of_the_oak, you have one happy protege here! The clincher for me was getting sleep/wake to work with the lid.. now this baby is a keeper, might even buy a replacement battery. Your tutorial was excellent. Using this thread and the hackinstaller script I was able to just learn enough at each step to get to the next step in your guide. My dsdt had 2 errors, one was the buffer zero entry, but the other was different I managed to fix it by studying the rest of the file.. still have 212 warnings which all seem to be similar to yours. I went ahead and made all the other dsdt modifications except for the sound ones as I am trying out voodoohda.kext.. still have some issues to fix with that, finding an open source fix for the upside down webcam, and the controllermate customizations.

 

Seriously though, thank you, thank you thank you, this guide was excellent, and now I have an awesome, inexpensive, second hand, osx, asus notebook :)

Cheers!

Link to comment
Share on other sites

  • 3 years later...
 Share

×
×
  • Create New...