valv Posted July 1, 2010 Author Share Posted July 1, 2010 @JBraddock, Looking at your RTC section, it seems to be ok. From this side don't worry. To complement your great feedback, and regarding how to gracefully shut the system down on low battery, I 'd suggest this script from nofearl. I think it can be slightly modified to go hibernate instead of shutdown. Greetz Link to comment Share on other sites More sharing options...
manmal Posted July 1, 2010 Share Posted July 1, 2010 @Manmal, I don't have that strange usb thing but there is a WMware related usb reference in my IORegistryExplorer results. I am that sure if that may cause a problem. I typed the command you suggested and only error message I found is this * Domain: sleep - Message: Sleep: Platform Failure - AC - Time: 24/06/2010 23:42:28 EEST - Signature: Platform Failure - UUID: C3F41D49-5B5E-40ED-ABF7-E1AC4D308DC1 - Result: Failure Apparently, since I was able to resume the sleep (hibernation) all my sleep attempts are being reported as "Success" Other than that, i have this message "applicationresponse.slowresponse", to my knowledge, which suggest that sleeping process takes longer than expected. In the signature line; related to this message, either I have mDNSResponder, AirPort configd plug-in or IPConfiguration. Any idea based on this report? Update: I found this post, which claims that this "Platform Failure - AC" error is related to RTC hack. I didn't apply that hack since I wasn't sure how to change my RTC value By the way, Manmal, I suggest you take a look at my other post, which attempts to explain your second question. Just take a look at the quoted articles. You may find them useful in that regards. Also there are application to chose if you want to hibernate or sleep. http://www.insanelymac.com/forum/index.php...t&p=1501414 Very interesting reading, thanks JBraddock! In my case it should be the "3" or "7" mode (that goes to hibernate when battery goes down). Do you know if we have "secure virtual memory" on our HDX lappy (so that we can enable mode7)? Thanks! Mal Link to comment Share on other sites More sharing options...
JBraddock Posted July 1, 2010 Share Posted July 1, 2010 @JBraddock, Looking at your RTC section, it seems to be ok. From this side don't worry. Then I don't have to change BUF1 to BUF0. Fine. I think I should wait until the speed step process is completed. After that ,I think, it will be much easier and logical to try to fix sleep. Very interesting reading, thanks JBraddock! In my case it should be the "3" or "7" mode (that goes to hibernate when battery goes down). Do you know if we have "secure virtual memory" on our HDX lappy (so that we can enable mode7)? Thanks! Mal Yes we have. Just check out System Preferences > Security. It should be checked by default. I tried 7 and 3 and hibernation was successful with either of them. Just give it a try and see what happens. Regarding hibernation, did you try to use the latest version of AnVal bootloader alognside with a boot.plist file updated according to Valv's. Before updating my boot.plist file according to Valv's, the latest version couldn't resume hibernation. Link to comment Share on other sites More sharing options...
manmal Posted July 1, 2010 Share Posted July 1, 2010 @Manmal, Update: I found this post, which claims that this "Platform Failure - AC" error is related to RTC hack. I didn't apply that hack since I wasn't sure how to change my RTC value You are right ... i changed RTC , now i remember that! It was one of my first fixes, before valv's ones! I changed radically the one present in dsdt ad have put a "more compatible" mode for RTC. I am sure that if you follow RTC fix by valv will solve it too and perhaps more safe too! Dunno if i will have some problems with my modification, since it's so different from original one. I don't suggest to do it since it may damage your computer. I have put this section in my dsdt : Device (RTC) { Name (_HID, EisaId ("PNP0B00")) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0070, // Range Minimum 0x0070, // Range Maximum 0x01, // Alignment 0x02, // Length ) }) } I repeat it again! I don't know if it's safe or not ... here it always worked. I dunno which kind of probs / risk / damage it may give to you! By the way, Manmal, I suggest you take a look at my other post, which attempts to explain your second question. Just take a look at the quoted articles. You may find them useful in that regards.Also there are application to chose if you want to hibernate or sleep. http://www.insanelymac.com/forum/index.php...t&p=1501414 Very interesting reading, thanks JBraddock! UPDATE! Sorry! I missed one post! I didn't think you answered so quickly!! Thanks JBraddock & Valv!! I will keep you informed if i will be able to enable hibernate again! Using latest beta of valv... Trying changing boot.plist (like valv's one in first posts here in this thread)! Thanks! Mal Link to comment Share on other sites More sharing options...
JBraddock Posted July 1, 2010 Share Posted July 1, 2010 You are right ... i changed RTC , now i remember that! It was one of my first fixes, before valv's ones! I changed radically the one present in dsdt ad have put a "more compatible" mode for RTC. I am sure that if you follow RTC fix by valv will solve it too and perhaps more safe too! Dunno if i will have some problems with my modification, since it's so different from original one. I don't suggest to do it since it may damage your computer. I have put this section in my dsdt : Device (RTC) { Name (_HID, EisaId ("PNP0B00")) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0070, // Range Minimum 0x0070, // Range Maximum 0x01, // Alignment 0x02, // Length ) }) } I repeat it again! I don't know if it's safe or not ... here it always worked. I dunno which kind of probs / risk / damage it may give to you! Very interesting reading, thanks JBraddock! In my case it should be the "3" or "7" mode (that goes to hibernate when battery goes down). Do you know if we have "secure virtual memory" on our HDX lappy (so that we can enable mode7)? Thanks! Mal Valv said my RTC section seems fine. May be in the future I could try something else. Please see my previos post as I already answered your last question. I guess you missed it By the way, how is your CPU doing with Voodoopower. I installed Coolbook and it shows that my cpu is floating between two values, one being the lowest and the other being the highest. So even if I open a text file it jumps to highest value. I am trying to find a temporary solution until I implement speed step as otherwise my cpu sees 70s easily Link to comment Share on other sites More sharing options...
manmal Posted July 1, 2010 Share Posted July 1, 2010 I confirm that hibernate does not resume here. It gives me an error "uncheck security..." at startup and it boots normally without resuming. I am using the same boot.plist as valv's first posts. I tried also smartsleep prefpane and it always gives the same problem : it does not resume from hibernate. Here sleep works nicely closing the lid (with LidSleep, not with dsdt mod ... at least it doesn't sleep when connected to acpower using dsdt fix only, LidSleep does the trick here of closing lid both with acpower and battery). About such batterysave script, where can i change "hibernate" instead of "shutdown" ? I hope i can fix it... Mal Link to comment Share on other sites More sharing options...
JBraddock Posted July 1, 2010 Share Posted July 1, 2010 @Manmal, If you set your hibernation mode to 3, did you uncheck "secure virtual memory" under system preferences. It may not be related but if the above one is not the case, could you also try by unchecking "require password....after sleep etc." under System Preferences. It seems to me that your problem is not related to dsdt or bootloader but something else. Link to comment Share on other sites More sharing options...
JBraddock Posted July 1, 2010 Share Posted July 1, 2010 Guys, I think I found why the sound is not working after sleep. The problem is not related to AppleHDA.kext or DSDT hack that we use. The problem is that LegacyAppleHDA.kext that we are using does not include some additional keys and values. i.e LineIn, MuteGPIO etc. I am trying to figure out how to add these values. I am pretty sure that we'll fix this. I am over it In the meantime, I am trying to fix two error messages in the log file related to AppleHDA. @Valv, could you please help me with the following code. I need to change Store (Package (0x0A) value (this value:0x0A) to correct value otherwise the dsl won't compile as it says|: Initializer list longer than declared package length ^. I tried to give high number and although it compiled, some information disappeared under IORegister Explorer. Like, layout id. Device (HDEF) { Name (_ADR, 0x001B0000) Method (_PRW, 0, NotSerialized) { Return (Package (0x02) { 0x0D, 0x05 }) } Method (_DSM, 4, NotSerialized) { Store (Package (0x0A) { "built-in", Buffer (One) { 0x00 }, "subsystem-id", Buffer (0x04) { 0x1B, 0x36, 0x00, 0x00 }, "subsystem-vendor-id", Buffer (0x04) { 0x3C, 0x10, 0x00, 0x00 }, "codec-id", Buffer (0x04) { 0xB2, 0x76, 0x1D, 0x11 }, "layout-id", Buffer (0x04) { 0x0C, 0x00, 0x00, 0x00 }, "device-type", Buffer (0x10) { "IDT 92HD71B7" }, "PinConfigurations", Buffer (Zero) {} }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } } @Manmal, could you tell me please, when you say sound is not working after sleep, is the volume icon is grayed out or is it just that you can't get the sound. Also, could you please report me if - the mic is working after sleep - when you look at the sound preferences do you see that audio input is switched to the other one. - when you plug in an external speaker, how is sound doing. Thanks for your time. Link to comment Share on other sites More sharing options...
manmal Posted July 2, 2010 Share Posted July 2, 2010 Guys, I think I found why the sound is not working after sleep. The problem is not related to AppleHDA.kext or DSDT hack that we use. The problem is that LegacyAppleHDA.kext that we are using does not include some additional keys and values. i.e LineIn, MuteGPIO etc. I am trying to figure out how to add these values. I am pretty sure that we'll fix this. I am over it I don't think it's the problem because i also tried a patched AppleHDA without any LegacyAppleHDA that works like a charm but it doesn't work after sleep too. I guess it's an IRQ problem IMHO... but i may be wrong. @Manmal, could you tell me please, when you say sound is not working after sleep, is the volume icon is grayed out or is it just that you can't get the sound.Also, could you please report me if - the mic is working after sleep - when you look at the sound preferences do you see that audio input is switched to the other one. - when you plug in an external speaker, how is sound doing. Thanks for your time. The volume icon is normal, NOT gray; it is "supposed" to work, volume goes up and down, just sound does not exist (both external speakers/headphones, internal speakers), mic doesn't work, i don't see any audio input switched. All is like i left, just there isn't any sound until reboot. Hope this helps... BTW... In the meanwhile hibernate works again! I have to use hibernate mode 5 , other modes does not work for hibernate. But, Unfortunately, i don't have what i am expecting : in fact mode 7 doesn't work as expected to work (going to sleep until battery is high and going to hibernate when battery is low). To test it, I tried to put it to sleep closing lid and then, when in sleep, i removed battery to see if it can resume from hibernate file (that seems to be created before going to sleep since hd is blinking a lot before going to sleep) and it gives me the error "sleepimage is too old... error..." etc and it starts a regular boot. I may use batterysave script valv gave us but i cannot find any hibernate command to replace the shutdown command. Perhaps i should give the terminal command instead of shutdown: pmset -a hibernatemode 5 (the only mode that works here for hibernating), then force the system to sleep instead shutdown, but i didnt find any command for that too... anyone? Thanks in advance! Mal Link to comment Share on other sites More sharing options...
JBraddock Posted July 2, 2010 Share Posted July 2, 2010 I don't think it's the problem because i also tried a patched AppleHDA without any LegacyAppleHDA that works like a charm but it doesn't work after sleep too. I guess it's an IRQ problem IMHO... but i may be wrong. The volume icon is normal, NOT gray; it is "supposed" to work, volume goes up and down, just sound does not exist (both external speakers/headphones, internal speakers), mic doesn't work, i don't see any audio input switched. All is like i left, just there isn't any sound until reboot. Hope this helps... BTW... In the meanwhile hibernate works again! I have to use hibernate mode 5 , other modes does not work for hibernate. But, Unfortunately, i don't have what i am expecting : in fact mode 7 doesn't work as expected to work (going to sleep until battery is high and going to hibernate when battery is low). To test it, I tried to put it to sleep closing lid and then, when in sleep, i removed battery to see if it can resume from hibernate file (that seems to be created before going to sleep since hd is blinking a lot before going to sleep) and it gives me the error "sleepimage is too old... error..." etc and it starts a regular boot. I may use batterysave script valv gave us but i cannot find any hibernate command to replace the shutdown command. Perhaps i should give the terminal command instead of shutdown: pmset -a hibernatemode 5 (the only mode that works here for hibernating), then force the system to sleep instead shutdown, but i didnt find any command for that too... anyone? Thanks in advance! Mal Manmal, can you please post the patched AppleHDA file. When you look at that file, I am pretty sure that you will notice that there are some parts missing. To my knowledge, the problem is that when you wake after sleep, the audio input is switched to something else and that's why you can't get the sound while everything seems fine. May be I am wrong but let's hope I am right. Regarding the hibernation, today I read somewhere that a Hackintosh cannot do real hibernation but I see that happening and I think it's pretty real I think everybody has its own weird problem as I have this sleeping beautifully but not waking up thing I have also that error message and I don't know how to get rid of it. Link to comment Share on other sites More sharing options...
manmal Posted July 2, 2010 Share Posted July 2, 2010 Manmal, can you please post the patched AppleHDA file. When you look at that file, I am pretty sure that you will notice that there are some parts missing. To my knowledge, the problem is that when you wake after sleep, the audio input is switched to something else and that's why you can't get the sound while everything seems fine. May be I am wrong but let's hope I am right. The link is inside this thread (thanks to rachaf!) here it is : http://www.insanelymac.com/forum/index.php...5233&st=47# Regarding the hibernation, today I read somewhere that a Hackintosh cannot do real hibernation but I see that happening and I think it's pretty real I think everybody has its own weird problem as I have this sleeping beautifully but not waking up thing I have also that error message and I don't know how to get rid of it. I am trying to modify batterysave (Thanks to nofearl for it!) The original is : #!/bin/sh batterystatus='100' until [ $batterystatus -lt 3 ]; do sleep 120 batterystatus=$((`/usr/bin/pmset -g batt | grep Internal | awk '{ print $2 }' | awk -F % '{ print $1 }'`)) done shutdown -h now and i modified it in this way : #!/bin/sh batterystatus='100' until [ $batterystatus -lt 5 ]; do pmset -a hibernatemode 0 sleep 120 batterystatus=$((`/usr/bin/pmset -g batt | grep Internal | awk '{ print $2 }' | awk -F % '{ print $1 }'`)) done pmset -a hibernatemode 5 In this script hibernatemode is set to 0 while battery is more than 5% (quick sleep mode); if battery meter is less than 5%, then hibernatemode switches to 5 . I just have to close lid and it goes to hibernation instead of sleep. The next step is to automatically put the system into sleep(=hibernate if battery <=5%) with a command. So I miss a command to put / force the computer going to sleep. In this way i have what i nee. Does anyone has a solution for it ? Please let me know! Thanks! Mal Link to comment Share on other sites More sharing options...
suri2001 Posted July 3, 2010 Share Posted July 3, 2010 Hi valv, did you have the time to make advancements to my dsdt yet? or do you still need more info? Please let me know! :-) thanx suri Link to comment Share on other sites More sharing options...
valv Posted July 3, 2010 Author Share Posted July 3, 2010 Solved hibernate/sleep! If u want to go to sleep use this: pmset -a hibernatemode 0 If u prefer to hibernate type this: pmset -a hibernatemode 3 These modes were tested and working on a freshly installed retail distribution. Greets Link to comment Share on other sites More sharing options...
JBraddock Posted July 4, 2010 Share Posted July 4, 2010 Solved hibernate/sleep!If u want to go to sleep use this: pmset -a hibernatemode 0 If u prefer to hibernate type this: pmset -a hibernatemode 3 These modes were tested and working on a freshly installed retail distribution. Greets pmset -a hibernatemode 0 I tried this and yes, it is working for me too. It sleeps and wakes up and yes, audio is not working but hey, it will be fixed. pmset -a hibernatemode 3 With this mode, it goes to sleep well but doesn't wake up with neither power button nor Lid. But it resumes the sleep after restarting. So it basically goes to hibernation afterwards. Other than this I noticed that if you set your hibarnation mode to 3, and if the laptop somehow goes to hibarnate, it resumes faster than it is set to "hibarnate mode to 1", which is the hibarnate only mode. For me, first thing to do is to identify the cause of "Platform Failure" message in system log regarding to sleep. @Valv, could you please take a look at my post in the previous page regarding the DSDT code for HDEF device, which hopefully will fix the sound assertion error of LegacyAppleHDA.kext. Link to comment Share on other sites More sharing options...
valv Posted July 4, 2010 Author Share Posted July 4, 2010 @Valv, could you please take a look at my post in the previous page regarding the DSDT code for HDEF device, which hopefully will fix the sound assertion error of LegacyAppleHDA.kext.Simply replace this Store (Package (0x0A) with Store (Package (0x0E)btw, If any of u guyz should be having same error showing again, for some other code, just take out the Package length like this Store (Package () Greetz I am trying to modify batterysave (Thanks to nofearl for it!) Maybe not in that way, take a look at these ones (untested): batterysleep.zipbatteryhibernate.zip Link to comment Share on other sites More sharing options...
manmal Posted July 4, 2010 Share Posted July 4, 2010 Maybe not in that way, take a look at these ones (untested):batterysleep.zipbatteryhibernate.zip I will give it a try! Thanks! Mal Link to comment Share on other sites More sharing options...
valv Posted July 4, 2010 Author Share Posted July 4, 2010 @JBraddock, link to legacyHDA not working anymore! Link to comment Share on other sites More sharing options...
JBraddock Posted July 4, 2010 Share Posted July 4, 2010 If you are using the DSDT code that I shared for a while ago, please update your code according to the one below as the new code will fix some "sound assertion " errors being appeared in the system log. If you are wonder, the problem with the LegacyAppleHDA.kext is that it doesn't include PCIVendor while the original AppleHDA.kext does, so we were having some errors because of this. But, please be aware that there are still some "sound assertion" to be fixed. We'll hopefully fix these errors once we managed to modify Pathmaps correctly according to the Node IDs. In addition to this, I also noticed that the ConfigData that comes with the LegacyAppleHDA.kext is not consistent with the one that I used while using Leopard and I simply assume that just because of this inconsistency we may not be able to use some features of the audio chipset. I don't know which one is the correct one. Please: If you guys have the same audio device that I have and have Windows 7 or Vista installed please dump the Config Data and share it here. I dumped it from Linux but the script that is used to create ConfigData is not working with my dump file so I have to do it manually. But if you are using Windows 7 or Vista please dump this data, which will save a lot of time for me. You can see the detail of how you can dump this data with Vista or Windows 7 on ProjectOsx Codec: IDT 92HD71B7X Address: 0 Function Id: 0x1 Vendor Id: 0x111d76b2 Subsystem Id: 0x103c361b Revision Id: 0x100302 Let's get back to the DSDT code. 1) Open your DSDT file and search for _L0D and add Notify (\_SB.PWRB, 0x02) to this code. You'll end up like this. Method (_L0D, 0, NotSerialized) { Notify (\_SB.PCI0.HDEF, 0x02) Notify (\_SB.PWRB, 0x02) } Now, search for Device (OVGA) and paste the code below right above Device (OVGA). Device (HDEF) { Name (_ADR, 0x001B0000) Method (_PRW, 0, NotSerialized) { Return (Package (0x02) { 0x0D, 0x05 }) } Method (_DSM, 4, NotSerialized) { Store (Package (0x0E) { "built-in", Buffer (One) { 0x01 }, "subsystem-id", Buffer (0x04) { 0x1B, 0x36, 0x00, 0x00 }, "subsystem-vendor-id", Buffer (0x04) { 0x3C, 0x10, 0x00, 0x00 }, "codec-id", Buffer (0x04) { 0xB2, 0x76, 0x1D, 0x11 }, "layout-id", Buffer (0x04) { 0x0C, 0x00, 0x00, 0x00 }, "device-type", Buffer (0x10) { "IDT 92HD71B7" }, "PinConfigurations", Buffer (Zero) {} }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } } IDT_92HD71B7_Apple_HDA_10.6.2.zip Download the files above and copy AppleHDA.kext to System/Library/Extensions. Copy LegacyAppleHDA.kext to Extra folder. Repair permission and restart. Don't put LegacyAppleHDA.kext to System/Library/Extensions as it will not work. @JBraddock,link to legacyHDA not working anymore! Yes, you are right. It was broken. Please download it from the above link. AppleHDA.kext is extracted from SL 10.6.2. I'll patch the the latest version of this file to work with our codec sometime this week. Link to comment Share on other sites More sharing options...
JBraddock Posted July 6, 2010 Share Posted July 6, 2010 @Valv, I have the same model set up, which is MacbookPro5.4. i wonder if I can install LegacyHDX18.kext as well. Is ACPI_SMC_PlatformPlugin parameters only for your CPU? The rest seems fine but I just need your confirmation for this particular entry. Link to comment Share on other sites More sharing options...
valv Posted July 7, 2010 Author Share Posted July 7, 2010 Is ACPI_SMC_PlatformPlugin parameters only for your CPU?which cpu do u have? Link to comment Share on other sites More sharing options...
JBraddock Posted July 7, 2010 Share Posted July 7, 2010 which cpu do u have? P8400, 2.26 GHZ. Edit: I checked the Wikipedia and it seems that this CPU is equivalent to a Mid 2009 13" Macbook, which has the model number of 5.3 - 5.5. Link to comment Share on other sites More sharing options...
manmal Posted July 11, 2010 Share Posted July 11, 2010 P8400, 2.26 GHZ. Edit: I checked the Wikipedia and it seems that this CPU is equivalent to a Mid 2009 13" Macbook, which has the model number of 5.3 - 5.5. JBraddock, did you if your sleep problem ? Did you latest dsdt mod for hdef works for you with applehda after resuming from sleep? Here it doesn't ... @valv when do you plan to update us with more fixes for our hdx18 beast? Thanks! Mal Link to comment Share on other sites More sharing options...
JBraddock Posted July 11, 2010 Share Posted July 11, 2010 JBraddock, did you if your sleep problem ? Did you latest dsdt mod for hdef works for you with applehda after resuming from sleep? Here it doesn't ... @valv when do you plan to update us with more fixes for our hdx18 beast? Thanks! Mal @Manmal, I think my sleep problem is related to ApplePS2Controller.kext. When I have a usb keyboard I will try to remove it and try again. I came across some HP users having the same problem. Apparently, ApplePS2Controller.kext is giving us a black screen on waking up. I don't know if the Voodoo's keyboard solution will work for me as it didn't work when using Leopard. Audio is not working after sleep and I don't think it is related to DSDT patch that we used. There are some nod ids missing in our LegacyAppleHDA.kext and we have to fix it, which I'll try if I can figure it out. Link to comment Share on other sites More sharing options...
valv Posted July 12, 2010 Author Share Posted July 12, 2010 hack of nVidia GeForce 9600M GT added Link to comment Share on other sites More sharing options...
JBraddock Posted July 12, 2010 Share Posted July 12, 2010 hack of nVidia GeForce 9600M GT added Thanks for this. I remember installing an injector by Netkas, which also enabled 9600M GT on Snow Leopard then I gave up using that injector and use the default graphic enabler feature of the Chameleon. While using that injector, I noticed that under Displays preference I have Rotation and Hertz option (cannot be changed). If I am not mistaken this was also the case with "About This Mac". I added the DSDT patch you added and there seems no difference and I would like to know if this is something really important in terms of the use of the graphic card. I have only Resolutions but nothing else. Is this also the case for you? I haven't tried this but if you did so, could please tell me with these hacks and fixes are we able to use external monitor, HDMI (I guess only video will work) and dual display? Additionally, recently I came across this post, which explains how to enable HDMI output (Sound) by patching DSDT. Since 9600M GT has a built-in audio chip, I just wonder if we can also apply this hack. Would you mind looking at this? Link to comment Share on other sites More sharing options...
Recommended Posts