New
#1
Sleep and hibernate command line
How to do them without breaking something?
Sleep in my computers are hybrid (desktop) and not hybrid (laptop).
Quick boot is off.
How to do them without breaking something?
Sleep in my computers are hybrid (desktop) and not hybrid (laptop).
Quick boot is off.
Hi Pipppero2007
What is it you are trying to achieve? What is not working?
Is sleep or hibernation not working as per the timings you entered?
Is sleep or hibernation failing or does something fail when you awaken?
Ken
I wonder the right command lines (cmd) to sleep and hibernate.
I see that reboot or shutdown are clear commands but for them there are many version and i ask the right way.
A laptop can be set to hibernate or sleep when you close the lid. The usual way to hibernate or sleep for a desktop is from the power button on the Start menu. If those options do not appear, you can add them.
Add or Remove Hibernate from Power menu in Windows 10
Add or Remove Sleep in Power menu in Windows 10
for hibernate to be available it needs to be enabled.
Enable or Disable Hibernate in Windows 10
In admin cmd (or System32 cmd), you type in:this means that the power configuration for hibernate switches to on.Code:powercfg /h on
Then, you can just type in any cmd modefor it to hibernate instantly or, otherwise,Code:shutdown/h /t 0for it to set a hibernate mode within 30 seconds of the command being introduced.Code:shutdown/h
as an alternative for the second and third command lines, you can then head for "C:\Windows\System32" and search the file "shutdown.exe". Generate a copy of it wherever you want, I'd advice "C:\ProgramData\Microsoft\Windows\Start Menu" for future accessibility. Then Open the "Properties" windows after right-clicking the file.
Edit its route from "C:\Windows\System32\shutdown.exe" to "C:\Windows\System32\shutdown.exe /h /t 0" for instant hibernate, or "C:\Windows\System32\shutdown.exe /h" for 30 second delay before hibernate.
hope it helps
Hello,
About shutdowb /h i see around other ways to hibernate so i can be sure it will only go to hibernate my pc without touching else?
About sleep, i looking for a command for sleep (in cmd).
I am afraid also here that a command line could change something about the sleep (ie some pc has standard sleep, other has hybrid sleep).
Why do you need a command to sleep, if I may ask?
Click on Start, click on power icon, click on sleep. You can also access by ALT + F4 menu.
Here is a complete list of shutdown commands.
http://www.thewindowsclub.com/shutdo...command-prompt
Shutdown /h is a command. What settings are you thinking it would change?
Another thread with a lot of information about putting computer to sleep and hibernation from command line. According to them, sleep may be problematic, if hibernation is turned on.
superuser.com | how-can-i-put-the-computer-to-sleep-from-command-prompt-run-menu
from answers:
The methods posted by other people do not work correctly if a computer has hibernation enabled, the computer will not wake on Keyboard or, more importantly, not wake on scheduled task.
One of Microsoft's Sysinternals tool is PsShutdown using the command psshutdown -d -t 0 it will correctly sleep, not hibernate, a computer
There are two terms which are close but different, at least I look at them differently
There is the BIOS fast, quick, speedy boot and as far as I know the only way to change that setting is to enter BIOS and make the change.
There is Windows Fast Start Up and that is something you can change in Windows. If you disable hibernation using the
powercfg -h off
command it, by default, disables Windows Fast Start Up. If you issue command powercfg -h on to re-enable it will turn hibernation back on and assuming you have not changed Fast Startup it will re-enable. If that is how you disable Fast Startup, and we are talking about same "Fast" they enabling hibernation will enable it.
You can can also control Windows Fast Startup manually with this tutorial.
Turn On or Off Fast Startup in Windows 10
If you shut Windows Fast Startup off this way you can continue to use hibernation as a power setting.
I'm unaware of a command line that changes the state of Windows Fast Startup. I'm sure if it was readily known Shawn would have included in tutorial.
Ken
Last edited by Caledon Ken; 24 Sep 2017 at 12:34.