Jump to content
takeawaydave

Sleeps but wakes up in a bad mood

Recommended Posts

I can sleep my Samsung NP550 but it wakes not feeling too great with loss of keyboard and trackpad.


Googling tells me bits and pieces and but not a full story of what needs doing...patching AppleRTC.kext ... patching DSDT ....


Can I get more details if some one knows ??


Thanks !!


EDIT: KB wakes now following this patch:

 

sudo perl -pi -e 's|\x75\x30\x89\xd8|\xeb\x30\x89\xd8|' /S/L/E/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

 

Now the trackpad...


EDIT2:


If I unload and then unload the right kext then I can use the Trackpad again.

 

Kinabalu:~ David$ sudo kextunload /System/Library/Extensions/ApplePS2Controller.kext/Contents/PlugIns/ApplePS2Trackpad.kext
Password:
Kinabalu:~ David$ sudo kextload /System/Library/Extensions/ApplePS2Controller.kext/Contents/PlugIns/ApplePS2Trackpad.kext

Link to comment
Share on other sites


EDIT: KB wakes now following this patch:

 

sudo perl -pi -e 's|\x75\x30\x89\xd8|\xeb\x30\x89\xd8|' /S/L/E/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

 



The following code and it's variants need to be visually verified via HexFiend or other editors to make sure it even got applied, you will get

no warnings or errors from Perl if the hex pattern 75 30 89 D8 was found and replaced with EB 30 89 D8


Quickest way is to run diff between the AppleRTC binary and its stock backup,

 

 
$sudo /bin/bash
<enter your paassword>
#cp /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC /Users/me/Desktop/AppleRTC.orig
perl -pi -e 's|\x75\x30\x89\xd8|\xeb\x30\x89\xd8|' /System/Library/Extensions/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC
#diff /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC /Users/me/Desktop/AppleRTC.orig 
Binary files /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC and /Users/me/Desktop/AppleRTC.orig differ

 

If you don't get a result that they differ after running Diff - then the binary patch was not applied at all (most likely due to the first pattern which the regex replaces being unavailable). The above regex replace is for 10.8 with RTC version 1.5


Also this binary code (_which is not working_ for me is available for 10.7.x. AppleRTC 1.5)

#perl -pi -e 's|\x75\x30\x44\x89\xf8|\xeb\x30\x44\x89\xf8|; s|\x75\x3d\x8b\x75\x08|\xeb\x3d\x8b\x75\x08|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

 

I've verified that 75:30:44:89 F8: and 75:3D:8B:75:08 are both present in 10.7.4 and 10.7.5 AppleRTC binary inside the kext package (at different addresses.)


As you can see they are quite similar, the latter finds another two operand and replaces 0x75 with 0xEB

Download HexFiend and verify the second pattern is available in the regex is available to you.


Both are to discorage CMOS reset on waking, waking itself could still be broken, my guess is that during this time you've added or applied something else to allow KB waking, not this binary patch.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.





×
  • Create New...
The popup will be closed in 15 seconds...