xopher Posted October 19, 2009 Share Posted October 19, 2009 I first need to know a few things: 1) Does it work without the device_type bits in _DSM? 2) What if you only add the device_id bits and add my code? Note: Don't forget to adjust Package(0x06) accordantly! Let's see: Does (auto) sleep work for you? What about restart/shutdown without OpenHaltRestart.kext? p.s. No attached file so I'll have to ask this: You did not add device_id's to the UHCn devices, right? 1) It works without the device_type bits in _DSM. 2) Doesn't help, still doesn't work. 3) Sleep doesn't seem to work for me at the moment no. Monitor turns off, computer stops gets quiet, but not totally silent, so it's not turned off completely. Oh, and doesn't wake from mouse/kb/PWRB. 4) Restart/shutdown without OpenHaltRestart.kext <- have to check this one out, brb. I've attached my current DSDT for your viewing pleasure. DSDT_removed_device_type.txt Link to comment Share on other sites More sharing options...
Master Chief Posted October 19, 2009 Share Posted October 19, 2009 1) It works without the device_type bits in _DSM. Just what I expected. Great news! 2) Doesn't help, still doesn't work. I see. Thanks for testing. 3) Sleep doesn't seem to work for me at the moment no. Monitor turns off, computer stops gets quiet, but not totally silent, so it's not turned off completely. Oh, and doesn't wake from mouse/kb/PWRB. That might actually be due to a bit not being high. Please try this: Method (_L0D, 0, NotSerialized) { Store (0x01, \_SB.PCI0.EHCI.PMES) // Port Wake Implemented Notify (\_SB.PCI0.EHCI, 0x02) // Renamed from: USBE Notify (\_SB.PWRB, 0x02) Store (0x01, \_SB.PCI0.UHCI.PMES) // Port Wake Implemented Notify (\_SB.PCI0.UHCI, 0x02) // Renamed from: USE2 Notify (\_SB.PWRB, 0x02) Notify (\_SB.PCI0.HDEF, 0x02) Notify (\_SB.PCI0.IGBE, 0x02) } Oh, and do you really need the _DSM Method in the UHCn (former USBn) devices? If not, remove them. Link to comment Share on other sites More sharing options...
keeza Posted October 19, 2009 Share Posted October 19, 2009 With these modifications I have no more problems with sleep.usbtest2.dsl.zip Ehci modifications make ehci ports show up as internal, otherwise they are shown as expansion slots which seems to kill power to usb during sleep.Uhci device modifications give wake up by usb. I can verify that the original additions to EHCI and UHCI ports made them show up as expansion slots and thus the device removal error returned on wake. mm67's alterations makes them show as built in and thus error is fixed. With these additions though, wake up from usb keyboard and mouse is not possible for me as they are connected to my cinema display's usb hub. It would be nice if that could be addressed at some point. Wake works fine though when connected to the mobo. MC, Is it possible to get Audio working for ALC889A using just dsdt and no legacy kexts? We get various results when using different kexts, not all sound prefs are available, have tried different combo's. I am yet not aware of a perfectly working audio solution for our boards. I'm thinking that there must be a way for audio to be fully functional via dsdt and vanilla AppleHDA. The King posted a tutorial on audio but its still incomplete. Link here Sorry if I've hijacked the thread but it looks as if the USB fix has been nailed thanks to the good work here by yourself and others. Link to comment Share on other sites More sharing options...
mm67 Posted October 19, 2009 Share Posted October 19, 2009 1) It works without the device_type bits in _DSM. 2) Doesn't help, still doesn't work. 3) Sleep doesn't seem to work for me at the moment no. Monitor turns off, computer stops gets quiet, but not totally silent, so it's not turned off completely. Oh, and doesn't wake from mouse/kb/PWRB. 4) Restart/shutdown without OpenHaltRestart.kext <- have to check this one out, brb. I've attached my current DSDT for your viewing pleasure. As I said there are 6+1 UHCI devices on ICH10, your dsdt is missing the +1. If I leave that out I get exactly the same symptoms. Take a look at my dsdt, it is the device called US31. And I can confirm that the device type bits are not necessary. Link to comment Share on other sites More sharing options...
Master Chief Posted October 19, 2009 Share Posted October 19, 2009 As I said there are 6+1 UHCI devices on ICH10, your dsdt is missing the +1. If I leave that out I get exactly the same symptoms. Take a look at my dsdt, it is the device called US31. You may want to re-read the Intel datasheet again, and then please pay attention to the following section: "Port-Routing Logic" (see attachments) because the default EHCI setup is "Six and Six" where the extra port, configured at BIOS post, is only used in the "Eight and Four" setup. You must have missed this text: "D26:F2 can be configured as D29:F3 during BIOS Post." In short: You can remove that port from your DSDT when in the "Six and Six" configuration, which is again the default setup. Do you perhaps have some kind of BIOS setting for this? And I can confirm that the device type bits are not necessary. Thank you for this confirmation. I sort of knew this already, but I like you people to confirm it for me. I can verify that the original additions to EHCI and UHCI ports made them show up as expansion slots and thus the device removal error returned on wake. EHCI only. UHCI is fine. With these additions though, wake up from usb keyboard and mouse is not possible for me as they are connected to my cinema display's usb hub. It would be nice if that could be addressed at some point. Wake works fine though when connected to the mobo. Which to me basically means that we are not done, yet. And audio fixes will have to wait for now, or things will get out of control rapidly. Link to comment Share on other sites More sharing options...
William Parker Posted October 19, 2009 Share Posted October 19, 2009 @ Master Chief I need help regarding how to enter 0xfe into keyboard controller (port 64) if that will help get rid of OpenHaltRestart. Really appreciate your good work here. Thank you very much Link to comment Share on other sites More sharing options...
mm67 Posted October 19, 2009 Share Posted October 19, 2009 You may want to re-read the Intel datasheet again, and then please pay attention to the following section: "Port-Routing Logic" (see attachments) because the default EHCI setup is "Six and Six" where the extra port, configured at BIOS port, is only used in the "Eight and Four" setup. You must have missed this text: "D26:F2 can be configured as D29:F3 during BIOS Post." In short: You can remove that port from your DSDT when in the "Six and Six" configuration, which is again the default setup. Do you perhaps have some kind of BIOS setting for this? You are right, I have no idea where that US31 came from, must have done a copy/paste from someone's dsdt since I don't have that device in my original acpidumps. It was using the address of UHC4 so everything looked like it was working. Here is a version with correct addresses. usbtest.dsl.zip Link to comment Share on other sites More sharing options...
iSoprano Posted October 19, 2009 Author Share Posted October 19, 2009 As I said there are 6+1 UHCI devices on ICH10, your dsdt is missing the +1. If I leave that out I get exactly the same symptoms. Take a look at my dsdt, it is the device called US31. And I can confirm that the device type bits are not necessary. Eureka, I've sleep...and most important of all, my rig runs around 40c with vanilla speedstepping. @mm67, can you check your temperature and do the AppleLPC trick, which is to add one of Apple's default device ID into DSDT. This makes CST info appear in IO register. AFter that do check your temperature again. For me, atleast, I either used to get low temp speedstep with out sleep or high temp speedstep with sleep. Obviously, this thread helped me in getting low temp with sleep. Many thanks to Master Chief and all the people who contributed. @Master Chief, looking forward to having vanilla restart and shutdown without any OpenHaltRestart kext. I have shutdown without the kext but restart isn't working without the kext attachment removed...please see first post for attachment Link to comment Share on other sites More sharing options...
xopher Posted October 19, 2009 Share Posted October 19, 2009 As I said there are 6+1 UHCI devices on ICH10, your dsdt is missing the +1. If I leave that out I get exactly the same symptoms. Take a look at my dsdt, it is the device called US31. And I can confirm that the device type bits are not necessary. I added the Device (US31), but no effect. I wasn't actually running the AppleCPUPM.kext earlier, for some reason, and I had forgot to edit HPET, so when I booted with -f, I got a KP. That's fixed now, I have working p-states again, not just min and max. Sleep also works, but wakeup by mouse/keyboard doesn't yet. Oh, and my temperatures are back to the non-disabler-normal. Ie 8-10c higher than before. Is there a fix for this already? @ MasterChief, I actually noticed this after I was trying to restart without the OpenHalt-kext, it didn't get unloaded at all first. So thanks ;-) Haven't tried it now that I got everything running again, I'll do that now and report back to you in a bit. Edit: Doesn't work w/o OpenHaltRestart.kext I've attached my latest DSDT as for now, sans the US31. DSDT_rc5.txt Link to comment Share on other sites More sharing options...
xopher Posted October 19, 2009 Share Posted October 19, 2009 Your right, I have no idea where that US31 came from, must have done a copy/paste from someone's dsdt since I don't have that device in my original acpidumps. It was using the address of UHC4 so everything looked like it was working.Here is a version with correct addresses. usbtest.dsl.zip I think you forgot to remove "Notify (\_SB.PWRB, 0x02)", on line 593. Just comparing differences, and it caught my eye. On a second note: Added a fix to make SATA drives be recognized as built-in, which allows you to remove IOACHIBlockStorageInjector.kext. TIP: Search for "Device (PRIM)" and then scroll up just a bit. You should see the code "FAS0, FAS1" etc. just above that. Right after the closing curly brace, copy and paste in the code in bold: FAS0, 2, FAS1, 2 } [b] Method (_DSM, 4, NotSerialized) { Store (Package (0x02) { "device-id", Buffer (0x04) { 0x81, 0x26, 0x00, 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) }[/b] Device (PRIM) { Name (_ADR, Zero) Method (_GTM, 0, NotSerialized) Source: http://efixusers.com/showpost.php?p=2478&postcount=6 There are two Device (PRIM)'s in my DSDT, one for IDE1 and one for IDE2, I added the code to both of them, even though it works just fine when added to just IDE1, thought on this? Hey, and it works! :-) 1 Link to comment Share on other sites More sharing options...
mm67 Posted October 19, 2009 Share Posted October 19, 2009 Eureka, I've sleep...and most important of all, my rig runs around 40c with vanilla speedstepping. @mm67, can you check your temperature and do the AppleLPC trick, which is to add one of Apple's default device ID into DSDT. This makes CST info appear in IO register. AFter that do check your temperature again. For me, atleast, I either used to get low temp speedstep with out sleep or high temp speedstep with sleep. Obviously, this thread helped me in getting low temp with sleep. Many thanks to Master Chief and all the people who contributed. @Master Chief, looking forward to having vanilla restart and shutdown without any OpenHaltRestart kext. I have shutdown without the kext but restart isn't working without the kext attachment removed...please see first post for attachment No need to mess with device-id on my board, it's correct as default. Link to comment Share on other sites More sharing options...
xopher Posted October 19, 2009 Share Posted October 19, 2009 No need to mess with device-id on my board, it's correct as default. Do you have CST-info in IOReg? Because I was just going to ask how to get it appear there. :-) Link to comment Share on other sites More sharing options...
mm67 Posted October 19, 2009 Share Posted October 19, 2009 Do you have CST-info in IOReg? Because I was just going to ask how to get it appear there. :-) Yes I do. Do you have AppleLPC loading like this ? Link to comment Share on other sites More sharing options...
xopher Posted October 19, 2009 Share Posted October 19, 2009 Yes I do. Do you have AppleLPC loading like this ? Nope, AppleLPC doesn't load for me. Do I need to edit DSDT to enable it somehow? What kind of temps are you getting mm67? Link to comment Share on other sites More sharing options...
Beerkex'd Posted October 19, 2009 Share Posted October 19, 2009 You need to patch the device ID of your LPC device in the DSDT so that it matches one of the device IDs in AppleLPC.kext. I don't know how important it is but guess it's safest to pick the device ID that is closest to your real one. Here's how to patch device IDs via DSDT: http://www.insanelymac.com/forum/index.php?showtopic=168014 If you can't find your LPC device in the DSDT (Gigabyte calls it "PX40" I think?) use lspci to look up what address it has, and then search the DSDT for it by address. Sometimes it can help to look at other people's DSDT and see how they did it, even if they don't have the same hardware as you. Link to comment Share on other sites More sharing options...
xopher Posted October 19, 2009 Share Posted October 19, 2009 You need to patch the device ID of your LPC device in the DSDT so that it matches one of the device IDs in AppleLPC.kext.I don't know how important it is but guess it's safest to pick the device ID that is closest to your real one. Here's how to patch device IDs via DSDT: http://www.insanelymac.com/forum/index.php?showtopic=168014 If you can't find your LPC device in the DSDT (Gigabyte calls it "PX40" I think?) use lspci to look up what address it has, and then search the DSDT for it by address. Sometimes it can help to look at other people's DSDT and see how they did it, even if they don't have the same hardware as you. Alright, got it working, temps seem a bit lowered as well, not quite at the Disabler.kext levels yet though(?). Next up SBUS? <offtopic>Oh, and what does this mean? Why don't I have min_freq defined here? $ sysctl -a | grep freqhw.busfrequency = 1332000000 hw.cpufrequency = 2666000000 hw.tbfrequency = 1000000000 hw.busfrequency: 1332000000 hw.busfrequency_min: 1332000000 hw.busfrequency_max: 1332000000 hw.cpufrequency: 2666000000 hw.cpufrequency_min: 2666000000 hw.cpufrequency_max: 2666000000 hw.tbfrequency: 1000000000 </offtopic> Link to comment Share on other sites More sharing options...
Beerkex'd Posted October 19, 2009 Share Posted October 19, 2009 It doesn't show the minimum bus and CPU frequencies here either (smbios injection issue maybe?) but P- and C-states are working. hw.busfrequency = 1332000000 hw.cpufrequency = 3166000000 hw.tbfrequency = 1000000000 hw.busfrequency: 1332000000 hw.busfrequency_min: 1332000000 hw.busfrequency_max: 1332000000 hw.cpufrequency: 3166000000 hw.cpufrequency_min: 3166000000 hw.cpufrequency_max: 3166000000 hw.tbfrequency: 1000000000 When doing the SBUS, check if you really need to patch the device ID like Master Chief has done - I didn't need to. Check the device ID of your SMBus controller with lspci. Don't forget to grab his LegacyACPI_SMC_PP.kext - if you're not using MacPro3,1 or MacPro4,1 as model identifier (see post below) go through the plist and change all instances of "P5K PRO" so that it matches yours (for example, I replaced all instances of "P5K PRO" with iMac9,1 which is the model identifer I use). Here's all my stuff.. not Gigabyte but it may still be useful to you as a reference: http://www.insanelymac.com/forum/index.php...p;#entry1297946 http://www.insanelymac.com/forum/index.php...t&p=1299409 Link to comment Share on other sites More sharing options...
Master Chief Posted October 19, 2009 Share Posted October 19, 2009 I want you guys&gals to remove (comment out first if you like) the device_id bits of Method _DSM in all Device (UHCn) then tell me which board you have (ICH9 or ICH10) and if it works for you, or not of course. After that I want another go with the EHCI/UHCI devices, simply because this is what Apple (MacPro3,1) expects to find: EHCI: pci8086,293a UHCI: pci8086,293c Try these (the last parts only/in reverse order of course) plus my extra bits in _DSM() I first want to finish this part before attacking something else, and since we're not done yet... go test it for me! Thanks. <snip /> When doing the SBUS, check if you really need to patch the device ID like Master Chief has done - I didn't need to. Check the device ID of your SMBus controller with lspci. Don't forget to grab his LegacyACPI_SMC_PP.kext - go through the plist and change all instances of the model identifer (Master Chief uses P5K PRO) so that it matches yours. The latest incarnation should work with: P5K PRO, MacPro3,1 and MacPro4,1 Available in the P5K PRO Snow Leopard thread. Link to comment Share on other sites More sharing options...
mm67 Posted October 19, 2009 Share Posted October 19, 2009 I want you guys&gals to remove (comment out first if you like) the device_id bits of Method _DSM in all Device (UHCn) then tell me which board you have (ICH9 or ICH10) and if it works for you, or not of course. After that I want another go with the EHCI/UHCI devices, simply because this is what Apple (MacPro3,1) expects to find: EHCI: pci8086,293a UHCI: pci8086,293c Try these (the last parts only/in reverse order of course) plus my extra bits in _DSM() You mean like this ? usbtest3.dsl.zip ICH10 and works. Link to comment Share on other sites More sharing options...
Master Chief Posted October 19, 2009 Share Posted October 19, 2009 You mean like this ?usbtest3.dsl.zip ICH10 and works. Fine. And what about removing "AAPL,clock-id" and using the other "AAPL..." items? That also works for you? Edit: You don't seem to have a working SBUS/EC Device combo. And that might explain why I don't need the extra bits. Could you please rename... what was it PX43 (?) to SBUS and make it work by adding the missing parts? And don't forget device EC ok I'm aware that it requires more of your free time, but it might help other GB owners a lot! Link to comment Share on other sites More sharing options...
mm67 Posted October 19, 2009 Share Posted October 19, 2009 Fine. And what about removing "AAPL,clock-id" and using the other "AAPL..." items? That also works for you? Removing AAPL,clock-id causes ehci ports to show up as expansion slots. Link to comment Share on other sites More sharing options...
William Parker Posted October 19, 2009 Share Posted October 19, 2009 Fine. And what about removing "AAPL,clock-id" and using the other "AAPL..." items? That also works for you? Hi, Been following this with identical results, down up to this post. I still am unable to wake from my Apple keyboard. Any suggestions please? Link to comment Share on other sites More sharing options...
Master Chief Posted October 19, 2009 Share Posted October 19, 2009 Hi,Been following this with identical results, down up to this post. I still am unable to wake from my Apple keyboard. Any suggestions please? So where's my crystal ball? Yes, your dsdt please! p.s. Don't you have a Device (SBUS) yet? Then please add/fix it first. Link to comment Share on other sites More sharing options...
keeza Posted October 20, 2009 Share Posted October 20, 2009 I think you forgot to remove "Notify (\_SB.PWRB, 0x02)", on line 593. Just comparing differences, and it caught my eye. On a second note: Added a fix to make SATA drives be recognized as built-in, which allows you to remove IOACHIBlockStorageInjector.kext. TIP: Search for "Device (PRIM)" and then scroll up just a bit. You should see the code "FAS0, FAS1" etc. just above that. Right after the closing curly brace, copy and paste in the code in bold: FAS0, 2, FAS1, 2 } [b] Method (_DSM, 4, NotSerialized) { Store (Package (0x02) { "device-id", Buffer (0x04) { 0x81, 0x26, 0x00, 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) }[/b] Device (PRIM) { Name (_ADR, Zero) Method (_GTM, 0, NotSerialized) Source: http://efixusers.com/showpost.php?p=2478&postcount=6 There are two Device (PRIM)'s in my DSDT, one for IDE1 and one for IDE2, I added the code to both of them, even though it works just fine when added to just IDE1, thought on this? Hey, and it works! :-) Great, works for me too! Thanks for sharing here. You mean like this ? usbtest3.dsl.zip ICH10 and works. Same results for me. Trying now to work out why my cinema display is giving me trouble.... USB_fix_vs_2_copy.dsl.zip Link to comment Share on other sites More sharing options...
xopher Posted October 20, 2009 Share Posted October 20, 2009 Ok, I'm in need of more specific information on how to add SBUS and EC to my DSDT. Anybody care to write a miniguide on the subject? :-) Oh, and including what the kext's that are floating around do (LegacyACPI_SMC_PP.kext, LegacyAGPM.kext). Thanks. Btw, I lost my headphone autodetection, any thoughts on the cause? At the moment I don't have working sleep, and the headphone thing. Otherwise everything is working as it should, except the missing SBUS etc of course. Here's my DSDT for debugging: DSDT_rc5.31.dsl.zip Link to comment Share on other sites More sharing options...
Recommended Posts