Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save aont/308728e363c6b00f10cdff5ef34e4dcb to your computer and use it in GitHub Desktop.

Select an option

Save aont/308728e363c6b00f10cdff5ef34e4dcb to your computer and use it in GitHub Desktop.

How to Stop Windows from Waking Up Automatically and Draining Your Battery

One frustrating issue many laptop users face is Windows waking up unexpectedly from sleep and draining the battery. Fortunately, you can take control of wake timers, scheduled maintenance, and related settings to prevent this behavior. This guide walks you through the process step by step.


1. Check Active Wake Timers

First, you need to confirm what is currently set to wake up your PC. Open a command prompt with administrator privileges and run:

powercfg.exe -waketimers

If any scheduled tasks or timers are listed, they are likely the reason your PC wakes up on its own.


2. Disable Wake Timers

You can disable wake timers entirely through the Control Panel:

  1. Press Win + R, type powercfg.cpl, and press Enter.
  2. Select Change plan settings for your active power plan.
  3. Click Change advanced power settings.
  4. Expand Sleep → Allow wake timers.
  5. Set it to Disable for both On battery and Plugged in.

3. Prevent Scheduled Maintenance from Waking the PC

Windows performs scheduled maintenance tasks that can wake up your machine. To disable this:

  1. Open the Control Panel and go to: System and Security → Security and Maintenance → Automatic Maintenance
  2. Uncheck Allow scheduled maintenance to wake up my computer at the scheduled time.

4. Disable Automatic Maintenance via Registry

For extra certainty, you can disable Windows Automatic Maintenance through the registry:

Open an elevated command prompt and run:

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance" /v MaintenanceDisabled /t REG_DWORD /reg:64 /f /d 1
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance" /v WakeUp /t REG_DWORD /reg:64 /f /d 0

This ensures Windows will not attempt to wake up the system for background maintenance.


5. Verify That Wake Timers Are Cleared

Finally, run the wake timers check again to confirm that nothing remains:

powercfg -waketimers

If the command returns nothing, your system should now stay asleep as expected.


Conclusion

By disabling wake timers and scheduled maintenance, you can stop Windows from waking up your device without your permission. This will help preserve your battery and ensure your laptop only wakes when you want it to.


References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment