Jump to content
Allan

Sleep, Hibernation - How it works? and How to use?

4 posts in this topic

Recommended Posts

Advertisement

I'll buy an SSD, is good use the Hibernation mode?

Well, we know that SSDs can boot up very fast in comparison with traditional HDD drivers, and maybe we think when we buy an SSD: "Uh, if i use Hibernation mode, all the things will be more fast!!  :w00t: "

Yes but if you already read about how the new SSD's technologies works, you'll see that use Hibernation mode can destroy your new toy.

But why this happens?

The short explanation: "Hibernation copies everything in RAM into the SSD drive that sometimes results in wearing out the SSDs."

Questions:

#1 - Q: But using SSD + Hibernation mode, will be good to my Battery life, why i need disable it?
A: Using an SSD is very different when you use a HDD drive, consider that using a SSD the power consumption is very low than HDD, you don't need worry about it.  ;)

#2 - Q: I don't care about this stuff, i want use Hibernation mode anyway!!
A: Ok, ok, relax!  ^_^
You can move the sleepimage file to another drive, maybe an old HDD/SSD.

How? Terminal is the answer bro!

Run pmset -g command and you can check the current configuration for hibernate.

 

Screen Shot 2016-03-23 at 6.32.35 PM.png

 

The important informations here are: standbydelay and hibernatefile. The first one say us that our Mac/Hack will wait 4200 seconds before entering the "real' hibernate mode (before any information is written to the disk). The hibernate file is the location where RAM content are stored.

For example I decided just to relocate my sleepimage file.

 

Create folder on the second driver:

Allans-MacBook-Pro:~ allan$ mkdir -p /Volumes/YourHDD/System/vm

Change the hibernatefile property

sudo pmset -a hibernatefile /Volumes/YourHDD/System/vm/sleepimage

Check your currents settings

Allans-MacBook-Pro:~ allan$ sudo pmset -g 
Active Profiles: 
Battery Power -1* 
AC Power -1 
Currently in use: 
standbydelay 4200 
standby 0 
halfdim 1 
sms 1 
hibernatefile /Volumes/YourHDD/System/vm/sleepimage 
disksleep 10 
sleep 10 
hibernatemode 29 
ttyskeepawake 1 
displaysleep 15 
acwake 0 
lidwake 1

Now any time your Mac/Hack enters in hibernate mode, the RAM content is written in /Volumes/Media drive (your second internal HDD/SSD).

PS: This "other drive" can be an external HD or a USB3 thumb drive.
PS 2: This tip is valid for Mac users that have SSDs.  :)

PS 3: You can also move the image to a null device:

sudo pmset -a hibernatefile /dev/null

