Jump to content

hibernation in lion and secure virtual memory


  • Please log in to reply
18 replies to this topic

#1
s.goten

s.goten

    InsanelyMac Protégé

  • Members
  • PipPip
  • 81 posts
Hi,
i can't get works the hibernation under lion. I get "incorrect image signature" message at boot.
in SL i resolved that disabling Secure Virtual Memory in preferences-security pane but in Lion that switch doesn't exist and the secure virtual memory is enabled by default.



i found that string to disable via terminal the secure virtual memory
sudo defaults write /Library/Preferences/com.apple.virtualMemory\UseEncryptedSwap -bool no
but it don't works

anyone has a solution to get works hibernation under lion? or to disable the Secure virtual memory

thanks in advance

#2
jalves

jalves

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
Hibernation worked here disabling secure virtual memory and applying a patch to Chameleon which has provided Vladimir Zidar

see in http://forge.voodoop...eon/issues/133/

#3
juanerson

juanerson

    InsanelyMac Legend

  • Local Moderators
  • 1,427 posts
  • Gender:Male
  • Location:Tru, Venezuela
This is the right native command line in Terminal:
sudo defaults write /Library/Preferences/com.apple.virtualMemory DisableEncryptedSwap -boolean yes


#4
s.goten

s.goten

    InsanelyMac Protégé

  • Members
  • PipPip
  • 81 posts

Hibernation worked here disabling secure virtual memory and applying a patch to Chameleon which has provided Vladimir Zidar

see in http://forge.voodoop...eon/issues/133/


i downloaded that patch but i don't understand how to use that file

if I run it under terminal with "sh ./ hibernate107v1.patch" i get some errors and nothing changes

#5
jalves

jalves

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts

i downloaded that patch but i don't understand how to use that file

if I run it under terminal with "sh ./ hibernate107v1.patch" i get some errors and nothing changes

No
you need to have sources of chameleon to apply the patch and then build

If you prefer, the boot with the patched version of r1434 Chameleon is here http://dl.dropbox.co...881411/boot.zip

#6
s.goten

s.goten

    InsanelyMac Protégé

  • Members
  • PipPip
  • 81 posts

No
you need to have sources of chameleon to apply the patch and then build

If you prefer, the boot with the patched version of r1434 Chameleon is here http://dl.dropbox.co...881411/boot.zip


the chameleon boot from you link works great
thank you very much indeed!!!!!

just a question. if i want to build chameleon with the patch, once i downloaded the sources, what i have to do?
are there specific command lines?
it's just a curiosity if one day I wanted to patch a newer version of chameleon

#7
jalves

jalves

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts

the chameleon boot from you link works great
thank you very much indeed!!!!!

just a question. if i want to build chameleon with the patch, once i downloaded the sources, what i have to do?
are there specific command lines?
it's just a curiosity if one day I wanted to patch a newer version of chameleon


man patch

http://forge.voodooprojects.org/

svn co -r HEAD http://forge.voodoop...g/svn/chameleon ( all branches )
svn co -r HEAD http://forge.voodoop...chameleon/trunk ( current version )

#8
ApexDE

ApexDE

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 217 posts
This is IMHO a huge issue with Lion and hackmacs. Thanks for the infos and heads up. I had problems with wake-from-disk too, even in the chameleon forums, no one answered to my bug report.
I added the patch and hope it is fixed now :)

#9
jalves

jalves

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
I believe that once this patch is in the trunk Chamelon

(Though the Vladimir spoke to rewrite the "resume.c" in order to have a clean code, no hacks, and there goes the Lion, Snow and Leopard)

#10
ApexDE

ApexDE

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 217 posts
Is there a way to have wake-from-disk AND secure virtual memory? Why doesn't it work with secure VM?

#11
s.goten

s.goten

    InsanelyMac Protégé

  • Members
  • PipPip
  • 81 posts

Is there a way to have wake-from-disk AND secure virtual memory? Why doesn't it work with secure VM?


if you want to use secure virtual memory and hibernation you should use the switch 5 or 7 instead of 1 and 3 when you set the hibernate mode: pmset hibernatemode x (x is the switch). i hope this can help you.
i have read this but never tried it, so i don't know if it works on hackintosh

#12
alvaro_il_metallaro

alvaro_il_metallaro

    InsanelyMac Protégé

  • Members
  • Pip
  • 26 posts
  • Gender:Male
Hi,
with this patch my notebook is able to reach the gray screen with "header read size 200 blah blah blah Wake Kernel!" but instead of showing my desktop it shutdown. what i'm doing wrong? i'm trying to get hibernation work because i can't get sleep to work correctly, it sleeps but when i try to wake up it shutdown again.

