Computer will not shutoff after it goes to sleep


FredricJLowe

Member
Local time
3:18 AM
Posts
63
OS
Windows 11
Trying to have the HP Spectre AllinOne laptop shutoff after it goes to sleep.
Running Windows 11 Pro
I have the power plan set to turn off the display after 10 minutes and to go to sleep after 20 minutes when plugged in.
I have disabled Fast Startup.
These are the same settings on my old HP Envy laptop that would shutdown. But recently when I changed it to Never just so I could synchronize both computers and then switched it back to 20 minutes to go to sleep that computer is not shutting off either.

What can I do to each to get them to shut off after 60 minutes of not being used?

I ran cmd as an adminstrator and did powercfg /requests Nothing is showing up to prevent that from shutting down.
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP Envy
  • Operating System
    Windows 11
Responses & advice will vary depending on whether the computer has S3 Sleep or S0 Modern standby [aka S0 Low Power Idle].
This command will tell you:
powercfg -a


Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 25H2 Build 26200.8037
Trying to have the HP Spectre AllinOne laptop shutoff after it goes to sleep
If I read it right, you wanting laptop to turn off display for 10 minutes, then sleep for 20 minutes and then automatically power off 60 minutes of being in sleep state"
Power options does not have an option to go through 3 transitions.

First of all, newer laptops now use modern standby(s0) sleep state which handles power much differently than the old s3 sleep. If you want to know these differences, rather than me type it out you can read about them here. What is Modern Standby and how does it differ from S3 Standby | Dell US

According to AI you can get close to this behavior using Windows' built-in Power & Sleep settings, but it doesn’t natively support a full “cascade” of actions like: turn off display → sleep → shutdown on a timer. However, with a mix of settings and a scheduled task, you can achieve it. Here's how to set it up:
Note: I have never done it myself so use at your risk,

⚙️ Step 1: Turn Off Display After 10 Minutes​

  1. Press Windows + I to open Settings.
  2. Go to System > Power & Battery.
  3. Under Screen and Sleep, set:
    • Turn off screen after: 10 minutes (on battery and/or plugged in).

💤 Step 2: Sleep After 20 Minutes​

  1. In the same Power & Battery section:
    • Set Sleep after: 20 minutes.
This means your laptop will turn off the display at 10 minutes of inactivity, then go to sleep at 20 minutes.


⏱️ Step 3: Auto Shutdown After 60 Minutes​

Windows doesn’t shut down automatically after sleep, but you can create a Scheduled Task to force shutdown after 60 minutes of inactivity.

Here's how:​

  1. Press Windows + R, type taskschd.msc, and hit Enter.
  2. In Task Scheduler, click Create Task.
  3. Under General:
    • Name it something like AutoShutdown.
    • Check Run whether user is logged on or not.
    • Check Run with highest privileges.
  4. Go to Triggers tab:
    • Click New.
    • Begin the task: On idle.
    • Set Delay task for: 60 minutes.
  5. Go to Actions tab:
    • Click New.
    • Action: Start a program.
    • Program/script: shutdown
    • Add arguments: /s /f /t 0
  6. Go to Conditions tab:
    • Check Start the task only if the computer is idle for: 60 minutes.
    • Uncheck Stop if the computer ceases to be idle.
  7. Click OK, enter your password if prompted.

🧠 Pro Tip​

If you want even more control (like canceling shutdown if you resume activity), you could use a lightweight automation tool like AutoHotkey
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    2x1tb Solidigm m.2 nvme /External drives 512gb Samsung m.2 sata+2tb Kingston m2.nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    #1 Edge #2 Firefox
    Antivirus
    Defender+MWB Premium
  • Operating System
    Windows 11 Pro 24H2 26200.8457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink Mini PC SER5
    CPU
    AMD Ryzen 7 6800U
    Memory
    32 gb
    Graphics card(s)
    integrated
    Sound Card
    integrated
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Crucial nvme
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    still too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender
    Other Info
    System 3 is non compliant Dell 9020 i7-4770/24gb ram Win11 PRO 26200.8457
EDIT: I was typing this while glasskuter had posted. Apologies for duplication. Her post is far clearer with MUCH more detail anyway :-)

I want to be sure that I understand the circustances correctly:

You say that you have the screen set to turn off after 10 minutes and the system to go to sleep after 20 minutes. Later in your post you ask how you can get the system to sut off after >60< minutes. Is that all correct?

