Sleep mode puts your computer into a power-saving state and allows you to quickly recover. This mode can be activated both at the user's request and automatically. The latter occurs when no activity is performed on the computer for some time.
After the PC (personal computer) is put to sleep, the control system will turn off the display of the image on the monitor, and suspend the operation of hard drives, as well as peripheral devices. These steps help you save power while the computer is not in use by the user or the system.
Windows 7 power saving options
The following power saving options are available in Windows 7: sleep, hibernation, and mixed mode.
-
How to disable sleep mode in Windows 7 Sleep mode. In this variant, beforeBy how to enter a computer (laptop) into power saving mode, all open programs, windows, documents and other parameters are stored in its memory. When you enter the working state, all saved data is automatically restored by the system.
- Hibernation. Unlike sleep mode, in this option, all the programs, settings and documents involved are not stored in memory, but on the hard disk itself. Then the computer turns off. Most often, hibernation is used on laptops, as this mode consumes little power, which saves battery power.
- Hybrid or mixed sleep mode. When using this option, all working documents and open programs are saved simultaneously on the hard drive and in the computer's memory. Then it switches to power saving mode. In the event of a power failure, all saved data will be restored from the hard disk.
In all the listed options for saving Windows 7, turning off sleep mode is simple and quick by pressing any key on the keyboard.
How to disable sleep mode in Windows 7 - basic methods
Of course, the power saving mode is a convenient thing, but there are cases when it is simply necessary to remove the Windows 7 sleep mode. So, in this mode, you will not be able to connect remotely to the computer. And sometimes it's even inconvenient to work when your machine "falls asleep" at the first opportunity, especially if it's not a laptop and you don't need to conserve battery power.

Therefore, very often users face a problem: how to disable sleep mode in Windows 7. This dilemma can be solved in the following ways:
- disabling hibernation using the control panel;
- using the command line;
- Changing the HiberFileSizePercent and HibernateEnabled file entries in the registry.
Let's consider in more detail all of the above methods.
Disabling hibernation using the control panel
Disabling sleep mode in Windows 7 by disabling it using the control panel is the easiest and most understandable way that does not require deep knowledge. This option is recommended for beginners or inexperienced users.
Let's consider turning off hibernation step by step.
- Open "Start".
- Go to the "Control Panel".
- Next, open "Power Options" if you browse by large icons. Otherwise, you need to enter the "System and Security" item. Then search for and open "Power Options". You will be presented with a choice of power plan.
- The next step is to open "Power plan settings" where you have a circle.
- In the window that opens, you will need to change the settings that are responsible for switching the computer to sleep mode on battery and on the network. In the corresponding windows, you will need to set the value of the parameter"Never".
- After that, you will need to save the changes.


Additionally, you can turn off the sleep function by selecting "Change advanced power settings". Then we find the item "Sleep" and set the value 0 in the corresponding fields. In order for the changes to take effect, you must click "Apply" and "OK".
And what is this amazing hiberfil.sys?
First, let's figure out why a file called hiberfil.sys is needed, and only then we'll look at how to disable hibernation in Windows 7.
During the transition of the computer to hibernation, all data about running programs, open documents and other information is stored on the hard disk by writing it to the hiberfil.sys file. After the system wakes up from sleep mode, all data is restored to the computer's memory at the time of "falling asleep".
Hibernation mode allows you to save battery power on your laptop. But on stationary computers, this mode is rarely used, while hiberfil.sys takes up a significant amount of hard disk space, since its size can be several gigabytes. However, when you disable hibernation using the control panel, a file named hiberfil.sys will automatically be created by the system again and again.
How can I disable sleep mode in Windows 7 using the command line
To completely disable hibernation, you need to open the cmd.exe console.
- In the start menu in the searchwe type cmd.exe and press search.
- Opens cmd.exe console.
- Run it with Administrator rights. To do this, move the cursor to cmd and click on the right mouse button. In the expanded menu, you must select run as administrator.
- In the command line type powercfg.exe -h off. After that, hiberfil.sys will be deleted automatically.
If you need to re-enable the hibernation mode, you need to open a dialog box with the command line (repeat steps 1 to 3). In the window that opens, write powercfg.exe -h on into the command line. Then, in the power plan settings, set the required values.
Changing HiberFileSizePercent and HibernateEnabled file entries in the registry
Now let's look at how to disable hibernation in Windows 7 using the registry, by changing the HiberFileSizePercent and HibernateEnabled file entries. For this you need:
- The Registry Editor is starting. To do this, you must simultaneously press win and R.
- Enter regedit on the command line.
- Next, you need to navigate to the next registry branch - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power
- Change the parameters of the HiberFileSizePercent file by clicking on the right mouse button and selecting the "Change" item, where you should specify the value 0 in the opened field.
- Change the parameters of the HibernateEnabled file in the same way.
- You need to close the Registry Editor window and restart your computer.
After all of the above, disable hibernation ineven a novice user will be able to use Windows 7.