Blog Archives

#MacOsX : Reset NVRAM, PRAM and SMC

Sometimes after a software (system) or hardware upgrade even Macs can have some problems; if you have tried every solution without success you could try this.

Every Mac stores certain settings in a special memory area even if it is turned off. On Intel-based Macs, this is stored in memory known as NVRAM; on PowerPC-based Macs, this is stored in memory known as PRAM.

Resetting NVRAM and PRAM may solve lot of problems and could be required if you upgrade SSD or Mac firmware (more tips on SSDs here).

Another step to try is Resetting the System Management Controller (SMC). An SMC reset should only be attempted after all other standard troubleshooting has been performed.

 

 

Advertisement

#MacOsX : Disable Auto-Save and Versions in Mac OS X

Auto-Save and Versions are excellent features in Mac OS X, but some advanced users are annoyed by  them as they often don’t want to save intermediate versions of their work.
Moreover some apps write lots of data on disk (e.g. iMovie and iBooks Author) and this can shorten the life of SSD (look here for more tuning for SSDs).
If you know the name of the app plist you want to disable auto-save and Versions for, you can just plug the name into the defaults write command:

defaults write app-plist ApplePersistence -bool no

If you don’t know it then you can find it with the following command:

osascript -e 'id of application "NAME OF APP"'

Now if you enter the Versions window, auto-save list will be empty and there are no versions to restore to. You’ll probably want turn off File Locking too.

NOTE: some sandboxed apps require another command in addition:

defaults write app-plist AutosavingDelay -int 0

This is expecially true for TextEdit as it is the only Apple app that uses “old-style” autosaving and this causes issues with the sandbox in Lion/Mountain Lion.

NOTE2: It seems that the preference can be set globally but it may cause the login process to become very slow and possibly cause other unexpected behaviour:

defaults write -g ApplePersistence -bool no

#MacOSX : Disable Hibernation & SSD Tweaks

SSD are based on NAND Flash which have limited writes life. Currently 25nm chips support 3000-5000 cycles then they become read only.

This limitation makes very important avoid unneeded writes on the disk.

Moreover power save technologies can give some trouble (of course on SandForce controllers).

So this are some steps to Tweak your host system to give you the best experience:

  1. Turn off hibernation. To do this, open terminal app and type:
    sudo pmset -a hibernatemode 0

    Enter admin password and let’s do it the magic.
    This will prevent GB of writes every time you close the lid of your notebook.

  2. Remove unused hibernation file to free up as much space as your RAM:
    sudo rm /var/vm/sleepimage
  3. Open System Preferences and go to Energy Saver, than uncheck
    Put the hard disk(s) to sleep when possible
    both on Battery and Power Adapter tabs.
    This will prevent disk freezes and beachballs.
  4. If you have a SATA 2 interface and a Nvidia chipset on your Mac, check to have 3 Gbps Negotiated Link Speed.
    Go to Serial-ATA section in System Information app to take a look of your disk(s).
    This will ensure optimal performance of SSD.

NOTE: there are more Hacks, like enabling TRIM for non Apple supported SSDs but they give more troubles that other therefore I advice against to engage in similar enterprises.

NOTE 2: WARNING!!! Apple MacBook Air and MacBook Pro Update 2.0 seems to change the way “safesleep” is handled. If you currently have safesleep disabled in order to free up the drive space required by the sleep image, this will cause it to come back and even setting hibernatemode = 0 won’t change it. Quick untested FIX:

cd /var/vm
sudo rm sleepimage
sudo ln -s /dev/null sleepimage
%d bloggers like this: