Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

andymac2210

macrumors regular
Jul 18, 2011
228
0
You're wrong about sleep/hibernation.

When you close the lip of the laptop it goes to 'sleep', after a few hours (I think it's 6) it enters hibernation.

You can tell because it takes longer to wake up and if you have a cMBP the DVD drive will spin up when it wakes from hibernation.
 

Orlandoech

macrumors 68040
Original poster
Jun 2, 2011
3,341
887
You're wrong about sleep/hibernation.

When you close the lip of the laptop it goes to 'sleep', after a few hours (I think it's 6) it enters hibernation.

You can tell because it takes longer to wake up and if you have a cMBP the DVD drive will spin up when it wakes from hibernation.


Who is this post directed towards?
 

johnnnw

macrumors 65816
Feb 7, 2013
1,214
21
You need to copy and paste the XML posted here into a plain-text editor. I couldn't get it to work by copying the code into a TextEdit document. I used WriteRoom since I own that software, but Text Wrangler is a good, free alternative.

I'm not really sure what I'm doing.

I downloaded text wrangler, not how do I change it into something that will work in Terminal?

Thanks
 

saturnotaku

macrumors 68000
Mar 4, 2013
1,978
97
I'm not really sure what I'm doing.

I downloaded text wrangler, not how do I change it into something that will work in Terminal?

Thanks

1) Open a blank document in Text Wrangler
2) Copy the code block from section 4 in the first post on page 1
3) Paste what you copied to Text Wrangler
4) Save the document as "com.nullvision.noatime.plist" without the quotes to your desktop, making sure that Text Wrangler does not add a .txt extension to the file
5) Copy the file you just created to the /Library/LaunchDaemons directory. Provide your admin credentials as needed.
6) Follow the rest of the steps outlined in section 4 with the posted Terminal commands
 

johnnnw

macrumors 65816
Feb 7, 2013
1,214
21
1) Open a blank document in Text Wrangler
2) Copy the code block from section 4 in the first post on page 1
3) Paste what you copied to Text Wrangler
4) Save the document as "com.nullvision.noatime.plist" without the quotes to your desktop, making sure that Text Wrangler does not add a .txt extension to the file
5) Copy the file you just created to the /Library/LaunchDaemons directory. Provide your admin credentials as needed.
6) Follow the rest of the steps outlined in section 4 with the posted Terminal commands

