Contribute
Register

Best Hibernate Mode?

Status
Not open for further replies.
Joined
Feb 25, 2012
Messages
789
Motherboard
Acer Aspire 5750G
CPU
i7 2630QM
Graphics
GT 540M + HD 3000
Mobile Phone
  1. iOS
I have a Samsung 840 EVO SSD and just wondering what is the best hibernate mode?
I currently have 'Allow Bluetooth devices to wake this computer' so with the normal sleep mode it seems to keep my laptop awake with this option.

I have this:
Code:
thomass-mbp:vm thomas$ pmset -g assertions
22/01/2014 16:01:45 GMT  
Assertion status system-wide:
   BackgroundTask                 0
   PreventDiskIdle                0
   ApplePushServiceTask           0
   UserIsActive                   0
   PreventUserIdleDisplaySleep    0
   InteractivePushServiceTask     0
   PreventSystemSleep             1
   ExternalMedia                  0
   PreventUserIdleSystemSleep     0
   NetworkClientActive            0
Listed by owning process:
   pid 93(InternetSharing): [0x0000000800000140] 00:33:10 DenySystemSleep named: "com.apple.InternetSharing" 
No kernel assertions.

So I'm thinking what would happen if I turned it into hibernate and not sleep in regards to bluetooth?
Also does it matter setting my SSD to hibernate mode, will it damage it?

In the man pages there is this:
SAFE SLEEP ARGUMENTS
hibernatemode takes a bitfield argument defining SafeSleep behavior. Passing 0 disables SafeSleep alto-gether, altogether,
gether, forcing the computer into a regular sleep.

____ ___1 (bit 0) enables hibernation; causes OS X to write memory state to hibernation image at sleep
time. On wake (without bit 1 set) OS X will resume from the hibernation image. Bit 0 set (without bit 1
set) causes OS X to write memory state and immediately hibernate at sleep time.

____ __1_ (bit 1), in conjunction with bit 0, causes OS X to maintain system state in memory and leave
system power on until battery level drops below a near empty threshold (This enables quicker wakeup
from memory while battery power is available). Upon nearly emptying the battery, OS X shuts off all
system power and hibernates; on wake the system will resume from hibernation image, not from memory.

____ 1___ (bit 3) encourages the dynamic pager to page out inactive pages prior to hibernation, for a
smaller memory footprint.

___1 ____ (bit 4) encourages the dynamic pager to page out more aggressively prior to hibernation, for
a smaller memory footprint.

We do not recommend modifying hibernation settings. Any changes you make are not supported. If you
choose to do so anyway, we recommend using one of these three settings. For your sake and mine, please
don't use anything other 0, 3, or 25.

hibernatemode = 0 (binary 0000) by default on supported desktops. The system will not back memory up to
persistent storage. The system must wake from the contents of memory; the system will lose context on
power loss. This is, historically, plain old sleep.

hibernatemode = 3 (binary 0011) by default on supported portables. The system will store a copy of mem-ory memory
ory to persistent storage (the disk), and will power memory during sleep. The system will wake from
memory, unless a power loss forces it to restore from disk image.

hibernatemode = 25 (binary 0001 1001) is only settable via pmset. The system will store a copy of mem-ory memory
ory to persistent storage (the disk), and will remove power to memory. The system will restore from
disk image. If you want "hibernation" - slower sleeps, slower wakes, and better battery life, you
should use this setting.

Please note that hibernatefile may only point to a file located on the root volume.

Also in /var/vm/ there are 3 files:
Code:
- sleepimage 4.29GB 
- swapfile0 67.1MB
- swapfile1 1.07GB
What are they for? Obviously swapfile is for the swap "partition" but why is there two?
Can I delete sleepimage if I choose hibernate?
 
I have a Samsung 840 EVO SSD and just wondering what is the best hibernate mode?

For SSDT, use 'sudo pmset -g hibernatemode 0'

I currently have 'Allow Bluetooth devices to wake this computer' so with the normal sleep mode it seems to keep my laptop awake with this option.

I have this:
Code:
thomass-mbp:vm thomas$ pmset -g assertions
22/01/2014 16:01:45 GMT  
Assertion status system-wide:
   BackgroundTask                 0
   PreventDiskIdle                0
   ApplePushServiceTask           0
   UserIsActive                   0
   PreventUserIdleDisplaySleep    0
   InteractivePushServiceTask     0
   PreventSystemSleep             1
   ExternalMedia                  0
   PreventUserIdleSystemSleep     0
   NetworkClientActive            0
Listed by owning process:
   pid 93(InternetSharing): [0x0000000800000140] 00:33:10 DenySystemSleep named: "com.apple.InternetSharing" 
No kernel assertions.

