When leaving the computer for a long time it seems convenient to hibernate it instead of shutting down - all the programs remain in the same state when resumed. Are there any drawbacks in doing so?
Generally there is no reason not to use it. Just keep in mind, that there are cases, that it won't work as expected.
These apply both for hibernation and suspend (to RAM):
- some applications are not hibernation-aware. Eg. games tend to crash.
- some WiFi drivers have trouble with hibernation.
- networked applications loose connection and most do not reconnect automatically.
- DHCP is not invoked, old IP is used, which by then might have been reassigned.
Hibernation vs suspend:
- wake up from suspend is immediate, hibernation must load from HDD.
- for hibernation you need space on HDD (a least of a size of memory occupied).
- hibernation consumes no power at all, while suspend consumes minimal power (few Watts).
If your computer is capable of S3 Sleep (ultra-low power consumption) there isn't a compelling reason for a desktop to be placed in hibernation. Hibernation has a high user impact, as it generally takes 1+ minute to wake up.
If you're using a laptop, and you need to use full-disk encryption to protect customer or other data, you absolutely must enable hibernation and disable sleep. Why? A sleeping laptop can be woken up to a boot prompt/screen lock screen, at which point an attacker can capture the drive's encryption key via Firewire port or by exploiting a Windows, application or other OS vulnerability.
This may seem far-fetched, but tools are easily downloadable to do these things, and any attacker targeting you is capable of this.
Needs some extra hard disk space to dump the memory
May cause some IP related problems specially with DHCP
If you have any apps or drivers that are leaking memory, you will eventually run very short. This is a non-ideal world problem that may occur. Under ideal circumstances, everything should resume as usual and you can repeatedly hibernate indefinitely.
If you have a dual boot environment and you allow the other OS, say a Linux variant, access to the NTFS partitions, then hibernate is astonishingly dangerous.
If you hibernate your device, and then reboot into Linux, the NTFS file system is invariably corrupted with real data loss.
Otherwise, I use Suspend to RAM on both Windows and SLED Linux without issue. Hibernate is ok, but it takes too long to return, so unless I plan to leave the device without power for longer than a week, I exclusively use suspend to RAM.
Drawbacks I've found is that sometimes the machine is insanely slow for awhile after coming back from hibernation, some machines won't come back at all from hibernation, and some apps will crash after resuming (things that use CUDA, like seti@home seem to be a problem, and sometimes virtual machines under the hibernated OS have issues).
Generally speaking though, hibernation has proven to be the best option for me for most times. I very rarely ever have to close my apps anymore. I hibernate at the end of the day, then resume right where I left off later on!
One reason not to let your computer go into hibernation is if you want to access it remotely (Remote Desktop.)
If you have a VPN connection, you'll have to reconnect after waking up the computer.
One of the drawbacks of suspend is that if the power is lost during suspend, your machine state is gone.
If you insist on using hibernation, keep in mind that hibernating 2-4 GB machine it may take quite a lot of time to save and read hibernation file. In my case,defragmenting disk and then defragmenting hibernation file helped me tremendously when disk was nearly full.
- Network connections are lost
- System is not remotely manageable
- It doesn't always work (example: the laptop I'm typing this on)