Creditis to: Simply Meahmed_ais and AskDifferent

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By yehia2amer
      Problem:
      When I Attempt to wake my Machine from sleep, the screen stays black, although the computer is obviously awake !
      This Machine has a 1300W Power Supply So Sleep is Very Useful.
       
      I Tried:
      1) FIX_WAK and FixShutdown as per Clover Wiki.
      2) Although I am using "SAPPHIRE Radeon PULSE RX 580 8GB GDDR5", which Should be completely Supported by Mojave, I Also changed the Part Number to "113-4E353BU-O4E" as per this Guide: http://www.xlr8yourmac.com/archives/feb18/RadeonRX-580_MacPro.html. The GPU is working GREAT without even Clover Inject
      3) Tried to Run this command: disablehibernate.command.zip
      4) Tried darkwake=0 to 10
      5) Disabled wake on USB & Wake on LAN (BIOS)
       
      Logs:
      sudo pmset -g
      System-wide power settings: Currently in use: hibernatemode 0 disksleep 10 womp 0 networkoversleep 0 sleep 0 Sleep On Power Button 1 ttyskeepawake 1 hibernatefile /var/vm/sleepimage autorestart 0 gpuswitch 2 displaysleep 10 pmset -g assertions
      2019-02-19 18:51:04 +0200 Assertion status system-wide: BackgroundTask 1 ApplePushServiceTask 0 UserIsActive 1 PreventUserIdleDisplaySleep 0 PreventSystemSleep 0 ExternalMedia 1 PreventUserIdleSystemSleep 0 NetworkClientActive 0 Listed by owning process: pid 56(powerd): [0x0000001700088000] 00:13:44 ExternalMedia named: "com.apple.powermanagement.externalmediamounted" pid 100(hidd): [0x00000025000980a7] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4294968578.17" Timeout will fire in 600 secs Action=TimeoutActionRelease pid 200(mds_stores): [0x0000034e000b8279] 00:00:00 BackgroundTask named: "com.apple.metadata.mds_stores.power" Kernel Assertions: 0x4=USB id=502 level=255 0x4=USB mod=1/1/70, 2:00 AM description=com.apple.usb.externaldevice.1d130000 owner=USB Keyboard id=503 level=255 0x4=USB mod=1/1/70, 2:00 AM description=com.apple.usb.externaldevice.1d120000 owner=Lenovo Optical Mouse Idle sleep preventers: IODisplayWrangler  
      Specs:
      CPU: 2x Xeon E5-2680 v2 2.8GHz Ten Core Processors
      RAM: 128 GB 1333 MHz DDR3 ECC Memory
      GPU: SAPPHIRE Radeon PULSE RX 580 8GB GDDR5
      Chipset: Intel C602
      Audio: Realtek ALC3220 (ALC280) High Definition Audio
      SAS Drive Controllers (RAID): LSI 2308 SATA/SAS 6Gb/s controller with host based RAID 0, 1, 10 (4  
      Network Controller 1: Intel 82579 Gigabit Ethernet controller with Remote Wake UP, PXE and Jumbo frames support
      Network Controller 2: Intel Ethernet Controller I210 
      NEC USB3.0 xHCI Controller: Renesas Electronics uPD720201 & uPD720202
       
      for more info:
       
      Any Help will be appreciated, Thanks !
       
      Send me Yehias-Mac-Pro.zip
    • By manmo71
      I am a novice in the field of Hackintosh, and this is my first post here.
       
      I have managed to setup and install my hackintosh and it is perfectly working other than this one issue.
      I am unable to figure the exact cause of this issue. My Hackintosh is unable to go into sleep mode after the set time. This is what happens (see the attached video file).
       
       

      mojavesleep.mp4  
      You can see that the screen turns off, then I see the power on the graphics card and fans turn off.
      Immediately it comes back ON and the screen TURN's ON.
       
      I have followed various threads in several forums trying various options suggested for sleep related issue, but have been un-successful.
      If anyone is able to guide me through in resolving this issue, I would appreciate that.
       
      I am unsure what files need to be attached for you people to help me, feel free to ask and I shall upload the necessary files.
    • By Jonas
      Hi,
       
      I have High Sierra 10.13.6 installed on a Gigabyte h360m d3h, an i3 8100 processor and a GeForce GTX 760.
       
      I'm having some issues with sleep, shutdown and reboot not working correctly, this is what happens:
      Sleep: the machine restarts
      Shutdown: the OS appears to not be running but the machine is left on
      Restart: the same as shutdown
       
      Everything else (audio, video, usb) appears to be working correctly.
       
      Do you know how can I fix this?
       
      I'm attaching my config.plist and clover bootlog
       
      config.plist
      bootlog.txt
    • By SeePurple
      The display sleep does not work correctly. Starting with Mac 10.12.4, the display sometimes does not wake up. The backlight works, there is no image, a black screen. Currently installed 10.14.1. All the same. If the display is sent to sleep, then sometimes it can wake up in a black screen with a working backlight. From the description, it is not difficult to guess that the display sometimes wakes up correctly and sometimes wakes up in a black screen. In the course of the experiments, I also saw that the display sometimes woke up and showed the boot screen (the Apple logo and progress bar), a second after that the desktop appeared. This behavior occurs only when the display wakes up on a black screen and then I close and open the laptop cover again, after which the boot screen sometimes appears for a second, but sometimes nothing appears, the system just hangs.
      I hope I clearly described the symptoms of the problem.
       
       
      The screenshot was taken after the experiment. I sent the display to sleep, then woke it up. He woke up in a black image with burning lights. Then I closed and opened the laptop bucket, pressed the space bar and waited a few seconds. After a few seconds, the boot screen with the Apple logo appeared and then the desktop appeared. Immediately made a screenshot.
       
      Asus k501lb
      Intel HD 5500
      Core i-5 5200U ( Broadwell )
      Display: au optronics B156HTN03.8

       

    • By BrianWong11031
      Hi, my hackintosh won't sleep!
      It often sleeps for 3-5 seconds and auto wakes up.
      sometimes it can't enter the sleep mode even you click the sleep button.
      I have uploaded my DSDT file.
      but I don't know how to patch DSDT.
      If you know how to solve this issue, please help me!
       
      Cheers,
      Brian
      DSDT.aml
×