HOME

TheInfoList



OR:

Hibernation (also known as suspend to disk, or Safe Sleep on Macintosh computers) in computing is powering down a computer while retaining its state. When hibernation begins, the computer saves the contents of its random access memory (RAM) to a hard disk or other
non-volatile storage Non-volatile memory (NVM) or non-volatile storage is a type of computer memory that can retain stored information even after power is removed. In contrast, volatile memory needs constant power in order to retain data. Non-volatile memory typi ...
. When the computer is turned on the RAM is restored and the computer is exactly as it was before entering hibernation. Hibernation was first implemented in 1992 and patented by
Compaq Computer Corporation Compaq Computer Corporation (sometimes abbreviated to CQ prior to a 2007 rebranding) was an American information technology company founded in 1982 that developed, sold, and supported computers and related products and services. Compaq produced ...
in
Houston Houston (; ) is the most populous city in Texas, the most populous city in the Southern United States, the fourth-most populous city in the United States, and the sixth-most populous city in North America, with a population of 2,304,580 i ...
, Texas. As of 2020, Microsoft's
Windows 10 Windows 10 is a major release of Microsoft's Windows NT operating system. It is the direct successor to Windows 8.1, which was released nearly two years earlier. It was released to manufacturing on July 15, 2015, and later to retail on J ...
employs a type of hibernation by default when shutting down.


Uses

After hibernating, the hardware is powered down like a regular shutdown. The system can have a total loss of power for an indefinite length of time and then resume to the original state. Hibernation is mostly used in laptops, 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 and allows for replacement of a removable battery quickly. Google and Apple mobile hardware ( Android,
Chromebook A Chromebook (sometimes stylized in lowercase as chromebook) is a laptop or tablet running the Linux-based ChromeOS as its operating system. Initially designed to heavily rely on web applications for tasks using the Google Chrome browser, Chrome ...
s,
iOS iOS (formerly iPhone OS) is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating system that powers many of the company's mobile devices, including the iPhone; the term also include ...
) do not support hibernation. Apple hardware using
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
calls hibernation Safe Sleep.


Comparison to sleep mode

Many systems support a low-power
sleep mode Sleep mode (or suspend to RAM) is a low power mode for electronic devices such as computers, televisions, and remote controlled devices. These modes save significantly on electrical consumption compared to leaving a device fully on and, upon resu ...
in which the processing functions of the machine are lowered, using a trickle of power to preserve the contents of RAM and support waking up. Instantaneous resumption is one of the advantages of sleep mode over hibernation. A hibernated system must start up and read data from permanent storage and then transfer that back to RAM, which takes longer and depends on the speed of the permanent storage device, often much slower than RAM memory. A system in sleep mode only needs to power up the CPU and display, which is almost instantaneous. On the other hand, a system in sleep mode still consumes power to keep the data in the RAM. Detaching power from a system in sleep mode results in data loss, while cutting the power of a system in hibernation has no risk; the hibernated system can resume when and if the power is restored. Both shut down and hibernated systems may consume
standby power Standby power, also called vampire power, vampire draw, phantom load, ghost load or leaking electricity ("phantom load" and " leaking electricity" are defined technical terms with other meanings, adopted for this different purpose), refers to ...
unless they are unplugged. Hibernation is a means of avoiding the burden of saving unsaved data before shutting down and restoring all running programs and re-opening documents and browser tabs. Both hibernation and sleep preserve memory fragmentation and atrophy that lead to mobile devices working more poorly the longer you avoid a power off. This is why many experts recommend a frequent shut down or reboot of electronic devices.


First implementation

The first working retail hibernation was in 1992 on the Compaq LTE Lite 386 as noted in its sales material. It is made possible in part due to the sleep and protected mode
opcodes In computing, an opcode (abbreviated from operation code, also known as instruction machine code, instruction code, instruction syllable, instruction parcel or opstring) is the portion of a machine language instruction that specifies the operat ...
in the Intel 386 CPU. It was implemented in
ROM Rom, or ROM may refer to: Biomechanics and medicine * Risk of mortality, a medical classification to estimate the likelihood of death for a patient * Rupture of membranes, a term used during pregnancy to describe a rupture of the amniotic sac * ...
and worked independently of the operating system with no drivers needed. The LTE would sense low battery and prevented data loss by making use of a hidden
partition Partition may refer to: Computing Hardware * Disk partitioning, the division of a hard disk drive * Memory partition, a subdivision of a computer's memory, usually for use by a single job Software * Partition (database), the division of a ...
. It preserved and restored the system in the midst of disk writes and operations with a math
co-processor A coprocessor is a computer processor used to supplement the functions of the primary processor (the CPU). Operations performed by the coprocessor may be floating-point arithmetic, graphics, signal processing, string processing, cryptography ...
. It could also be controlled using an optional software GUI or a customized keyboard shortcut. It was tested on DOS, Windows 3.1, Banyan Vines, and Novell Netware. Compaq's hibernation is also noted in an IBM patent from 1993.


