Home      Discussion      Topics      Dictionary      Almanac
Signup       Login
Hibernate (OS feature)

Hibernate (OS feature)

Discussion
Ask a question about 'Hibernate (OS feature)'
Start a new discussion about 'Hibernate (OS feature)'
Answer questions from other users
Full Discussion Forum
 
Encyclopedia
Hibernation in computing is powering down a computer while retaining its state.

Upon hibernation, the computer saves the contents of its random access memory (RAM) to a hard disk
Hard disk
A hard disk drive is a non-volatile, random access digital magnetic data storage device. It features rotating rigid platters on a motor-driven spindle within a protective enclosure. Data is magnetically read from and written to the platter by read/write heads that float on a film of air above the...

 or other non-volatile storage. Upon resumption, the computer is exactly as it was upon entering hibernation.

When used to save power, hibernation is similar to sleep mode
Sleep mode
Sleep mode refers to a low power mode for electronic devices such as computers, televisions, and remote controlled devices. These modes save significant electrical consumption compared to leaving a device fully on and idle, but allow the user to avoid having to reset programming codes or wait for a...

 and saves more power at the cost of slower resumption.

Uses of hibernation


Hibernation saves electrical power. After hibernating, the hardware is completely powered down (just like for a regular shutdown). Therefore a hibernated machine uses no more electrical power than one which is switched off. Meanwhile, hibernation is a means of avoiding the burden of saving unsaved data before shutting down and restoring all running programs after powering back on.

Hibernation is used in laptop
Laptop
A laptop, also called a notebook, is a personal computer for mobile use. A laptop integrates most of the typical components of a desktop computer, including a display, a keyboard, a pointing device and speakers into a single unit...

s, which have limited battery power available. It can be set to happen automatically on a low battery alarm. Most desktops also support hibernation, mainly as a general energy saving measure.

Problems with hibernation


In some cases entering into hibernation can cause incorrect operation on restarting, due to problems with the hibernation software, or with devices or software which is not fully compliant. Hibernation will also usually cause connections to peripheral
Peripheral
A peripheral is a device attached to a host computer, but not part of it, and is more or less dependent on the host. It expands the host's capabilities, but does not form part of the core computer architecture....

 devices to terminate; this may cause problems for peripherals that were in use when hibernation started.

Some organizations (mainly large enterprises) mandate automatic hibernation (e.g. as a network policy) if a computer system has been idle for a certain amount of time, mainly as an energy saving measure. This saves some energy at the cost of some lost productivity waiting for the state to be restored.

Comparison to sleep mode


Many systems also support a low-power sleep mode
Sleep mode
Sleep mode refers to a low power mode for electronic devices such as computers, televisions, and remote controlled devices. These modes save significant electrical consumption compared to leaving a device fully on and idle, but allow the user to avoid having to reset programming codes or wait for a...

 or stand by mode in which the processing functions of the machine are powered down, using a little power to preserve the contents of RAM and support waking up; wakeup is almost instantaneous.

The advantage of sleep mode is that resuming is much quicker than for hibernation. A hibernated system must start up, then read back data to RAM on resuming, which typically takes on the order of tens of seconds, while a system in sleep mode only needs to power up CPU and display, which is almost instantaneous. On the other hand, a system in sleep mode still consumes some power, while a hibernated system does not require any power at all: power can be completely disconnected. A sleeping computer is a case of a device consuming standby power
Standby power
Standby power, also called vampire power, vampire draw, phantom load, or leaking electricity , refers to the electric power consumed by electronic and electrical appliances while they are switched off Standby power, also called vampire power, vampire draw, phantom load, or leaking electricity...

, covered by regulations in many countries limiting such power under the One Watt Initiative
One Watt Initiative
The One Watt Initiative is an energy-saving initiative by the International Energy Agency to reduce standby power-use by any appliance to not more than one watt in 2010, and 0.5 watts in 2013, which has given rise to regulations in many countries and regions.-Standby power:Standby power,...

 to one watt from 2010. Since these facilities were introduced, most systems have come to offer both sleep mode and hibernation.

Hybrid sleep


Sleep mode and hibernation can be combined: The contents of RAM are copied to non-volatile storage and the computer enters sleep mode. This approach combines the benefits of sleep mode and hibernation: The machine can resume instantaneously, and its state, including open and unsaved files, will survive a power outage.

Operating system support


Early implementations of hibernation used the BIOS
BIOS
In IBM PC compatible computers, the basic input/output system , also known as the System BIOS or ROM BIOS , is a de facto standard defining a firmware interface....

