Tips to Stop Your Computer From Randomly Waking Up From Sleep Mode - WindowsTips.net - Windows Tips and Tricks with Geek

Tuesday, June 22, 2021

Tips to Stop Your Computer From Randomly Waking Up From Sleep Mode

 

Find Out What Woke Your Computer

Find Out What Woke Your Computer

Windows knows what woke up your computer most recently, so the next time it wakes up unexpectedly, check the logs. Open the Start menu and search for “cmd,” then right-click the Command Prompt to Run As Administrator. Type the following command and press Enter:

powercfg -lastwake

If you’re lucky, it’ll give you a pretty clear answer. For example, the last time my workstation woke up, it was due to my cloud backup program running its scheduled backup for the evening—in that case, your search is over, and you can adjust that program’s settings or uninstall it to stop the problem. 

In other cases, it may list a specific hardware device, in which case you can skip down to the relevant section in this article, or do some extra Googling on what settings to change on that device.

If that command didn’t give you useful information, try this one:

powercfg -waketimers

Tweak Windows Update and Scheduled Maintenance

Tweak Windows Update and Scheduled Maintenance

Windows Update is a fickle beast, and I’ve had it cause numerous unwanted wakeups in the past. There are a few ways to solve this problem.

First, try using Windows Update’s built-in tools to more meticulously schedule those updates and reboots. Set your Active Hours and Reboot times and defer updates until you have time to install them, and you may be able to solve this problem easily. To dig a little deeper, though, you will need Windows 10 Pro or above.

With the right version of Windows 10, open the Start menu, search for Group Policy, and head to Computer Configuration > Administrative Templates > Windows Components > Windows Updates, then double-click Enabling Windows Update Power Management to set it to Disabled.

Windows also runs an Automatic Maintenance set of tasks once per day, which it says includes software updates, security scans, and other jobs. Open the Start menu, search for Scheduled Maintenance, and open the resulting option. You can either change the time this runs—I have mine set to run at 9 p.m.—or prevent this from waking the computer altogether by unchecking the box at the bottom

ind a Misbehaving USB Device

Find a Misbehaving USB Device

If Windows tells you a USB device is waking your computer, you’ll have to find the offending device. I’d bet dollars to donuts it's your mouse or keyboard—maybe your cat thinks it's a fun toy when you aren’t looking—but it could be anything.

If you have trouble figuring out which device is the problem, remove all your USB devices the next time you put your computer to sleep, and see if it wakes up on its own. If it doesn’t, you can leave one device plugged in the next time you put it to sleep. Keep doing this until you find the offending device.

Once you find the problematic hardware, open the Start menu and search for the Device Manager. Find the device in the resulting list—say, your keyboard—and right-click on it, selecting Properties. Under the Power Management tab, uncheck the Allow This Device to Wake the Computer option and click OK. 

From then on, your computer should stay asleep—if not, you might also try entering the BIOS and disabling USB waking from there, if you see an option for it. (You can enter the BIOS setup by pressing a key when your computer first boots, usually something like Delete or F2—the boot screen will usually tell you.)

Disable Other Wake Timers

Disable Other Wake Timers

If none of the above fix your issue, you may have to dig into the wake timers set on your computer—that is, scheduled events that are allowed to wake your machine. Open the Start menu, search for Edit Power Plan, and click Change Advanced Settings. Head to Sleep > Allow Wake Timers and change both Battery and Plugged In to Disabled. You’ll want to repeat this process for all your power plans in the drop-down box at the top, not just the one you’re currently using.

Here’s the thing, though: this is a sweeping setting designed to affect all wake timers, which may mean it’s too overzealous for you (if you have certain wake timers you want turned on). It’s also weirdly ineffective, which means even if you do want to go nuclear on wake timers, it may not stop them all, but feel free to adjust it anyway.


With that in mind, I also recommend opening PowerShell and running the following command:


Get-ScheduledTask | where {$_.settings.waketorun}


This may help you find scheduled tasks designed to wake up your PC. If you find any you want turned off, search the Start menu for Task Scheduler, navigate to the task in question using the sidebar, and double-click to edit it. Specifically, uncheck the Wake the Computer to Run This Task box under the Conditions tab.


Random wakeups can be incredibly finicky to solve, and you may find that even more digging is required to find your specific issue. But hopefully the above options have at least pointed you in the right direction. Keep in mind that you may have to go back and do this in a few months if it starts happening again—new programs, new hardware, and Windows updates can always cause the problem to resurface. It’s a curse, but at least now you can keep it under control.

No comments:

Post a Comment