Jump to content
  • Announcements

    • Allan

      Forum Rules   04/13/2018

      Hello folks! As some things are being fixed, we'll keep you updated. Per hour the Forum Rules don't have a dedicated "Tab", so here is the place that we have our Rules back. New Users Lounge > [READ] - InsanelyMac Forum Rules - The InsanelyMac Staff Team. 
s.goten

hibernation in lion and secure virtual memory

20 posts in this topic

Recommended 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

Share this post


Link to post
Share on other sites

This is the right native command line in Terminal:

sudo defaults write /Library/Preferences/com.apple.virtualMemory DisableEncryptedSwap -boolean yes

Share this post


Link to post
Share on other sites
Hibernation worked here disabling secure virtual memory and applying a patch to Chameleon which has provided Vladimir Zidar

 

see in http://forge.voodooprojects.org/p/chameleon/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

Share this post


Link to post
Share on other sites
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.com/u/4881411/boot.zip

Share this post


Link to post
Share on other sites
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.com/u/4881411/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

Share this post


Link to post
Share on other sites
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.voodooprojects.org/svn/chameleon ( all branches )

svn co -r HEAD http://forge.voodooprojects.org/svn/chameleon/trunk ( current version )

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 : Chameleon_2.1svn_r1478.pkg.zip

 

My boot plist : org.chameleon.Boot.plist.zip

 

My DSDT : dsdt.aml.zip

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

This is the right native command line in Terminal:

sudo defaults write /Library/Preferences/com.apple.virtualMemory DisableEncryptedSwap -boolean yes

 

Hello everyone, does anyone know if the trick above works for Mavericks and 10.9.5 version?

 

I also discovered that the trick to remove the "sleepimage" file is failing 100%. Upon each reboot, the file is re-created each time… even if I do a zero-size file with chmod 000 attributes!

 

Thanks in advance.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Posts

    • Hello MaLd0n,   Could you please make DSDT edits for my new Skylake desktop Lenovo M910t    RunMe files: https://www96.zippyshare.com/v/5bgqAiga/file.html
        Thank you very much in advance!
    • Have you tried adjusting the Khz in midi pref pane or editing the info plist to suit your needs. that sometimes corrects weird noise behavior.
    • Hello Mald0n:

      Nice to meet you, I have created a post about my problem on High Sierra before and I was redirected to this guide by Allan.

      As mentioned in the post, I was not able to get pass the login screen at initial boot and the system could not shutdown occasionally.

      However I solve the high temperature problem when I replace the clover folder you provide on first post, currently the cpu temperature is around 5x-6x'c after 10 mins up time.

      Attached is the clover folder, ioreg as well as the send me app, thanks for your help!

      p.s. I notice that your clover boot efi is a old traditional grey apple boot logo, Is there a version of modern dark and white logo one that I could replace with? Thank you!

      https://www.insanelymac.com/forum/topic/333867-cant-get-pass-2nd-stage-boot-logo-on-initial-boot-and-high-temperature/   My system:
      Gigabyte GA-X48-DQ6
      Core 2 Extreme QX9650 C0
      4 x Kingston DDR2 800ghz Ram
      Galaxy GTX460 1GB
      120GB SSD Leven JS500120C, high Sierra installed
      250GB seagate ST3250310AS
      250GB WDC WD2500JS-08NCB1
      File: https://drive.google.com/file/d/1_k3_jxvzGaLfDzin0zSAUT5ml16Hq15c/view?usp=sharing      
    •   Still garbled sound in earphone. The speaker is loud as previous. louder than 2.9.1   
    • Up for https://sourceforge.net/p/cloverefiboot/wiki,


×