, but modern operating systems usually handle hibernation. Hibernation is defined as sleeping mode S4 in the ACPI
Advanced Configuration and Power Interface
In computing, the Advanced Configuration and Power Interface specification provides an open standard for device configuration and power management by the operating system....

 specification.

Microsoft Windows


On Windows computers, hibernation is available only if all hardware is ACPI
Advanced Configuration and Power Interface
In computing, the Advanced Configuration and Power Interface specification provides an open standard for device configuration and power management by the operating system....

 and Plug-and-play
Plug-and-play
In computing, plug and play is a term used to describe the characteristic of a computer bus, or device specification, which facilitates the discovery of a hardware component in a system, without the need for physical device configuration, or user intervention in resolving resource conflicts.Plug...

 compliant, and additionally all drivers are PnP
Plug-and-play
In computing, plug and play is a term used to describe the characteristic of a computer bus, or device specification, which facilitates the discovery of a hardware component in a system, without the need for physical device configuration, or user intervention in resolving resource conflicts.Plug...

-compatible. The Microsoft Help and Support website also describes a command line instruction to invoke hibernation, in article #555569; such command line instructions can be added to many keyboard instruction sets to hibernate computers at the touch of a (programmable) button.

Windows 95 supported hibernation through hardware manufacturer-supplied drivers and only if compatible hardware and BIOS
BIOS
In IBM PC compatible computers, the basic input/output system , also known as the System BIOS or ROM BIOS , is a de facto standard defining a firmware interface....

 were present. Since Windows 95 supported only Advanced Power Management
Advanced Power Management
Advanced power management is an API developed by Intel and Microsoft and released in 1992 which enables an operating system running an IBM-compatible personal computer to work with the BIOS to achieve power management.Revision 1.2 was the last version of the APM specification, released in 1996....

 (APM), hibernation was then known as Suspend-to-Disk. Windows 98 and later support ACPI. However, hibernation often caused problems since most hardware was not fully ACPI
ACPI
ACPI may refer to:*Advanced Configuration and Power Interface for computer configuration and management*Animation Council of the Philippines, Inc....

 1.0 compliant or did not have WDM
Windows Driver Model
In computing, the Windows Driver Model — also known at one point as the Win32 Driver Model — is a framework for device drivers that was introduced with Windows 98 and Windows 2000 to replace VxD, which was used on older versions of Windows such as Windows 95 and Windows 3.1, as well...

 drivers. There were also issues with the FAT32 file system.

Windows 2000
Windows 2000
Windows 2000 is a line of operating systems produced by Microsoft for use on personal computers, business desktops, laptops, and servers. Windows 2000 was released to manufacturing on 15 December 1999 and launched to retail on 17 February 2000. It is the successor to Windows NT 4.0, and is the...

 was the first Windows release to support hibernation at the operating system level (OS-controlled ACPI S4 sleep state) without special drivers from the hardware manufacturer. A file, "hiberfil.sys" is used to store the contents of RAM when the computer hibernates, and is always the same size as the total RAM
Ram
-Animals:*Ram, an uncastrated male sheep*Ram cichlid, a species of freshwater fish endemic to Colombia and Venezuela-Military:*Battering ram*Ramming, a military tactic in which one vehicle runs into another...

. A hidden system file resides in the root of the system partition, usually "C:\hiberfil.sys". This file is a full snapshot of the physical RAM
Ram
-Animals:*Ram, an uncastrated male sheep*Ram cichlid, a species of freshwater fish endemic to Colombia and Venezuela-Military:*Battering ram*Ramming, a military tactic in which one vehicle runs into another...

 memory compressed with an LZXPRESS algorithm, and contains further information including processor state. Although this file is undocumented, a security researcher, Matthieu Suiche, documented it during Black Hat Briefings
Black Hat Briefings
The Black Hat Conference is a computer security conference that brings together a variety of people interested in information security. Representatives of federal agencies and corporations attend along with hackers. The Briefings take place regularly in Las Vegas, Barcelona and Tokyo...

 2008 and has also provided a computer forensics
Computer forensics
Computer forensics is a branch of digital forensic science pertaining to legal evidence found in computers and digital storage media...

 framework to manage and convert this file into a readable memory dump.

Windows Me
Windows Me
Windows Millennium Edition, or Windows Me , is a graphical operating system released on September 14, 2000 by Microsoft, and was the last operating system released in the Windows 9x series. Support for Windows Me ended on July 11, 2006....

