If you own a MacBook, then you know the default behavior when you close the laptop lid (while it is turned on and running) is that it goes to sleep. During this sleep mode, the contents of the RAM are saved, while it is still supplied with power. Everything else is powered off. This means that any running applications stop running.
Though this is a great feature to save battery power, it can be annoyance on some occasions. Say, for example, that you want to leave the MacBook on overnight for BitTorrent downloads or maybe until it finishes a video encoding/decoding job. You can leave the lid open, but that isn’t usually preferred, because both your keyboard and screen keep collecting dust.
Sadly, there is no option in the Mac OS X System Preferences to change this behavior. When you close the lid on your MacBook, it will go to sleep.
InsomniaX is a small utility that allows you to close your laptop lid, without your system going to sleep. It does this by using the Insomnia kernel module, which interrupts the attempt made by Mac OS X to force your system to go to sleep.
You can set up InsomniaX to automatically load on system startup. InsomniaX sits in your menu bar, and has a pretty simple list of options and preferences.
- Enable/Disable Insomnia – This is used to enable or disable the Insomnia mode manually. When Insomnia mode is enabled, your MacBook will not go to sleep on closing the lid.
- Sleep Display – This just shuts off the display on your MacBook. Everything else keeps running, just the display goes black.
- Sleep System – Puts your system to sleep (turns everything off) except for the RAM. This can be used to force your system to sleep even if the lid is open.
- Preferences >> Load on AC – Tick this option if you want InsomniaX to be loaded only when your MacBook is connected to an AC power source. This is a very useful option, because I want my MacBook to go to sleep only when connected to the charger, and I want it to go to sleep and save battery, when disconnected from a power source.
- Preferences >> Load on battery – Loads Insomnia mode when running using the battery power.
- Preferences >> Load on start – Enables the Insomnia mode as soon as InsomiaX is launched.
To start InsomniaX on system start,
- Open up System Preferences from the Applications folder.
- Under the ‘System’ section, click ‘Accounts’.
- Select your user name from the left side pane.
- Go to the ‘Login Items’ tab.
- Click the ‘+’ icon, browse to the location of InsomniaX on your system, and then click ‘Add’. You can now exit System Preferences.