sorry for my bad english

#13
jalves

jalves

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
which hibernatemode using ?

with hibernatemode set to 0, he usually sleeps?

secure virtual memory disabled ?

#14
smartie77

smartie77

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 370 posts
  • Gender:Male
  • Location:Dortmund, Germany
  • Interests:Apple Software, iOS , OSX86, Creativity and a lot of non-tech stuff.
My Snow and Lion sleeps ( using vanilla kernel, no sleep enabler and no Nullcpu ) with Apples default selections, with secure virtual memory enabled ( in Lion there is no UI element anymore to let one turn that off ) :

Apples default power mode scheme in SL / Lion is what in Linux is called "suspend to Ram".

The machine goes off and writes within seconds everything that is on the screen opened to RAM, on my Toshiba I can see a red pulsating light that indicates that state being active. ( Vista/7 uses the same mode when you close the lid ) .

This state is using battery power, keeping everything powered OFF, but only the RAM modules active. One can carry the machine in this state and open it at any time and within milliseconds after you press the power button, everything is back on the screen as you left it. The network and sound will be turned on immediately so you are online again the moment you power OSX again. Your battery will show that it has only xx percent left, indicating that it has been used in that sleep state.

If the battery goes empty in that state, OSX will write the content to a hibernate file but in most cases ( on a full battery ) you can leave the machine in this state over nights ( my battery never last very long and it is now 1,5 years old but for sleeping the Laptop it is more than enough )

So there is nothing wrong with Apples default selection for Hacks : it definitely works ( with or without secure vm ).

In Snow I played a bit with "pmset" and switched the default Suspend mode to "Suspend to disk", that is the mode where it writes everything not to Ram but to the SleepImage file. It is mostly useless, because the Hack goes into power-off ( completely ) and when you press the power button, chameleon is called, only that no full boot is done but a "resume" screen, where Chameleon re-calls the sleep images content ( which is slow and can take even more time than a simple boot ) - then Mac OSX also resumes there where it has left before and the battery is still full, because in that mode it has not been used.

The available modes can be seen if you type " man pmset " in a terminal. There are various combinations available, but Apple itself warns that not all will work correctly.


It all depends on a working DSDT.aml and IDEALLY NOT use Nullcpu+Sleepenabler


( if using Sleepenabler +Nullcpu , having "PmVersion=102" in the boot plist is important for Lion )

What I needed to make sleep work : change device-IDs of all USBs ( from ICH9 into ICH10 ) and make them all appear as internal. I did of course also all the other hacks, but the USB thing is the only to have sleep working.

The components in my L500 are very much Apple-Like and thus simply work. The core2duo, the Intel chipset etc - all parts we find in real macs too. Only Ich10 instead of Ich9 .

FILES

My current boot loader : Attached File  Chameleon_2.1svn_r1478.pkg.zip   1.46MB   163 downloads

My boot plist : Attached File  org.chameleon.Boot.plist.zip   740bytes   169 downloads

My DSDT : Attached File  dsdt.aml.zip   16.33KB   61 downloads

#15
alvaro_il_metallaro

alvaro_il_metallaro

    InsanelyMac Protégé

  • Members
  • Pip
  • 26 posts
  • Gender:Male

which hibernatemode using ?

with hibernatemode set to 0, he usually sleeps?

secure virtual memory disabled ?


hibernatemode is set to 1.

with hibernatemode 0 he sleeps, but instead of wake up he shutdowns.

secure memory is disabled

#16
jalves

jalves

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
your problem is that sleep is not working. read the answer above.

#17
alvaro_il_metallaro

alvaro_il_metallaro

    InsanelyMac Protégé

  • Members
  • Pip
  • 26 posts
  • Gender:Male

your problem is that sleep is not working. read the answer above.


i know, but what can i do? i'm not able to edit my dsdt, and using sleepenabler + nullcpupowermanagement + pmversion=102 as suggested in the post above does not solve my problem.

#18
jalves

jalves

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
I would say to remove sleepenabler and nullcpupowermanagement and use in your org.chameleon.Boot.plist

<key>GenerateCStates</key>
<string>yes</string>
<key>GeneratePStates</key>
<string>yes</string>

but ask for help in the DSDT section that probably will help

#19
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,894 posts
  • Gender:Male
Did someone solve the issue without resorting to dsdt fixes? I'm having the "Header Size" issue when trying to set the system to wake-from-disk. No hibernatemode switch changes seem to bypass this hassle. Dsdt patches seem to be availabe only for a certain branch of hardware and, particularly in this case, only for supported CPUs. Since i've trying this on an Atom CPU, it's a no-go.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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