Sleep mode in Windows helps conserve energy by putting your computer into a low-power condition when you’re not using it. But what happens if your computer keeps randomly going to sleep even when you don’t want it to? This guide lists the best methods to eliminate this issue.
Why Does Windows Keep Going to Sleep?
Several factors could cause sleep problems on Windows. As a result, you need to follow the instructions one by one until the issues are gone. Below are some common causes of the PC going to sleep:
- Misconfigured power settings in Windows that lead to unexpected sleep timings.
- Buggy or outdated graphics drivers can turn off the display, which may seem like the computer went to sleep. Here’s how to update Nvidia and AMD GPU drivers.
- Third-party optimization apps are causing Windows to go to sleep or overriding built-in sleep settings.
- Faulty hardware components, like the battery or physical sensors, can send a signal to put the laptop to sleep or hibernate.
- Magnetic materials near the laptop base (near the palm rest) can trigger the Hall Effect sensor (responsible for detecting the lid open/close state), which can put the laptop to sleep.
Before applying the fixes below, make sure that you’ve updated your Windows PC to the latest available build.
1. Your Power Plan Settings May Have Shorter Sleep Timers
Windows has built-in power settings to automatically put the PC to sleep when it detects no activity. If this time period is set too low somehow, your computer will keep going to sleep. Here’s how to adjust it:
Open Windows Settings and go to System → Power & battery and extend Screen, sleep, & hibernate timeouts section. Here, you can adjust timeout periods for screen off, sleep, and hibernate features.
Make sure both the plugged-in and the battery sections have a higher sleep-after time (at least over 15 minutes). You can also select Never, so the PC never sleeps, but we don’t recommend it as this setting saves battery.
2. Run the Power Troubleshooter to Automatically Fix the Problem
You can run the built-in Power Troubleshooter that scans various parts of your operating system and fixes the issues it detects. It might be able to automatically find and fix the problem.
Previously, it was available in Windows Settings, but Microsoft has removed it in favor of the Get Help app. However, you can still access it in Windows using a Command Prompt command.
Open Command Prompt and run the following command:
msdt.exe /id powerdiagnostic
This will open the Power Troubleshooter, and you can click on Next to automatically scan the PC and find problems causing the PC to sleep.
3. Adjust the Secret System Unattended Sleep Timeout
Windows has another sleep management feature that puts the PC to sleep after 2 minutes of inactivity if it has woken up from sleep on its own. If, for some reason, it keeps thinking it woke up using a wake-up trigger, then it will override your regular sleep timeout period, leading to the computer sleeping after 2 minutes.
This option is hidden by default, so you’ll need to enable it first using a Command Prompt command before adjusting. Run the following command in the Command Prompt:
powercfg -attributes SUB_SLEEP 7bc4a2f9-d8fc-4469-b07b-33eb785aaca0 -ATTRIB_HIDE
Once executed, search “edit power” in Windows Search and open Edit power plan item.
Here, click on the Change advanced power settings option.
Expand the Sleep tab, change the value for System unattended sleep timeout to something longer, and apply the changes.
4. Disable Fast Startup to Fix PC Going to Sleep Issue
Windows’ Fast Startup feature is a notorious culprit for power management glitches, including making the computer go to sleep unexpectedly. It doesn’t let your PC perform a clean shutdown; instead, it saves the state of your kernel and drivers to a hibernation file for a faster start.
This continuous build-up on previous states can eventually cause driver miscommunication or kernel errors that cause power bugs. You can disable Fast Startup to prevent such problems. Here’s a complete guide to disabling Fast Startup in Windows.
5. Generate System Power Report to Find the Cause of PC Going to Sleep
In Windows, you can generate a system power report to track your PC’s power activity, including why your PC went to sleep or woke up. This can help you understand why your computer keeps going to sleep, so you can pinpoint the cause and fix it.
Open Command Prompt again (as administrator) and run the following command:
powercfg /systempowerreport
This will generate a power report, which you can find in this location: “C:\Windows\System32\sleepstudy-report.html”. Copy/paste this in the File Explorer address bar to open in your browser.
To quickly find data related to your PC sleep, press Ctrl + F keys and type system power state: standby in the Find field in your browser. This will highlight all sessions related to the PC going to sleep and waking up. You need to look at the ENTRY REASON column to learn what’s causing your PC to go to sleep.
You’ll find reasons like Button or Lid, System Idle, Application API, etc. While they don’t tell exactly how to fix the problem, they do reveal a possible reason. For example, if it says Button or Lid, while you didn’t close the lid, it means your lid sensor is faulty. Similarly, if it says Application API, it means a specific application told Windows to enter sleep state.
The computer going to sleep unexpectedly is definitely frustrating, but one of these methods should be able to fix it. If your problem persists, you can check the Reliability Monitor or the Event Viewer for more details on the possible trigger.