If I have that correct then would it be safe to say that a good description of the problem is simp[ly that the system will not shut down after 60 minutes inactivity?

If I got all that right, check this: On the same screen where you disabled fast startup in Control Panel, make sure that the option for Hybernation is enabled. Then in the power settings, set the Hybernation timeout to 60 minutes.
 

My Computers

System One System Two

  • OS
    Win11 Pro 25H2 (RTM+)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Acemagic
    CPU
    Intel i7-14650HX
    Memory
    32 GB
    Graphics Card(s)
    No GPU - Built-in Intel Graphics
    Sound Card
    Integrated
    Monitor(s) Displays
    Varies as machine will often be moved to locations with different monitors
    Screen Resolution
    Varies
    Hard Drives
    1 x 1TB Gen 4 NVMe SSD
    PSU
    120W Power Brick
    Keyboard
    Corsair K70 Max RGB Magnetic Keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
  • Operating System
    Win11 Pro 25H2 (RTM+)
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Keyboard
    Backlit, spill resistant keyboard
    Mouse
    Buttonless Glass Precision Touchpad
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
ok trying the last suggestion first by changing hibernate from Never to 60 minutes. The old HP Envy is 10 years old allowed me to edit Hibernate from Never to 60 minutes but I do not see a Hibernate setting on the the new HP Spectre Allinone which I have only had since February. Do the new computers not have Hibernate as an advanced setting. In fact I only see Balanced (Active) as a Power option.
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP Envy
  • Operating System
    Windows 11
Enabling hibernate and time of 60 minutes effectively shut off the 10 yr old HP Envy.

Next will attempt the suggestion by glasskuter to set up a scheduled task.
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP Envy
  • Operating System
    Windows 11
I set up the Task/ Hope I did it correctly based on what you wrote above. A couple of the instructions were on a different screen to get to, but hopefully are correct.

I am using Syncthing to synchronize 2 computers.

Will running that interfere with the computer going to sleep and the idle needed to proceed for 60 minutes?

If it will, I imiagine I would need to exit the Synchronization. Right now I have exited synchronization to test if the HP Sprectre will shutoff after 60 minutes after it enters idle.
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP Envy
  • Operating System
    Windows 11
It's been over an hour and the HP Spectre did not shutoff.

I found the running task. It said it could not find the file specified.

I tried setting the task up again. I noticed at the bottom on a dropdown Windows 10. There is no option for Windows 11.

I deleted the failed task. This time I set it to Windows 10.

I'll wait an hour after it is to go to sleep after 20 minutes.

But like I said some of the setup is not on the exact instructions so I had to find it.

I'll take notes next time if it still does not shutdown, so you can see where I had to modify your instruction above.

I do remember you saying to run at my own risk :)
 
Last edited:

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP Envy
  • Operating System
    Windows 11
The HP Spectre is shutting down but it seems to be doing that after about 5 minutes if it is not being used.

Is there a setting I should change?
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP Envy
  • Operating System
    Windows 11
I Googled and found this to adjust the time to shutdown.

I changed
  • Program/script: shutdown
  • Add arguments: /s /f /t 0
by following this:

To automatically shut down your computer after a period of inactivity, use Windows Task Scheduler to create a scheduled task that runs the shutdown -s command when the system is idle. Alternatively, you can use a cmd command to set a temporary shutdown timer, or adjust the system's built-in power and sleep settings to put the PC to sleep or hibernate rather than shut it down completely.

Using Task Scheduler for Automatic Shutdown (Recommended for Scheduled or Idle-Based Shutdowns) This method creates a scheduled task to shut down the computer after a specific duration of inactivity.

  1. Open Task Scheduler: Search for "Task Scheduler" in the Windows search bar and open it.
  2. Create a New Task: In the Task Scheduler, go to the "Actions" menu and select "Create Task..." (or "Create Basic Task" for a simpler wizard).
  3. Name the Task: Give your task a name, such as "Auto Shutdown After Idle".
  4. Set the Trigger: Select the "Idle" trigger and set your desired idle time (e.g., 1 hour) before shutdown.
  5. Choose the Action: Select "Start a program".
  6. Specify the Program: Enter shutdown.exe in the "Program/script" field and add the argument -s to initiate a full shutdown.
  7. Finish: Review your settings and click "Finish" to save the task.
That didn't work. Windows gave me an alert that it would shutdown in 1 minute. This was about 5 minutes or less!
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP Envy
  • Operating System
    Windows 11
Back
Top Bottom