Sleep is disabled because you have "Internet Sharing" turned on (essentially you're using your laptop as a router). It is unrelated to BT.
 
For SSDT, use 'sudo pmset -g hibernatemode 0'

Sleep is disabled because you have "Internet Sharing" turned on (essentially you're using your laptop as a router). It is unrelated to BT.

Ok thanks. I saw that I had Internet Sharing on, so I've now turned it off as I wasn't using it.
At the moment I'm using my laptop on my TV (meaning it's without a battery). If I turn this to hibernate mode to 0 and take the power cord out I take it I will loose my wake?
hibernatemode = 0 (binary 0000) by default on supported desktops. The system will not back memory up to
persistent storage. The system must wake from the contents of memory; the system will lose context on
power loss. This is, historically, plain old sleep.
Can I not use SSD with hibernation and allow to turn off power essentially?

EDIT: Also my wake on BT does not work properly either. But I guess that's another matter.
 
Ok thanks. I saw that I had Internet Sharing on, so I've now turned it off as I wasn't using it.
At the moment I'm using my laptop on my TV (meaning it's without a battery). If I turn this to hibernate mode to 0 and take the power cord out I take it I will loose my wake?

I'm not sure what you mean by "loose my wake", but you will cold boot after complete power loss, of course.

Can I not use SSD with hibernation and allow to turn off power essentially?

Two comments:
- I don't think hibernation even works on a hack. Have you tested it?
- Writing 4/8/12 GB of data every time your laptop sleeps is not exactly a good idea with SSD. SSDs have limited write cycles. If your computer doesn't sleep very often, no problem. Mine probably sleeps 30 times per day (30*8GB=240GB/day=87.6TB/year)

EDIT: Also my wake on BT does not work properly either. But I guess that's another matter.

I think that is pretty common with certain BT hardware on hacks...
 
I'm not sure what you mean by "loose my wake", but you will cold boot after complete power loss, of course.
Ok. I know OS X is different, but I was looking the way that Windows hibernates. Thinking about it not sure if that uses slight bit of power or not...
Two comments:
- I don't think hibernation even works on a hack. Have you tested it?
- Writing 4/8/12 GB of data every time your laptop sleeps is not exactly a good idea with SSD. SSDs have limited write cycles. If your computer doesn't sleep very often, no problem. Mine probably sleeps 30 times per day (30*8GB=240GB/day=87.6TB/year)
I'm not really sure to be honest, I was going to change the hibernation mode and see that.
I know SSD's have a limited amount of writes so by just shutting down and and then starting up, that seems to be the best way to preserve my SSD I guess.
87.6TB/year is a lot of data, what's a typical amount of data for a SSD?
I think that is pretty common with certain BT hardware on hacks...
Ok maybe I will find something that could work.
 
Ok. I know OS X is different, but I was looking the way that Windows hibernates. Thinking about it not sure if that uses slight bit of power or not...

Windows and OS X have the same hibernate/hybrid sleep behavior/features...

I'm not really sure to be honest, I was going to change the hibernation mode and see that.
I know SSD's have a limited amount of writes so by just shutting down and and then starting up, that seems to be the best way to preserve my SSD I guess.
87.6TB/year is a lot of data, what's a typical amount of data for a SSD?

Different manufacturers have different specifications for maximum lifetime writes. Some manufacturers do not specify.
 
So trying to use hibernate mode 0 now, which would mean that it was save to memory.
This would then preserve my SSD I guess.

But whilst setting hibernate mode 0 the variable is not sticking:
Code:
thomass-mbp:~ thomas$ sudo pmset -g hibernatemode 0
Password:

thomass-mbp:~ thomas$ pmset -g live
Active Profiles:
Battery Power		1
AC Power		-1*
Currently in use:
 [b][u]hibernatemode        3[/b][/u]
 halfdim              1
 womp                 1
 networkoversleep     0
 standbydelay         4200
 ttyskeepawake        1
 sleep                10 (sleep prevented by AddressBookSour, apsd, apsd, mds, UserEventAgent)
 hibernatefile        /var/vm/sleepimage
 disksleep            10
 standby              0
 displaysleep         0
 
So trying to use hibernate mode 0 now, which would mean that it was save to memory.
This would then preserve my SSD I guess.

But whilst setting hibernate mode 0 the variable is not sticking:
Code:
thomass-mbp:~ thomas$ sudo pmset -g hibernatemode 0
Password:

thomass-mbp:~ thomas$ pmset -g live
Active Profiles:
Battery Power		1
AC Power		-1*
Currently in use:
 [b][u]hibernatemode        3[/b][/u]
 halfdim              1
 womp                 1
 networkoversleep     0
 standbydelay         4200
 ttyskeepawake        1
 sleep                10 (sleep prevented by AddressBookSour, apsd, apsd, mds, UserEventAgent)
 hibernatefile        /var/vm/sleepimage
 disksleep            10
 standby              0
 displaysleep         0

Reboot?
 
Status
Not open for further replies.
Back
Top