, the last release in the Windows 9x
Windows 9x
Windows 9x is a generic term referring to a series of Microsoft Windows computer operating systems produced since 1995, which were based on the original and later modified Windows 95 kernel...

 family, also supports OS controlled hibernation and requires half the amount of disk space of the computer's RAM
Ram
-Animals:*Ram, an uncastrated male sheep*Ram cichlid, a species of freshwater fish endemic to Colombia and Venezuela-Military:*Battering ram*Ramming, a military tactic in which one vehicle runs into another...

.

Windows XP
Windows XP
Windows XP is an operating system produced by Microsoft for use on personal computers, including home and business desktops, laptops and media centers. First released to computer manufacturers on August 24, 2001, it is the second most popular version of Windows, based on installed user base...

 further improved support for the hibernate function. Hibernation and resume-from-hibernate are much faster as memory pages are compressed using an improved algorithm, compression is overlapped with disk writes, unused memory pages are freed and DMA
Direct memory access
Direct memory access is a feature of modern computers that allows certain hardware subsystems within the computer to access system memory independently of the central processing unit ....

 transfers are used during I/O.

Windows Vista
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...

 introduced a Hybrid Sleep feature for desktop computers, which when enabled, combines hibernation with standby (sleep) by saving the contents of volatile memory to hard disk before entering sleep mode. If power to memory is lost, it will use the hard disk to wake up. Users have the option of hibernating directly without enabling hybrid sleep if they wish.

Windows 7 introduced the ability to compress the hibernation file using powercfg.exe. It can be set from anywhere between 50% to 100% of the total physical memory using the -size switch in powercfg.exe, so the hibernation file is compressed and uses less disk space. The default size is 75%

Windows 8
Windows 8
Windows 8 is the codename for the next version of the Microsoft Windows computer operating system following Windows 7. It has many changes from previous versions. In particular it adds support for ARM microprocessors in addition to the previously supported x86 microprocessors from Intel and AMD...

's resume-from-hibernation algorithm is multi-core optimized. Windows 8 also introduces a Hybrid Boot feature. When users select the Shut Down option, it hibernates the computer, but closes all programs and logs out the user session before hibernating. According to Microsoft, a regular hibernation includes more data in memory pages which takes longer to be written to disk. In comparison, when the user session is closed, the hibernation data is much smaller and therefore takes lesser time to write to disk and resume. Users have the option of performing a traditional shutdown by holding down the Shift key while clicking Shut Down.

Hibernate is often under-used in business environments as it is difficult to enable post-deployment without resorting to third-party PC power management
PC power management
PC power management refers to the mechanism for controlling the power use of personal computer hardware. This is typically through the use of software that puts the hardware into the lowest power demand state available...

 software This omission by Microsoft has been criticized as having led to a huge waste in energy.

There is a significant market in third-party PC power management
PC power management
PC power management refers to the mechanism for controlling the power use of personal computer hardware. This is typically through the use of software that puts the hardware into the lowest power demand state available...

 software offering features beyond those present in the Windows operating system. available. Most products offer Active Directory
Active Directory
Active Directory is a directory service created by Microsoft for Windows domain networks. It is included in most Windows Server operating systems. Server computers on which Active Directory is running are called domain controllers....

 integration and per-user/per-machine settings with the more advanced offering multiple power plans, scheduled power plans, anti-insomnia features and enterprise power usage reporting. Notable vendors include 1E
1E
1E is a privately owned software company based in the United Kingdom. 1E has offices in London, New York, Frankfurt, Paris, and Noida. The company develops automated software solutions to address complexity, management costs and power consumption...

 NightWatchman., Data Synergy PowerMAN (Software)
PowerMAN (Software)
PowerMAN is a computer software program that allows PC power management to be centrally monitored and managed. The software allows an enterprise-wide power management strategy to be implemented. The product is used by many public sector organisations in both the US and UK. It is also used by...

 and Verdiem
Verdiem
Verdiem is a software corporation based in Seattle, WA. The company is privately owned and backed by venture capital. . Verdiem produces the Surveyor enterprise-class PC power management software and the free Edison home-use solution. The company has OEM agreements with Hewlett-Packard and Cisco...

 SURVEYOR

Windows hibernation mode can be disabled as well as the side benefit of deleting the hiberfil.sys file using a simple command.

Mac OS X


