Visual Development Lab

Lab McMaster

   Site map
McMaster logo


Map
People
Our Research
Publications
Nuts & Bolts

Computers

Laptops

Maintenance. OS X does a certain amount of housecleaning in the wee hours of the morning. If you put your laptop away overnight, this housecleaning will not get done. To have it done while you are using the computer, install Anacron. This is free for the downloading.

Security. Laptops are often stolen. If your laptop holds confidential information, or if you keep passwords in the Keychain, it would be prudent to encrypt your home directory with FileVault. (Security tab of System Preferences.) Encryption is also prudent for international travel, because Customs officials in the United States and the U.K (and presumably elsewhere) have the right (or take it anyway) to examine the contents of any traveller's laptop, either if they are suspicious of something or merely as a random check, and to confiscate the machine while they are doing so and keep it for as long as they require. Note, though, that an encrypted home directory converts all of your small files into one enormous one and that file can easily be destroyed if something interferes with the encrypting process. Be sure that it is very well backed up.

Awakening. Apple set their laptops to awaken immediately when the lid is opened. This is convenient but if the catch slips open inside a carrying case, the computer may awaken therein. That will drain the battery and, if a CPU-intensive process was interrupted when you closed the case, the running computer may overheat. It is prudent to disable this feature, so that awakening the laptop requires a system event like a key-press, as a desktop computer does. This Terminal command will do it:

sudo pmset lidwake 0

Sleeping. Setting a variable named hibernatemode allows you to choose how the laptop goes to sleep. This matters because it amounts to a choice of how you may be inconvenienced or lose your data. Here are the choices:

  • 0 - RAM is powered on while sleeping, nothing is written to disk. Immediate sleep, immediate wake, more power used. Total power loss destroys contents of memory.
  • 1 - RAM is written to disk then shut off. After awakening, RAM is read from disk. Slow sleep, slow wake, less power used. Not affected by total power loss.
  • 3 - RAM is is written to disk but left on. Slow sleep, immediate wake, more power used. Not affected by total power loss.
  • 5 - Encrypted version of mode 1, for use with secure virtual memory (in the Security tab of System Preferences).
  • 7 - Encrypted version of mode 3, for use with secure virtual memory.

Writing RAM to disk sounds prudent but it has a hidden danger. If some process prevents the computer from going to sleep, then it may run while sitting in its case, which will run down the battery and may cause the computer to overheat. Thus, the safe use of modes other than 0 requires waiting for the laptop to go to sleep before backing it up; i.e., waiting for its LED to begin to pulse.

To see the current setting, enter:

sudo pmset -g | grep hibernatemode

To change the setting first enter this, typing 0, 1, 3, 5 or 7 instead of N:

sudo pmset -a hibernatemode N

Then, if you set hibernatemode to 0, enter:

sudo rm /private/var/vm/sleepimage

News

Valid HTML 4.0!