Not too long ago, using Linux on notebooks requires that you shutdown the system before closing the lid because hibernation or sleep is a hit-or-miss affair (heck, the same can be said of Windows! hehe). Today, hibernation comes a long way already. Since I do not use Linux on a portable computer (except as a guest OS on my Mac), I don't have the opportunity to do this. Don't fret, I have just the tutorial for you. It talks about several ways of achieving hibernation, making it a must read. Here's an excerpt:
The three different methods available target three different types of users. If you just want your system to hibernate and have no desire to tinker with your kernel, swsusp is definitely for you. On the contrary, suspend2 gives you greater speed and flexibility. If you are one of those who fancies writing his own userspace program, go for uswsusp. Get set and take your pick!
So give it a try and tell us which one works for you.