On Macs, a feature known as Safe Sleep saves the contents of volatile memory to the system hard disk each time the Mac enters Sleep mode. The Mac can instantaneously wake from sleep mode if power to the RAM has not been lost. However, if the power supply was interrupted, such as when removing batteries without an AC power connection, the Mac would wake from Safe Sleep instead, restoring memory contents from the hard drive. Because Safe Sleep's hibernation process occurs during regular Sleep, the Apple menu
Apple menu
The Apple menu has been a feature in Apple's Mac OS since its inception. It is the first item on the left hand side of the menu bar. The Apple menu's role has changed throughout the release history of Mac OS, but the menu has always featured a version of the Apple logo.-System 6 and earlier:In...

 does not have a "hibernate" option.

Safe Sleep capability is found only in new Mac models starting with the October 2005 revision of the PowerBook G4
PowerBook G4
The PowerBook G4 are a series of notebook computers that were manufactured, marketed, and sold by Apple, Inc. between 2001 and 2006 as part of its PowerBook line. It uses the PowerPC G4 processor, initially produced by Motorola and later by Freescale, after Motorola spun off its semiconductor...

 (Double-Layer SD). Mac OS X v10.4
Mac OS X v10.4
Mac OS X v10.4 Tiger is the fifth major release of Mac OS X, Apple's desktop and server operating system for Macintosh computers. Tiger was released to the public on 29 April 2005 for US$129.95 as the successor to Mac OS X Panther , which had been released 18 months earlier...

 or higher is also required.

Shortly after Apple started supporting Safe Sleep, Mac enthusiasts released a hack to enable this feature for much older Mac computers running Mac OS X v10.4. Classical Mac OS
Mac OS
Mac OS is a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems. The Macintosh user experience is credited with popularizing the graphical user interface...

 once also supported hibernate, but this feature was dropped by Apple.

Linux


In the Linux kernel
Linux kernel
The Linux kernel is an operating system kernel used by the Linux family of Unix-like operating systems. It is one of the most prominent examples of free and open source software....

, Hibernate or suspend-to-disk, suspend-to-ram, suspend-to-file is implemented by swsusp
Swsusp
swsusp is a suspend-to-disk implementation in the 2.6 series Linux kernel. It is the Linux equivalent of Windows hibernate functionality...

 which is built into the 2.6 series. An alternative implementation is TuxOnIce which is available as patches for the 2.4 and 2.6 kernels. Other alternative implementations also exist, namely, uswsusp
Uswsusp
uswsusp is a suspend-to-ram and suspend-to-disk implementation for the Linux operating system, compatible with kernels 2.6.17 and onwards. It supports both s2ram and s2disk , as well as a mode called "s2both", which saves state to disk and RAM...

 (user-space suspend). TuxOnIce provides advantages such as support for SMP
Symmetric multiprocessing
In computing, symmetric multiprocessing involves a multiprocessor computer hardware architecture where two or more identical processors are connected to a single shared main memory and are controlled by a single OS instance. Most common multiprocessor systems today use an SMP architecture...

, 4GB high mem and preemption
Preemption (computing)
In computing, preemption is the act of temporarily interrupting a task being carried out by a computer system, without requiring its cooperation, and with the intention of resuming the task at a later time. Such a change is known as a context switch...

.

See also

  • Advanced Configuration and Power Interface
    Advanced Configuration and Power Interface
    In computing, the Advanced Configuration and Power Interface specification provides an open standard for device configuration and power management by the operating system....

  • Booting
    Booting
    In computing, booting is a process that begins when a user turns on a computer system and prepares the computer to perform its normal operations. On modern computers, this typically involves loading and starting an operating system. The boot sequence is the initial set of operations that the...

  • Green computing
    Green computing
    Green computing or green IT, refers to environmentally sustainable computing or IT. In the article Harnessing Green IT: Principles and Practices, San Murugesan defines the field of green computing as "the study and practice of designing, manufacturing, using, and disposing of computers, servers,...

  • PC power management
    PC power management
    PC power management refers to the mechanism for controlling the power use of personal computer hardware. This is typically through the use of software that puts the hardware into the lowest power demand state available...

  • Sleep mode
    Sleep mode
    Sleep mode refers to a low power mode for electronic devices such as computers, televisions, and remote controlled devices. These modes save significant electrical consumption compared to leaving a device fully on and idle, but allow the user to avoid having to reset programming codes or wait for a...

  • Shutdown
    Shutdown (computing)
    To shut down or power off a computer is to remove power from a computer's main components in a controlled way. After a computer is shut down, main components such as CPUs, RAM modules and hard disk drives are powered down, although some internal components, such as an internal clock, may retain...