Got up to step 5. Sorry man, hate to keep bothering you but I don't know where to get into the /Library/LaunchDaemons? I've had a Windows PC for many years, very new to Mac OS:(

/launchdaemons is not present in /Library.
 
Last edited:

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,138
15,606
California
Got up to step 5. Sorry man, hate to keep bothering you but I don't know where to get into the /Library/LaunchDaemons? I've had a Windows PC for many years, very new to Mac OS:(

/launchdaemons is not present in /Library.

Click the Desktop to bring focus to the Finder. Then hit shift-command-g (all three keys at once). You will get a popup. Paste the text below into the popup box and hit enter. That will open a Finder window the folder /Library/LaunchDaemons

Code:
/Library/LaunchDaemons
 

johnnnw

macrumors 65816
Feb 7, 2013
1,214
21
Click the Desktop to bring focus to the Finder. Then hit shift-command-g (all three keys at once). You will get a popup. Paste the text below into the popup box and hit enter. That will open a Finder window the folder /Library/LaunchDaemons

Code:
/Library/LaunchDaemons

Brilliant! Seriously thank you so much. That plist stuff was way beyond my knowledge. Nice to learn something new.
 

jdran

macrumors newbie
May 22, 2013
21
2
Thanks for the guide, it is really useful. However I d like to ask few questions.

I disabled the Sudden Motion Sensor but there was a warning:

Warning: Idle sleep timings for "AC Power" may not behave as expected.
- Disk sleep should be non-zero whenever system sleep is non-zero.

As I write pmset -g:

Active Profiles:
Battery Power -1*
AC Power -1
Currently in use:
standbydelay 4200
standby 0
halfdim 1
sms 0
panicrestart 157680000
gpuswitch 2
hibernatefile /var/vm/sleepimage
disksleep 10
sleep 10
hibernatemode 3
ttyskeepawake 1
displaysleep 2
acwake 0
lidwake 1

So should the warning worry me or not?

Also another question. Is it normal that my MacBookPro heats up at a point that touching the part where SSD is burning? Note that I use Photoshop and the like simultaneously.
 

MattieD

macrumors newbie
Jun 19, 2012
23
0
So in order to get better battery life we have to leave hibernation enabled but then we will lose disk space due to the hibernation files.

Just don't seem to be getting battery life with the SSD

Also I'm not sure if it's just getting used to the speed of the SSD but it seem to be slowing where when I first installed it everything was almost instant. If I want TRIM to clean up the disk and return my speed do I need to leave Chameleon launched and let the computer idle?
 

Ledgem

macrumors 68020
Jan 18, 2008
2,034
924
Hawaii, USA
So in order to get better battery life we have to leave hibernation enabled but then we will lose disk space due to the hibernation files.
You don't need to leave hibernation enabled to get better battery life.

Just don't seem to be getting battery life with the SSD
It depends on your usage and the specific drive you have. I'm using a Samsung 840 and when it's mostly idle I get a boost of close to two hours. When I start performing a lot of read/write operations then there's seemingly no advantage compared with my old non-SSD.

Also I'm not sure if it's just getting used to the speed of the SSD but it seem to be slowing where when I first installed it everything was almost instant. If I want TRIM to clean up the disk and return my speed do I need to leave Chameleon launched and let the computer idle?
No, Chameleon does not need to be running for TRIM to work. It's an operation handled by the operating system itself, not a program.

As to the speed of the SSD, how much free space do you have? I recall hearing that you should have a certain percentage free for ideal performance (I think it was somewhere around 25%, but double check that). If you have your drive heavily filled then that could explain a worsening of performance.
 

MattieD

macrumors newbie
Jun 19, 2012
23
0
Chameleon seems to be working a little better for me in terms of maintaining performance over Trim Enabler.

Also my SSD is only around 20% full so it's not being overly utilized that was slowing it down
 

chaseychasem

macrumors regular
Aug 4, 2012
137
0
3. Turn off hibernation [laptops only] - UPDATED 01.16.2013 -

Another feature of Mac OS turned on by default on laptops is, that it saves all the memory to disk when entering sleep mode. This is to ensure your laptop does not lose your work if it runs out of battery while “sleeping”. The more RAM you have, the more gigabytes it writes to the disk every time you close the lid/put it to sleep. I typically do this at least twice a day – when leaving the office and when going to sleep in the evening. If you are in a similar situation and you have 8GB of RAM, that means your MacBook writes 16 to 24 GB of hibernation data to your SSD every day. Here is how you can turn this off – it will not only make your SSD’s life longer, but also significantly speed up the time it takes for your laptop to enter the sleep mode:
Code:
sudo pmset -a hibernatemode 0

Once you turn off hibernation, you can also remove the sleep image file that will free up several GB of disk space (depending on how much RAM you have):
Code:
sudo rm /Private/var/vm/sleepimage

Then create a blank zero-byte file so OS X cannot rewrite the file:
Code:
sudo touch /Private/var/vm/sleepimage

Last, make the file immutable:
Code:
sudo chflags uchg /Private/var/vm/sleepimage


This isn't working for me. For what it's worth, I'd never tried it before, and I applied the 10.8.4 patch first. Sleepimage keeps returning, regardless. Suggestions?

EDIT: Never mind. I think I got it, but the fact that Chameleon still showed Disable Sleep Image as off confused me. I assume this is due to the nature of the workaround?​
 
Last edited:

SnrNC

macrumors newbie
Jul 21, 2013
2
0
5. Move user home directories to HDD [SSD+HDD only]

This tweak is only useful if you have both SSD as well as HDD in your Mac. I’m using this in my iMac. I moved all the content of /Users folder to the HDD and created a symbolic link from the SSD to it (so that I don’t have to change the home folder location in the user settings, as I read some applications don’t like it and may not work correctly). To do that execute the following commands in Terminal:

Code:
sudo ditto /Users /Volumes/your_hdd_name/Users
sudo mv /Users /Users.bak
sudo ln -s /Volumes/your_hdd_name/Users /Users

UPDATE: To be safe, you should also go to System Preferences, click on Users & Groups, click the lock icon to unlock advanced editing (password prompt will appear). Once unlocked, you should be able to right-click on each user account and choose Advanced Options from the pop-up menu. Once in the Advanced Options dialog, change the Home directory of the user from “/Users/user-name” to the new location (e.g. “/Volumes/HDD/Users/user-name”).

Now, check if your home folders are showing up correctly in Finder. If so, restart your computer.

Finally, delete the back-up of your Users folder on the SSD by typing the following into the Terminal:
Code:
sudo rm -rf /Users.bak

This is my first try at working in terminal so I hope this question isn't too stupid. When I start entering every string of code do I wait for my name to come back up? On some of the simpler commands listed as soon as I hit enter my name shows up again. The first time I tried this I entered all three commands. Then my SSD started filling to capacity. Maybe I just entered the volume incorrectly. Thanks in advance for any help.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,138
15,606
California
This is my first try at working in terminal so I hope this question isn't too stupid. When I start entering every string of code do I wait for my name to come back up? On some of the simpler commands listed as soon as I hit enter my name shows up again. The first time I tried this I entered all three commands. Then my SSD started filling to capacity. Maybe I just entered the volume incorrectly. Thanks in advance for any help.

You need to wait for your name to come back up after the operation is complete. That command is moving your entire user folder, so it will take some time.
 

SnrNC

macrumors newbie
Jul 21, 2013
2
0
Weaselboy, thanks for the help. Unfortunately I must be doing something wrong. I let the system work and it looked good but the process filled up my SSD to capacity (0 bytes free) and stopped. Terminal had a long string of x couldn't be moved because disk is full. Now my startup disk is full and I can't find what the duplication is. Any thoughts? Learning to work with this is fun but frustrating for a neophyte like me.

Would it be easier to reinstall and bring my library in from TimeMachine? I don't think Apple will help me since I've modified my system and honestly I wanted to learn a little more about the functioning of the system. Thanks in advance.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
34,138
15,606
California
Weaselboy, thanks for the help. Unfortunately I must be doing something wrong. I let the system work and it looked good but the process filled up my SSD to capacity (0 bytes free) and stopped. Terminal had a long string of x couldn't be moved because disk is full. Now my startup disk is full and I can't find what the duplication is. Any thoughts? Learning to work with this is fun but frustrating for a neophyte like me.

Would it be easier to reinstall and bring my library in from TimeMachine? I don't think Apple will help me since I've modified my system and honestly I wanted to learn a little more about the functioning of the system. Thanks in advance.

If you have a backup, my suggestion would be to use that backup to get your system where it was before then follow a guide like this one if you want to move your home folder.

You might be better off leaving the home folder where it is and just moving things like Documents, Music, Photos etc to the second drive. Those are what use the most space anyway.
 

Orlandoech

macrumors 68040
Original poster
Jun 2, 2011
3,341
887
*UPDATED 09.27.2013

DISCLAIMER #2: ALL "TWEAKS" ARE PERSONAL PREFERENCE. SOME USERS MAY FIND VALUE IN SOME OR ALL OF THE "TWEAKS" WHILE OTHERS MAY NOT, MOST NOTABLY STEP #5.


Added a new disclaimer simply because of the amount of emails and PMs I receive about Step #5. Keep in mind, all these tweaks are here to help you, whether you chose to do them or not is completely up to you based off your needs, situation and knowledge.

I personally only find value in;

  • Use Trim Enabler [3rd Party SSD's only]
  • Turn off local Time Machine snapshots [laptops only]
  • Turn off hibernation [laptops only]
 
Last edited:

dastinger

macrumors 6502a
Mar 18, 2012
818
3
Hey,

First of all, thanks for the guide. I have one question regarding hibernation. I understand that having it on makes the MBP save everything in case it runs out of battery while sleeping. If I disable it and, one day, run out of battery while working.. What will happen? The MBP just turns off and does not save anything? Once I get home and charge it, it'll just boot to OS X again like I shut it down normally?
 

MrX8503

macrumors 68020
Sep 19, 2010
2,292
1,614
For those that own a late 2013 retina macbook model...are you having sleep issues?

I've discovered that making the sleep image immutable keeps my rMBP from sleeping and drained my battery from 100% to 10% overnight. Once I disabled this, my rMBP was able to sleep normally.

Hey,

First of all, thanks for the guide. I have one question regarding hibernation. I understand that having it on makes the MBP save everything in case it runs out of battery while sleeping. If I disable it and, one day, run out of battery while working.. What will happen? The MBP just turns off and does not save anything? Once I get home and charge it, it'll just boot to OS X again like I shut it down normally?

You lose everything that wasn't saved to your hard drive or to the cloud. It'll reboot normally once you get it charged again.
 

zorinlynx

macrumors G3
May 31, 2007
8,170
17,694
Florida, USA
Newer MacBooks use hibernation more actively, rather than just as "insurance" in case the battery goes dead.

After some time asleep, the laptop will mostly shut down. This reduces battery drain when asleep. Wake up will be a bit slower, but still fast since SSDs are so quick. This whole setup permits your machine to sleep for a whole week and only lose a couple % of battery life, unlike older MacBooks where you'd lose the whole battery over a long weekend of being asleep!

Therefore, disabling hibernation is not recommended on more recent (post 2012) machines.
 

MrX8503

macrumors 68020
Sep 19, 2010
2,292
1,614
Newer MacBooks use hibernation more actively, rather than just as "insurance" in case the battery goes dead.

After some time asleep, the laptop will mostly shut down. This reduces battery drain when asleep. Wake up will be a bit slower, but still fast since SSDs are so quick. This whole setup permits your machine to sleep for a whole week and only lose a couple % of battery life, unlike older MacBooks where you'd lose the whole battery over a long weekend of being asleep!

Therefore, disabling hibernation is not recommended on more recent (post 2012) machines.

Good to know. Hopefully this guide updates and lists disabling hibernation for 2013 macs as not recommended.
 

coes66

macrumors newbie
Jan 8, 2011
6
0
Thank you for the great guide! I have a question regarding 3. Turn off hibernation [laptops only] - *UPDATED 01.16.2013.

When entering the first command, I receive this message:
Code:
Warning: Idle sleep timings for "Battery Power" may not behave as expected.
- Disk sleep should be non-zero whenever system sleep is non-zero.
Warning: Idle sleep timings for "AC Power" may not behave as expected.
- Display sleep should have a lower timeout than system sleep.
- Disk sleep should be non-zero whenever system sleep is non-zero.

Does this affect the final outcome, or is is this an expected result? It appears that hibernation is, in fact, disabled, as I see hibernate mode 0 but I'm not sure.

Thank you again for the guide and any replies to this query.
 

hdcrow

macrumors newbie
Feb 24, 2014
1
0
Thanks for the guide!, but I did everything in number 3 (turn off hibernation) and the image in "private/var/vm/sleepimage is there and is using 1.1 Gb I know is A LOT LESS than 16 Gb (16 Gb of ram is what I have) but isn't that image supposed to be a few MB's only after I make the file immutable?.
Another question is how to revert this tweak back to normal? is been asked twice in the forum but no body has responded.
thanks for the help and information
 

jbachandouris

macrumors 603
Aug 18, 2009
5,779
2,905
Upstate NY
I installed a Samsung EVO 840 in my mid 2010 MBP. The battery is new as Apple just replaced it. I installed Mavericks clean from a USB stick and restored backup from my Time Capsule.

You mentioned fan speed issues. I have iStatPro installed and it says my fan is running at 1998-2000 rpm. Should I be concerned. The EVO does not show up in its temp displays.

Battery life seems to be at least an hour worse. Don't notice much of a speed difference over my stock Hitachi.

Disabled local Time Machine Backups and used Trim Enable.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.