Operating system support

Early implementations of hibernation used the BIOS as noted above, but modern operating systems usually handle hibernation themselves. Hibernation is defined as sleeping mode S4 in the
ACPI Advanced Configuration and Power Interface (ACPI) is an open standard that operating systems can use to discover and configure computer hardware components, to perform power management (e.g. putting unused hardware components to sleep), auto c ...
specification.


Microsoft Windows

On Windows computers, hibernation is available only if all hardware and
device drivers In computing, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabling operating systems and ot ...
are ACPI and
plug-and-play In computing, a plug and play (PnP) device or computer bus is one with a specification that facilitates the recognition of a hardware component in a system without the need for physical device configuration or user intervention in resolving reso ...
–compliant. This allows some desktop computers to hibernate quickly to SSD in the event of a power failure and power supplied to even a lightweight or aging UPS. Hibernation can be invoked from the
Start menu The Start menu is a graphical user interface element used in Microsoft Windows since Windows 95 and in other operating systems. It provides a central launching point for computer programs and performing other tasks in the Windows shell. It is name ...
or the command line.
Windows 95 Windows 95 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of operating systems. The first operating system in the 9x family, it is the successor to Windows 3.1x, and was released to manufacturi ...
supports hibernation through hardware manufacturer-supplied drivers and only if compatible hardware and BIOS are present. Since Windows 95 supports only
Advanced Power Management Advanced power management (APM) 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 (part of the computer's firmware) to achieve power ...
(APM), hibernation is called Suspend-to-Disk.
Windows 98 Windows 98 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. The second operating system in the 9x line, it is the successor to Windows 95, and was released to ...
and later support ACPI. However, hibernation often caused problems since most hardware was not fully ACPI 1.0 compliant or did not have WDM drivers. There were also issues with the FAT32 file system.
Windows 2000 Windows 2000 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It was the direct successor to Windows NT 4.0, and was released to manufacturing on December 15, 1999, and was officiall ...
is the first Windows to support hibernation at the operating system level (OS-controlled ACPI S4 sleep state) without special drivers from the hardware manufacturer. A hidden system file named "" in the root of the boot partition is used to store the contents of RAM when the computer hibernates. In Windows 2000, this file is as big as the total RAM installed.
Windows Me Windows Millennium Edition, or Windows Me (marketed with the pronunciation of the pronoun "me"), is an operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. It is the successor to Windo ...
, the last release in the
Windows 9x Windows 9x is a generic term referring to a series of Microsoft Windows computer operating systems produced from 1995 to 2000, which were based on the Windows 95 kernel and its underlying foundation of MS-DOS, both of which were updated in su ...
family, also supports OS controlled hibernation and requires disk space equal to that of the computer's RAM.
Windows XP Windows XP is a major release of Microsoft's Windows NT operating system. It was released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Windows 2000 for high-end and ...
further improved support for hibernation. Hibernation and resumption 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 transfers are used during I/O. contains further information including processor state. This file was documented by security researcher
Matthieu Suiche Matthieu Suiche (born September 22, 1988), also known as Matt and under the username msuiche, is a French hacker and entrepreneur widely known as the founder of MoonSols, and co-founder of CloudVolumes before it was acquired by VMWare in 2014. In ...
during
Black Hat Briefings Black Hat Briefings (commonly referred to as Black Hat) is a computer security conference that provides security consulting, training, and briefings to hackers, corporations, and government agencies around the world. Black Hat brings together ...
2008 who also provided a computer forensics framework to manage and convert this file into a readable memory dump. The compression feature was later documented by Microsoft as well. Although Windows XP added support for more than 4 gigabytes of memory (through
Windows XP 64-bit Edition Windows XP, which is the next version of Windows NT after Windows 2000 and the successor to the consumer-oriented Windows Me, has been released in several editions since its original release in 2001. Windows XP is available in many languages. In ...
and
Windows XP Professional x64 Edition Microsoft Windows XP Professional x64 Edition, released on April 25, 2005, is an edition of Windows XP for x86-64 personal computers. It is designed to use the expanded 64-bit memory address space provided by the x86-64 architecture. The prima ...
), this operating system, as well as
Windows Server 2003 Windows Server 2003 is the sixth version of Windows Server operating system produced by Microsoft. It is part of the Windows NT family of operating systems and was released to manufacturing on March 28, 2003 and generally available on April 24, 2 ...
,
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
and
Windows Server 2008 Windows Server 2008 is the fourth release of the Windows Server operating system produced by Microsoft as part of the Windows NT family of the operating systems. It was released to manufacturing on February 4, 2008, and generally to retail on F ...
do not support hibernation when this amount of memory is installed because of performance issues associated with saving such a large pool of data from RAM to disk. Windows Vista introduced a ''hybrid sleep'' feature, which saves the contents of memory to hard disk but instead of powering down, enters sleep mode. If the power is lost, the computer can resume as if hibernated.
Windows 7 Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on July 22, 2009, and became generally available on October 22, 2009. It is the successor to Windows Vista, released nearly ...
introduced compression to the hibernation file and set the default size to 75% of the total physical memory. Microsoft also recommends that the size be increased using the powercfg.exe tool in some rare workloads where the memory footprint exceeds that amount. It can be set from anywhere between 50% to 100%, although decreasing it is not recommended. Windows 8 also introduces a ''Fast startup'' 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 less 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''. Windows 10 mirrors Windows 8 as noted by Microsoft.
Windows 10 Windows 10 is a major release of Microsoft's Windows NT operating system. It is the direct successor to Windows 8.1, which was released nearly two years earlier. It was released to manufacturing on July 15, 2015, and later to retail on J ...
's hibernation algorithm is
solid-state drive A solid-state drive (SSD) is a solid-state storage device that uses integrated circuit assemblies to store data persistently, typically using flash memory, and functioning as secondary storage in the hierarchy of computer storage. It is a ...
optimized. Hibernation is often underused in business environments as it is difficult to enable it on a large network of computers without resorting to third-party PC power management software. This omission by Microsoft has been criticized as having led to a huge waste in energy. Third-party power management programs offer features beyond those present in Windows. Most products offer
Active Directory Active Directory (AD) is a directory service developed by Microsoft for Windows domain networks. It is included in most Windows Server operating systems as a set of Process (computing), processes and Windows service, services. Initially, Active D ...
integration and per-user or per-machine settings with more advanced power plans, scheduled power plans, anti-insomnia features and enterprise power usage reporting. Notable vendors include 1E NightWatchman, Data Synergy
PowerMAN (Software) PowerMAN is a computer software program for central system monitoring and PC power management, of computers running Microsoft Windows operating systems. The software extends the basic features present in most operating systems to permit implement ...
, Faronics Power Save and
Verdiem Verdiem was a software corporation based in Seattle, Washington. Verdiem is offered by Avolin. The company was backed by venture capital. Verdiem produces the Surveyor 6 enterprise-class PC power management software. Verdiem Surveyor enables cu ...
SURVEYOR. It is possible to disable hibernation and delete hiberfil.sys.


macOS

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 The Apple menu is a drop-down menu that is on the left side of the menu bar in the classic Mac OS, macOS and A/UX operating systems. The Apple menu's role has changed throughout the history of Apple Inc.'s operating systems, but the menu has al ...
does not have a "hibernate" option. Safe Sleep capability was added in Mac models starting with the October 2005
PowerBook G4 The PowerBook G4 is a series of notebook computers manufactured, marketed, and sold by Apple Computer between 2001 and 2006 as part of its PowerBook line of notebooks. The PowerBook G4 runs on the RISC-based PowerPC G4 processor, designed by the ...
(Double-Layer SD). Safe Sleep requires
Mac OS X v10.4 Mac OS X Tiger (version 10.4) is the 5th major release of macOS, Apple's desktop and server operating system for Mac computers. Tiger was released to the public on April 29, 2005 for US$129.95 as the successor to Mac OS X 10.3 Panther. Som ...
or higher. 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. The classic Mac OS once also supported hibernation, but this feature was dropped by Apple.


Linux

In the Linux kernel, hibernation is implemented by swsusp which is built into the 2.6 series. An alternative implementation is TuxOnIce which is available as patches for the kernel version 3.4. TuxOnIce provides advantages such as support for symmetric multiprocessing and preemption. Another alternative implementation is uswsusp. All three refer to it as "suspend-to-disk". Now, in most Linux distributions, Linux hibernation is managed by systemd.


Hybrid sleep

Sleep mode and hibernation can be combined: the contents of RAM are copied to the 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, survives a power outage. Hybrid sleep consumes as much power as sleep mode while hibernation powers down the computer.


See also

*
Green computing Green computing, green IT, or ICT sustainability, is the study and practice of environmentally sustainable computing or IT. The goals of green computing are similar to green chemistry: reduce the use of hazardous materials, maximize energy effic ...
* PC power management


References

{{DEFAULTSORT:Hibernation (Computing) Operating system technology Energy conservation Windows administration