Jump to content

Decompiled original Apple DSDTs


  • Please log in to reply
108 replies to this topic

#1
Andy Vandijck

Andy Vandijck

    InsanelyMac Deity

  • Coders
  • 1,557 posts
  • Gender:Male
  • Location:Tienen
  • Interests:Programming stuff for Mac OS X...
    Hacking...
    Hard rock (also really big Metallica...
Currently collected:
-iMac5,1
-iMac7,1
-iMac8,1
-MacPro3,1
-MacBook2,1
-MacBook3,1
-MacBook4,1
-MacBookPro5,1
-MacBookAir1,1

These could be used for fixing up your devices.
I've used this to enable the Apple ACPI Power adapter to attach properly on the power supply of my Packard Bell EasyNote MZ-35 200 notebook.
You can also add for example the backlight control (APP0003 I think) and then it will enable the driver + control.
Many more is possible...

Like I say, a manual DSDT fix saves the day...

Enjoy and feast your eyes.

NOTE: Any other genuine Mac IORegistryExplorer saves (.ioreg files) are welcome, I can use these for more stuff like this...
If you don't have IORegistryExplorer (from XCode, preferred dump format) please make the dump with the following four commands:

echo "IOService:" > [MACHINE_ID].txt

ioreg -l -p IOService -w 99999 >> [MACHINE_ID].txt

echo "IODeviceTree:" >> [MACHINE_ID].txt

ioreg -l -p IODeviceTree -w 99999 >> [MACHINE_ID].txt

This will ensure all of the for various things needed data is there...

Also added my ioreg files...
Currently collected:
-iMac5,1
-iMac7,1
-iMac10,1
-iMac11,1
-Macmini1,1
-Macmini2,1
-Macmini3,1
-MacPro3,1
-MacPro4,1
-MacPro5,1
-MacBook1,1
-MacBook2,1
-MacBook3,1
-MacBook4,1
-MacBook5,2
-MacBook6,1
-MacBookPro4,1
-MacBookPro5,1
-MacBookPro5,2
-MacBookPro5,3
-MacBookPro5,4
-MacBookPro5,5
-MacBookPro6,1
-MacBookAir1,1
-MacBookAir2,1
More models have been added... (rapidshare link listed below).
http://rapidshare.co..._collection.zip

Attached Files



#2
roidm

roidm

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,057 posts
  • Gender:Male
  • Location:Spain
Hi, go here (post #7) ... I“ve attached a few ssdt & dsdt tables from real macs. If you want the ioregs let me know...

#3
Trauma!

Trauma!

    Took too much...

  • Members
  • PipPipPipPipPipPipPip
  • 964 posts
  • Gender:Male
  • Location:France
Hey!! Thanks for that Andy !
It's gonna be useful for sure !

Genuine Mac IORegistryExplorer saves could be great as well !

bye.

#4
Andy Vandijck

Andy Vandijck

    InsanelyMac Deity

  • Coders
  • 1,557 posts
  • Gender:Male
  • Location:Tienen
  • Interests:Programming stuff for Mac OS X...
    Hacking...
    Hard rock (also really big Metallica...

Hi, go here (post #7) ... I“ve attached a few ssdt & dsdt tables from real macs. If you want the ioregs let me know...


Sure, I could use any of those IORegs...
Note: I'll be adding more stuff as I move along.
It's only gonna take a bit of time and right now I (unfortunetely) don't have any.
Thanks in advance

#5
roidm

roidm

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,057 posts
  • Gender:Male
  • Location:Spain
ok ,here some ioregs , i“ll upload a few more later

#6
Bit Shoveler

Bit Shoveler

    InsanelyMac Geek

  • Coders
  • 111 posts
  • Gender:Male
  • Location:Six blocks from AMD HQ
  • Interests:Hackable Macs
Good stuff, thanks Andy and roisoft!

It would be nice if this data was logged somewhere for easy retrieval.

#7
Wiwi

Wiwi

    InsanelyMac Guy

  • Members
  • PipPipPipPip
  • 212 posts
  • Gender:Male

These could be used for fixing up your devices.
I've used this to enable the Apple ACPI Power adapter to attach properly on the power supply of my Packard Bell EasyNote MZ-35 200 notebook.
You can also add for example the backlight control (APP0003 I think) and then it will enable the driver + control.

NOTE: Any other genuine Mac IORegistryExplorer saves (.ioreg files) are welcome, I can use these for more stuff like this...


I wonder if there was a guide for this, to know how did you enable Apple ACPI Power and backlight control... And many other tricks, i've searched a lot of times but never understand where you find those tricks (linux forums ?)
A little guide about the possibilities and a quick mini howto to let DSDT newbies on the good way could be great...

Have we just to add some mac ioreg entries in our DSDT ?

#8
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts
hey andy, I already enabled the backlight control via dsdt (app0002). however, this only made the backlight control bar appear in system preferences/display, but it had no effect on the actual backlight control that btw actually works on my laptop, but without showing the backlight meter on the screen when I use it... when I increase it or decrease it via system preferences nothing happens

any idea on how to link the two things and make the backlight controllable in system preferences? I attach my already patched dsdt, cheers :)

PS: could you post the modifications you made to your dsdt? for example, I tried emulating smc device by copying and pasting the mbp code but it made the system unbootable, now I asked the code to fassl and it works but I wouldn't have been able to modify it by myself

Attached Files



#9
KonamiĀ®

KonamiĀ®

    InsanelyMac Legend

  • Donators
  • 956 posts
  • Gender:Male
  • Location:Pennsylvania
Andy, how does this work? what I can do with the MacPro dsl file? :(

#10
Wiwi

Wiwi

    InsanelyMac Guy

  • Members
  • PipPipPipPip
  • 212 posts
  • Gender:Male

I've recently decompiled the DSDTs of a:
- MacPro3,1
- MacBookPro5,1
- iMac5,1

These could be used for fixing up your devices.
I've used this to enable the Apple ACPI Power adapter to attach properly on the power supply of my Packard Bell EasyNote MZ-35 200 notebook.
You can also add for example the backlight control (APP0003 I think) and then it will enable the driver + control.
Many more is possible...

Like I say, a manual DSDT fix saves the day...

Enjoy and feast your eyes.

NOTE: Any other genuine Mac IORegistryExplorer saves (.ioreg files) are welcome, I can use these for more stuff like this...



At least let us your modded dsdt please...

#11
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts
andy, I quote this from another topic.. do you think it could be possible to get these cameras to work via some mods in dsdt?

CHICONY WEBCAM USERS read this

I think we are looking at the wrong place. At least for chicony cameras. This is the deal. I have one of those viewsonic 22 inch monitors with the built in webcams. This thing works, Plug and play. I have a Gateway Laptop with a built in camera, this one doesn't work unless I use camtwist. This solution sort of okey, but there is one small problem. It introduces a 2-4 second lag on the video. Still from this I conclude that my camera CAN work in Leopard, and it is just a small detail that is keeping me from making it work. So why am I so excited? Continue reading.

I started comparing the working webcam from my viewsonic monitor, and my gateway laptop camera. Guess what they are basically the same chicony camera. Both of them are chicony Id Vendor "1226" or "0x042f" both have the same stats basically the only difference is the Product id Number: "45095" or "0xb027" for the gateway and "45089" or "0xb021" for the viewsonic. Usually such a small difference in id numbers means they are practically the same thing and the same driver. The only other difference is the bcdDevice number "37668" for gateway "852" for the viewsonic.

In other things I have hacked in Leopard to make things work, I basically go for the driver, modify the Ids to make them work, and presto I get a working device. Here is where I have hit a snag. According to ioreg, the drivers that are making the web cam work in the viewsonic are IOUSBCompositeDrvier.kext which is part of the the IOUSBFamily.kext and IOUSBLIb.bundle which is also under the IOUSBFamily.kext. The IOUSBCompositeDriver.kext has the correct ids. The problem is that the IOUSBLib.bundle has no ids to move or fix.

I feel I am so close to this, but I have hit a wall. Anyone know the difference between a bundle and a kext, and how would one go to modify ids on it. I am pretty sure this is the place to look at, at least for chicony (which is a large amount of the webcams in laptops)

Here are the relevant parts of the IOreg, to see if some one can make sense out of it.

For the working Viewsonic webcam

| | | +-o ViewSonic 1.3M, USB2.0 Webcam@fa200000 <class IOUSBDevice, registered, matched, active, busy 0, retain 9>| | | | {| | | | "PortNum" = 2| | | | "Bus Power Available" = 250| | | | "bNumConfigurations" = 1| | | | "Device Speed" = 2| | | | "sessionID" = 294705983020785| | | | "USB Product Name" = "ViewSonic 1.3M, USB2.0 Webcam"| | | | "bcdDevice" = 852| | | | "locationID" = 18446744073610985472| | | | "USB Vendor Name" = "Chicony Electronics Co., Ltd."| | | | "USB Address" = 2| | | | "idProduct" = 45089| | | | "iProduct" = 1| | | | "bDeviceProtocol" = 1| | | | "iManufacturer" = 2| | | | "IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}| | | | "bDeviceClass" = 239| | | | "iSerialNumber" = 3| | | | "bMaxPacketSize0" = 64| | | | "IOUserClientClass" = "IOUSBDeviceUserClientV2"| | | | "bDeviceSubClass" = 2| | | | "IOGeneralInterest" = "IOCommand is not serializable"| | | | "idVendor" = 1266| | | | "USB Serial Number" = "SN0001"| | | | }| | | || | | +-o IOUSBCompositeDriver <class IOUSBCompositeDriver, !registered, !matched, active, busy 0, retain 4>| | | | {| | | | "IOProviderClass" = "IOUSBDevice"| | | | "IOProbeScore" = 60000| | | | "bDeviceProtocol" = 1| | | | "CFBundleIdentifier" = "com.apple.driver.AppleUSBComposite"| | | | "bDeviceClass" = 239| | | | "IOMatchCategory" = "IODefaultMatchCategory"| | | | "bDeviceSubClass" = 2| | | | "IOClass" = "IOUSBCompositeDriver"| | | | }| | | || | | +-o ViewSonic 1.3M, USB2.0 Webcam@0 <class IOUSBInterface, registered, matched, active, busy 0, retain 5>| | | | {| | | | "bInterfaceProtocol" = 0| | | | "locationID" = 18446744073610985472| | | | "bcdDevice" = 852| | | | "bConfigurationValue" = 1| | | | "iInterface" = 1| | | | "idProduct" = 45089| | | | "IOCFPlugInTypes" = {"2d9786c6-9ef3-11d4-ad51-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}| | | | "bInterfaceSubClass" = 1| | | | "bAlternateSetting" = 0| | | | "IOUserClientClass" = "IOUSBInterfaceUserClientV2"| | | | "bInterfaceClass" = 14| | | | "bInterfaceNumber" = 0| | | | "bNumEndpoints" = 1| | | | "idVendor" = 1266| | | | }| | | || | | +-o IOUSBInterface@1 <class IOUSBInterface, registered, matched, active, busy 0, retain 5>| | | {| | | "bInterfaceProtocol" = 0| | | "locationID" = 18446744073610985472| | | "bcdDevice" = 852| | | "bConfigurationValue" = 1| | | "iInterface" = 0| | | "idProduct" = 45089| | | "IOCFPlugInTypes" = {"2d9786c6-9ef3-11d4-ad51-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}| | | "bInterfaceSubClass" = 2| | | "bAlternateSetting" = 0| | | "IOUserClientClass" = "IOUSBInterfaceUserClientV2"| | | "bInterfaceClass" = 14| | | "bInterfaceNumber" = 1| | | "bNumEndpoints" = 0| | | "idVendor" = 1266| | | }

For the none working Gateway laptop Webcam

| | | | +-o Gateway USB 2.0 Webcam@fa300000 <class IOUSBDevice, registered, matched, active, busy 0, retain 9>| | | | | {| | | | | "bNumConfigurations" = 1| | | | | "sessionID" = 28830128290301| | | | | "bcdDevice" = 37668| | | | | "USB Address" = 2| | | | | "iProduct" = 1| | | | | "bDeviceClass" = 239| | | | | "bMaxPacketSize0" = 64| | | | | "IOUserClientClass" = "IOUSBDeviceUserClientV2"| | | | | "idVendor" = 1266| | | | | "PortNum" = 3| | | | | "Bus Power Available" = 250| | | | | "Device Speed" = 2| | | | | "USB Product Name" = "Gateway USB 2.0 Webcam"| | | | | "Requested Power" = 250| | | | | "locationID" = 18446744073612034048| | | | | "USB Vendor Name" = "Chicony Electronics Co., Ltd."| | | | | "idProduct" = 45095| | | | | "bDeviceProtocol" = 1| | | | | "iManufacturer" = 2| | | | | "IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}| | | | | "iSerialNumber" = 3| | | | | "IOGeneralInterest" = "IOCommand is not serializable"| | | | | "bDeviceSubClass" = 2| | | | | "Low Power Displayed" = No| | | | | "USB Serial Number" = "SN0001"| | | | | }| | | | || | | | +-o IOUSBCompositeDriver <class IOUSBCompositeDriver, !registered, !matched, active, busy 0, retain 4>| | | | | {| | | | | "IOProviderClass" = "IOUSBDevice"| | | | | "IOProbeScore" = 60000| | | | | "bDeviceProtocol" = 1| | | | | "CFBundleIdentifier" = "com.apple.driver.AppleUSBComposite"| | | | | "bDeviceClass" = 239| | | | | "IOMatchCategory" = "IODefaultMatchCategory"| | | | | "bDeviceSubClass" = 2| | | | | "IOClass" = "IOUSBCompositeDriver"| | | | | }| | | | || | | | +-o Gateway USB 2.0 Webcam@0 <class IOUSBInterface, registered, matched, active, busy 0, retain 5>| | | | | {| | | | | "IOUserClientCrossEndianCompatible" = No| | | | | "bInterfaceProtocol" = 0| | | | | "bcdDevice" = 37668| | | | | "locationID" = 18446744073612034048| | | | | "bConfigurationValue" = 1| | | | | "iInterface" = 1| | | | | "idProduct" = 45095| | | | | "IOCFPlugInTypes" = {"2d9786c6-9ef3-11d4-ad51-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}| | | | | "bInterfaceSubClass" = 1| | | | | "bAlternateSetting" = 0| | | | | "IOUserClientClass" = "IOUSBInterfaceUserClientV2"| | | | | "IOGeneralInterest" = "IOCommand is not serializable"| | | | | "USB Interface Name" = "Gateway USB 2.0 Webcam"| | | | | "bInterfaceClass" = 14| | | | | "bInterfaceNumber" = 0| | | | | "bNumEndpoints" = 1| | | | | "idVendor" = 1266| | | | | }| | | | |

Here is hoping for someone that can make sense of this, we are closer than we think.



#12
Andy Vandijck

Andy Vandijck

    InsanelyMac Deity

  • Coders
  • 1,557 posts
  • Gender:Male
  • Location:Tienen
  • Interests:Programming stuff for Mac OS X...
    Hacking...
    Hard rock (also really big Metallica...

At least let us your modded dsdt please...

Here, not complete yet though...
It's for a Packard Bell EasyNote MZ-35 200...
Use as template...

Attached Files



#13
Wiwi

Wiwi

    InsanelyMac Guy

  • Members
  • PipPipPipPip
  • 212 posts
  • Gender:Male

I've used this to enable the Apple ACPI Power adapter to attach properly on the power supply of my Packard Bell EasyNote MZ-35 200 notebook.


Thanks for the file... Don't know what you have change to enable ACPI Power adapter, just in BAT0 ???

#14
Trauma!

Trauma!

    Took too much...

  • Members
  • PipPipPipPipPipPipPip
  • 964 posts
  • Gender:Male
  • Location:France

Here, not complete yet though...
It's for a Packard Bell EasyNote MZ-35 200...
Use as template...


Andy,

Thanks for the DSDT file, but if you could post your unmodified one here we could see exactly what you have done ! An ioreg in addition to that will be great.

I'm actualy working on the DSDT of the MSi Wind. I now have GFX and HDA injection via DSDT and i've also fixed the "LID0" in order to replace ClamShellDisplay.kext. :)

I'm now trying to get rid VoodooBattery.kext. Is it what you've meant when you say :

I've used this to enable the Apple ACPI Power adapter to attach properly on the power supply of my Packard Bell EasyNote MZ-35 200 notebook.


Bye.

#15
Wiwi

Wiwi

    InsanelyMac Guy

  • Members
  • PipPipPipPip
  • 212 posts
  • Gender:Male

i've also fixed the "LID0" in order to replace ClamShellDisplay.kext. :)


Wow how did you do that ???? I've watched MPB dsdt, there si LID0 but not LID as in my dsdt, do i have just to change LID to LID0 to make it work ???

EDIT:No change.

I'm now trying to get rid VoodooBattery.kext.


Same combat.

#16
Trauma!

Trauma!

    Took too much...

  • Members
  • PipPipPipPipPipPipPip
  • 964 posts
  • Gender:Male
  • Location:France
Wiwi,

It's not a matter of device name, i think it's only cosmetics. This is what i have done :

- Original DSDT
Device (LID0)
		{
			Name (_HID, EisaId ("PNP0C0D"))
			Name (_PRW, Package (0x02)
			{
				0x12, 
				0x03
			})
			Method (_LID, 0, NotSerialized)
			{
				Return (LIDS)
			}

			Method (_PSW, 1, NotSerialized)
			{
				If (\_SB.PCI0.LPCB.EC.ECOK)
				{
					If (Arg0)
					{
						Store (0x01, \_SB.PCI0.LPCB.EC.LWAK)
					}
					Else
					{
						Store (0x00, \_SB.PCI0.LPCB.EC.LWAK)
					}
				}
			}


Modded to this :
Device (LID0)
			{
				Name (_HID, EisaId ("PNP0C0D"))
				Method (_LID, 0, NotSerialized)
				{
				XOr (LIDS, One, Local0)
				IF (Local0)									 
				{ 
				Notify (SLPB, 0x80)						 
				} 
				Return (LIDS)
				}
			}

According to this guide : http://ipis-osx.wiki...t-fix-for-1000h

Bye.

#17
DB1

DB1

    InsanelyMac Sage

  • Donators
  • 407 posts
Trauma!

Would appreciate the DSDT code for Wind HDA - have been playing with that one for a while and not yet cracked it. Had already the GFX and have just done the LID0 & clamshell kext removal. Works great thanks.

#18
Wiwi

Wiwi

    InsanelyMac Guy

  • Members
  • PipPipPipPip
  • 212 posts
  • Gender:Male

Modded to this :
Device (LID0)
{
Name (_HID, EisaId ("PNP0C0D"))
Method (_LID, 0, NotSerialized)
{
XOr (LIDS, One, Local0)
IF (Local0)
{
Notify (SLPB, 0x80)
}
Return (LIDS)
}
}


I know that method, but it hardcode sleep : does it allow to disable clamshell if needed ?

#19
coconup

coconup

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 190 posts
well, enabling appleACPIadapter had strange results on my system. by the way, the thing is done by modding AC0 or whatever you have instead of that. It fixed my 'no restart after sleep' issue, but it messed up a lot of things: after wake, I don't have 'lid sleep', which always works fine without this mod; my wireless card doesn't wake from sleep and if I use lid sleep before normal sleeping it works, but on wake my screen goes black and I have to restart... I also added 'gmux' device emulation which really does nothing I guess. here's my dsdt without ac0 patch and with it, if anybody has suggestions on what to fix I'll really appreciate

Attached Files



#20
Trauma!

Trauma!

    Took too much...

  • Members
  • PipPipPipPipPipPipPip
  • 964 posts
  • Gender:Male
  • Location:France

I know that method, but it hardcode sleep : does it allow to disable clamshell if needed ?


I dont think so, by the way you can't disable it with ClamShellDisplay to ! Does real Mac can disable this clamshell fonction ?

If i understand well, you want to use your laptop with the lid closed and monitor on another display ?

Trauma!

Would appreciate the DSDT code for Wind HDA - have been playing with that one for a while and not yet cracked it. Had already the GFX and have just done the LID0 & clamshell kext removal. Works great thanks.

Thanks,

about the HDA string : i'm not able, at the moment to use AppleHDA.kext as a sound driver. I've just hadded the missing "Device (HDEF)" in my DSDT for future use.... I'm working on the HDA driver at the moment, but until now with no success !

Has an exemple you could add that to your DSDT a see what's happen (ADR is the correct one for the wind):
Device (HDEF)
{
	Name (_ADR, 0x001B0000)
}

Then you can follow TheKing's tutorial about HDA Injection.

Bye.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   Web hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy