Disabling Sleep /Hibernation mode
This mode is great if you apply it on a machine that do not need to stay on 24/7 but what about the machines that needs to stay on 24/7? That’s when this mode could be a nuisance.
If you are running a server and you see that your services all of a sudden turns off and is no longer reachable, you may think its the internet or the hardware failing but, it may just be this mode that is enabled! Let’s look together how to disable this mode.
You could achieve this by the command line or via Control Panel / Settings. We’ll begin with the Control Panel and Settings.
It’s as simple as the above for setting sleep to never (disabling), but we’ll definitely need to go in Control Panel to also remove hibernation.
Navigate to Control Panel \Hardware and Sound\Power options, find the preferred plan you are using, in my case it was High performance then hit change advanced power settings. It should open the left below screen.
Once done, sleep/hibernation mode should now be disabled.
Disabling hibernation/sleep mode via command prompt, you would need to use the command
powercfg in addition with /H parameters.
Keep in mind you must open the CLI as administrator to make these type of changes, since well, these commands are making fundamental system changes.
There will be two different files you could check and verify if the hibernation/sleep mode is enabled or disabled. These two files are located in
Now at this moment, hibernation and sleep mode is not enabled what so ever, judging from the up time of my personal server.
This is how your logind.conf and sleep.conf files should look if properly disabled.