cparm Posted December 19, 2009 Share Posted December 19, 2009 That's the bummer here so to say, you can't compile the dsl file, you can only decompile it to show you the contents of the file. So we will have to resort to editing the binary or aml file directly. You can do this with any decent hex editor. Personally I use Hex Editor Neo Free (Windows....). To take your example of editing the value for your PM2 address, look up the offset for PM2 in your DSL file and you'll see it's at offset 0x48 and 4 bytes in length. Open the AML file with a hexeditor go to offset 0x48 and change the bytes to 0x00, and save the file. Take a look at the 2 included pictures. Oh and good work you got it already ported to PC EFI! many thanks !!! my patched fadt.aml => PM2 Control Block Length changed from 01 to 00 i also changed PM2 Control Block : <Generic Address Structure> . . . Address : 0000000050040000 to PM2 Event Block : <Generic Address Structure> . . . Address : 0000000000000000 and those value (because we never know ???) C2 Latency changed from 005A to the original 0065 C3 Latency changed from 0384 to the original 03E9 Link to comment Share on other sites More sharing options...
sw170 Posted December 19, 2009 Share Posted December 19, 2009 1) Are the above three the only kexts you use in Exra?2) Is your CPU overclocked? ad1) yes, in fact, only two now - see Duvel300 post #871 ad2) slightly overclocked 9.5x333 (bios F12a) Hey guys, Back after a long absence…… Anyway I noticed still a lot of people have problems restarting their hack and are using some type of kext file to accomplish this. I solved this a while back.. And gooood you popped in ! works great here, thanks for sharing ! Link to comment Share on other sites More sharing options...
Master Chief Posted December 19, 2009 Share Posted December 19, 2009 I looked at the source code and noticed this line: DBG("File read and stored at: %x\n", kernelAddr); Now the question is: Do you see the same address being used over and over? Because that would mean that we can fix this in our DSDT. And I do have the reset register yet restart isn't working here. What happens when people here change "Reset Register Supported (V2) : 1" into 0 (by changing A5 04 into A5 00). Thanks. Link to comment Share on other sites More sharing options...
Duvel300 Posted December 19, 2009 Share Posted December 19, 2009 I looked at the source code and noticed this line: DBG("File read and stored at: %x\n", kernelAddr); Now the question is: Do you see the same address being used over and over? Because that would mean that we can fix this in our DSDT. And I do have the reset register yet restart isn't working here. What happens when people here change "Reset Register Supported (V2) : 1" into 0 (by changing A5 04 into A5 00). Thanks. It might look that it's using the same address each time, but it's definitely dynamic. The offset depends on several factors like the size of the boot loader (boot loader changes in size so will the offset, well in a 1024k boundary). Also the size of the DSDT and other factors will come in to play. If you are using your original FADT and are adding the reset registers to it make sure to update the length indicator in the header as well. EDIT: What I totally forgot to mention is that this will only work if you have a ACPI 1.0 table. (oops). I will see if I can update the source to include ACPI 2.0 as well. Link to comment Share on other sites More sharing options...
LeRebel Posted December 19, 2009 Share Posted December 19, 2009 Hi, I've been following this thread for some time (you guys are geniuses!) and I am using mm67's DSDT on a EP45T-UDR3LR with Q9550 - it works out of the box for me (just had to modify LPCB device ID so AppleLPC.kext loads). The reboot problems you are experiencing are interesting, and here is something that may be related to it. I have noticed that if I wake up my hack with Wake Up on Lan from another PC (magic IP packets), it resumes from sleep fine, however the next time the system sleeps, it will not wake again, and I have to press the power button causing a full boot, any ideas? This also occasionally happens when I resume from normal sleep/wake cycles from the mouse/keyboard. I have "start up automatically after a power failure" ticked in Energy preferences. Cheers. Link to comment Share on other sites More sharing options...
Master Chief Posted December 19, 2009 Share Posted December 19, 2009 It might look that it's using the same address each time, but it's definitely dynamic. The offset depends on several factors like the size of the boot loader (boot loader changes in size so will the offset, well in a 1024k boundary). Also the size of the DSDT and other factors will come in to play. If you are using your original FADT and are adding the reset registers to it make sure to update the length indicator in the header as well. What about (also) storing this address in a property, or somewhere else where the the DSDT can read it? BTW: I don't need to add anything because I already had the reset register in my factory table. I only changed the "Reset Register Supported (V2) : 0" into 1 by changing A5 00 into A5 04. That's all. EDIT: What I totally forgot to mention is that this will only work if you have a ACPI 1.0 table. (oops). I will see if I can update the source to include ACPI 2.0 as well. Thanks. But the problem I am having appears to be related to the 'new' graphics injection, because neither of the two files here work properly for me (NVIDIA kexts not initialized). Chameleon RC3 works fine here. Oh and the documentation is as usual, missing, and thus I have no idea what setting I might be missing or should change. Edit: Got it. Stupid typo in GraphicsEnabler. Can't see my changed value with IORegistryExplorer – because it wasn't patched for ACPI 2.0 Link to comment Share on other sites More sharing options...
sk1nhead Posted December 19, 2009 Share Posted December 19, 2009 many thanks !!! my patched fadt.aml => PM2 Control Block Length changed from 01 to 00 Thanks a lot Cparm for sharing your edited FADT, you did the editing and i just copy pasted it since we have the same PM2, C2 and C3 latency now another kext is gone from my Extra folder.. Thanks to Duvel300 too for sharing, hopefully a more noob friendly (for me) guide will be made in OSX. Link to comment Share on other sites More sharing options...
mitch_de Posted December 19, 2009 Share Posted December 19, 2009 My EP-35-DS3 has in orig. FADT Table (running an C2D 7300) [05Fh 0095 1] _CST Support : 00 [060h 0096 2] C2 Latency : 0065 [062h 0098 2] C3 Latency : 03E9 Master Chief Note: If you have something like this: CODE [05Fh 095 1] _CST Support : E3 // what means E3 ? Is that latency or an CST Config [060h 096 2] C2 Latency : 0065 [062h 098 2] C3 Latency : 03E9 Then you need to fix it. Just follow the provided link. and also [048h 0072 4] PM2 Control Block Address : 00000000 // if zeros than already OK? ( so i understand the postings here) [05Ah 0090 1] PM2 Control Block Length : 00 My dsdt.dsl looks like (for CSTATES) - i dont know if my Cstates are working, but Pstates working sure also native (with AppleIntelCPU..) // Added from[b] MasterChief's DSDT v3.1[/b] [size=1]Method (_PSD, 0, NotSerialized) { Return (Package (0x05) { 0x05, 0x00, 0x00, 0xFC, // Double-checked the 0xFC value with ACPISpec v4.0 pdf 0x04 // Number of Processors }) } Method (_CST, 0, NotSerialized) { Return (Package () { 0x03, // 0x03 Number of C-State packages: 3 (C1, C2 and C3). Package (0x04) {........, One, One, 0x03E8}, [b]// C1 Latency[/b] Package (0x04) {......., 0x02, 0x64, 0x01F4}, [b]// C2 Latency (no more than 100)[/b] Package (0x04) {......., 0x03, 0x03E8, 0xFA} [b]// C3 Latency (no more than 1000)[/b] }) } }[/size] Does that need changes (for my understanding od lastest postings : NO) ? If changes needed, what exact ? Link to comment Share on other sites More sharing options...
cparm Posted December 19, 2009 Share Posted December 19, 2009 EDIT: What I totally forgot to mention is that this will only work if you have a ACPI 1.0 table this means this trick will work with all Gigabyte boards, since all GA boards use acpi 1.0 Link to comment Share on other sites More sharing options...
Master Chief Posted December 19, 2009 Share Posted December 19, 2009 this means this trick will work with all Gigabyte boards, since all GA boards use acpi 1.0 For now yes – because the code in if (version) {} wasn't patched, but ACPI 2.0 can be expected soon. Either from him or me. Link to comment Share on other sites More sharing options...
kdawg Posted December 19, 2009 Share Posted December 19, 2009 brilliant now, no kext are needed to reboot neither to shutdown/sleep excellent work, only question : can you explain how to patch the fadt.aml, i have a P35 and the PM2 address is 0000000000000000 or how to recompile our own facp table, iasl gives me errors (even if i don't edit the dsl file) : ps: i have recompiled PC_EFI 10.5 with your patch, since chameleon Rc4 gives me an error with system profiler in the sata section : "no device found" ??? with the patched pc_efi all work like a charm => LOVE IT!!!! Works here too using cparm's PC EFI bootloader. Link to comment Share on other sites More sharing options...
sk1nhead Posted December 19, 2009 Share Posted December 19, 2009 Thanks a lot Cparm for sharing your edited FADT, you did the editing and i just copy pasted it since we have the same PM2, C2 and C3 latency now another kext is gone from my Extra folder.. Thanks to Duvel300 too for sharing, hopefully a more noob friendly (for me) guide will be made in OSX. I spoke too soon! PROBLEM: when using cparm's FADT.aml and Duvel300 RC4 boot, wake from aluminum keyboard is not working? shutdown and YES automatic sleep seems to be working too (not on time though but it works).. tested it a few times already but didn't tried cparm's PC EFI boot yet since my UUID error 35 will be back.. any ideas? kext in Extra are fakesmc2.5, alc883 by voyn1x and VoodooMonitor. edit: deauthorize my 2 iTunes account just to be sure and tested cparm's PC EFI - restart works as expected but wake from aluminum keyboard also wont work, the same as Duvels RC4.. paging mm67? Link to comment Share on other sites More sharing options...
FKA Posted December 19, 2009 Share Posted December 19, 2009 Did you specify your UUID as a kernel flag in your com.apple.boot.plist? Like so: <key>Kernel Flags</key> <string>arch=i386 boot-uuid=6BC6A3B2-DDA3-3CED-88CF-44E38C66F473</string> <key>Default Partition</key> <string>hd(1,2)</string> I have UUID as Kf yes. brilliant now, no kext are needed to reboot neither to shutdown/sleep excellent work, only question : can you explain how to patch the fadt.aml, i have a P35 and the PM2 address is 0000000000000000 or how to recompile our own facp table, iasl gives me errors (even if i don't edit the dsl file) : /Users/cparm/Desktop/facp.dsl 12: [000 Error 4096 - ^ Invalid character (0x5B), expecting ASL keyword or name /Users/cparm/Desktop/facp.dsl 12: [000 Error 4096 - ^ syntax error, unexpected PARSEOP_INTEGER, expecting PARSEOP_DEFINITIONBLOCK ps: i have recompiled PC_EFI 10.5 with your patch, since chameleon Rc4 gives me an error with system profiler in the sata section : "no device found" ??? with the patched pc_efi all work like a charm => Oh you guys! Visiting family in Liverpool this weekend but cant wait to give this a pop. D. Link to comment Share on other sites More sharing options...
kdawg Posted December 19, 2009 Share Posted December 19, 2009 What about (also) storing this address in a property, or somewhere else where the the DSDT can read it? That would be ideal but I wonder how one might approach that though. Link to comment Share on other sites More sharing options...
kdawg Posted December 19, 2009 Share Posted December 19, 2009 when using cparm's FADT.aml and Duvel300 RC4 boot, wake from aluminum keyboard is not working? shutdown and YES automatic sleep seems to be working too (not on time though but it works).. Auto-Sleep you say!!! What is the approximated time? Try using pmset. This seems to work better when setting power management features rather than the preferences panel. Can anyone else verify that auto-sleep has started working for them? Also shutdown and wake from keyboard still works for me. Link to comment Share on other sites More sharing options...
sk1nhead Posted December 19, 2009 Share Posted December 19, 2009 Auto-Sleep you say!!!! What is the approximated time? Try using pmset. This seems to work better when setting power management features rather than the preferences panel. Can anyone else verify that auto-sleep has started working for them? set it at 5 min for testing and it auto sleep at 9-10min, will have to take a look at that link you've given but for now i'm much more interested in waking from sleep (again) using my aluminum keyboard.. using OSXrestart by MC for now until the gurus here resolve this. Link to comment Share on other sites More sharing options...
mm67 Posted December 19, 2009 Share Posted December 19, 2009 Auto-Sleep you say!!! What is the approximated time? Try using pmset. This seems to work better when setting power management features rather than the preferences panel. Can anyone else verify that auto-sleep has started working for them? Also shutdown and wake from keyboard still works for me. Same here, and no auto-sleep. BTW, has anyone else tried using iMac10,1 as model, seems to do powerstepping just as nicely as MacPro3,1. Link to comment Share on other sites More sharing options...
kdawg Posted December 19, 2009 Share Posted December 19, 2009 set it at 5 min for testing and it auto sleep at 9-10min, will have to take a look at that link you've given but for now i'm much more interested in waking from sleep (again) using my aluminum keyboard.. using OSXrestart by MC for now until the gurus here resolve this. Post your current DSDT. And it appears you're using a Gigabyte G31M-ES2L right (nice build BTW)? Are you running SL? Link to comment Share on other sites More sharing options...
THe KiNG Posted December 19, 2009 Share Posted December 19, 2009 The failing tables are missing the Reset Register bits: [074h 116 12] Reset Register : <Generic Address Structure> [074h 116 1] Space ID : 01 (SystemIO) [075h 117 1] Bit Width : 08 [076h 118 1] Bit Offset : 00 [077h 119 1] Access Width : 00 [078h 120 8] Address : 0000000000000CF9 [080h 128 1] Value to cause reset : 06 If you have this register in your table then OSXRestart.kext should work – which is the case for your hardware if I remember it correctly. Note: See also ACPI specification. And here "Reset Register Supported" was 0, which I changed into 1 as a test. Not that it changed anything but anyway. Something is wrong here Looking in BIOS all values seems to be correct, only diff b/w mine and apple mp41 was Access Width : 00 on me, I change it in BIOS and now is 01 What is weird is that in BIOS Reset Register Supported is set as 01 but when I get on OSX and extract the table is set to 00, so oe BIOS set it or is chameleon no idea.... So I can't fix it in BIOS since there is OK, maybe is in init code dunno yet... Link to comment Share on other sites More sharing options...
sk1nhead Posted December 19, 2009 Share Posted December 19, 2009 Post your current DSDT. And it appears you're using a Gigabyte G31M-ES2L right (nice build BTW)? Are you running SL? yes snow 10.6.2.. i dont know if dsdt has anything to do with my aluminum keyboard not waking my system from sleep but here you go ES2L_current.dsl.zip regarding auto sleep: I dont know if the latest restart fix (boot and FADT) did this but just notice it now - it could be working before, just had an idea to test them since shutdown and restart is working without any kext. also another member here who has the same board (forgot his username sorry) has an automatic sleep working on his es2l even before all the fixes were made possible (shutdown by mm67) etc.. Link to comment Share on other sites More sharing options...
Master Chief Posted December 19, 2009 Share Posted December 19, 2009 Something is wrong here Looking in BIOS all values seems to be correct, only diff b/w mine and apple mp41 was Access Width : 00 on me, I change it in BIOS and now is 01 We discused this here before. Both 0 and 1 are used for byte access. 1 is the more logical one to use, but 0 also works. What is weird is that in BIOS Reset Register Supported is set as 01 but when I get on OSX and extract the table is set to 00, so oe BIOS set it or is chameleon no idea.... So I can't fix it in BIOS since there is OK, maybe is in init code dunno yet... Interesting. Let me check that and report back to you... Nope. Not here. Link to comment Share on other sites More sharing options...
kdawg Posted December 19, 2009 Share Posted December 19, 2009 yes snow 10.6.2.. i dont know if dsdt has anything to do with my aluminum keyboard not waking my system from sleep but here you go ES2L_current.dsl.zip regarding auto sleep: I dont know if the latest restart fix (boot and FADT) did this but i just notice it now - it could be working before that i just didn't notice it, just had an idea to test them since shutdown and restart is working without any kext. also another member here who has the same board (forgot his username sorry) has an automatic sleep working on his es2l even before all the fixes were made possible (shutdown by mm67) etc.. ow last kdwag - care to give an example on how to use pmset? right now this is what's showing in terminal. TIA. PowerHack:~ SnowLeo$ pmset -g Active Profiles: AC Power -1* Currently in use: hibernatemode 0 sleep 5 powerbutton 1 disksleep 0 hibernatefile /var/vm/sleepimage autorestart 1 ttyskeepawake 1 displaysleep 3 so wake from aluminum keyboard still working for you? hhhmm weird that it's not for me since it's working when i remove replace boot from cparm or Duvel with an older PCEFI or RC4. it's just that this new restart fix.. It appears that ICH7 has the same registers as ICH10 so I have no idea. Might have something to do with the fact you only have one EHCI device instead of two. Try and ping mm67 he's the author of the Al keyboard patch. For myself everything is working… except auto-sleep of course. As far as pmset example you can use something like this sudo pmset -a displaysleep 5 disksleep 5 sleep 15 This would be display sleep after 5 min, disk sleep after 5 min and machine sleep after 10 min. The pmset trick didn't work for me but has in the past. Link to comment Share on other sites More sharing options...
Aargh-a-Knot Posted December 19, 2009 Share Posted December 19, 2009 @Duvel300 Seems to be working great. Thanks! I've been having random KPs on restart, so I'm hoping this will knock that out... Link to comment Share on other sites More sharing options...
sk1nhead Posted December 19, 2009 Share Posted December 19, 2009 It appears that ICH7 has the same registers as ICH10 so I have no idea. Might have something to do with the fact you only have one EHCI device instead of two. Try and ping mm67 he's the author of the Al keyboard patch. For myself everything is working… except auto-sleep of course. Thanks. Are you using aluminum keyboard too and yours is working? hhhmm pulled out my old keyboard to test and it's working on wake up so i'm back again at square one haha. i still believe there's something on the new restart fix since without using it everything is normal (shutdown, aluminum kb wake except restart w/o a kext) mm67 u there? : D as for auto sleep, i've given up on that too and i'm so relieve that it works - at first i thought my hack just suddenly died hehe.. Link to comment Share on other sites More sharing options...
mm67 Posted December 19, 2009 Share Posted December 19, 2009 Thanks. Are you using aluminum keyboard too and yours is working? hhhmm pulled out my old keyboard to test and it's working on wake up so i'm back again at square one haha. i still believe there's something on the new restart fix since without using it everything is normal (shutdown, aluminum kb wake except restart w/o a kext) mm67 u there? : D as for auto sleep, i've given up on that too and i'm so relieve that it works - at first i thought my hack just suddenly died hehe.. Try this after boot, before first sleep: sudo setpci -s 0:1d.7 0x52.w If the patch is working you should get c802 as result BTW I seem to have the first quad core iMac10,1 http://browse.geekbench.ca/geekbench2/chart/198195 Link to comment Share on other sites More sharing options...
Recommended Posts