Computer wakes up from Sleeping Mode

Windows 10 64-bit.

Why is my PC awake?

Your human interface devices and / or mouse and / or keyboard and / or network adapter and / or BIOS and / or Scheduled Task and / or Windows Update and / or Automatic Maintenance is set to wake your PC.

It is not uncommon to find your PC awake.

Powershell command: Which Scheduled Tasks wake the PC?

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

Screenshot get-scheduledTask

Learn to live with it:

Require sign-in when PC wakes from sleep:

%windir%\explorer.exe ms-settings:signinoptions

Change your power management settings: Create a shortcut on your desktop to a batch file to change your power management settings. C:\Windows\_61.bat minpower

@rem Change power management settings. Windows 10 64-bit. Does not require admin privileges.
@echo off
setlocal enableextensions disabledelayedexpansion
GOTO :%1
:normalpower 
POWERCFG /CHANGE /MONITOR-TIMEOUT-DC 10
POWERCFG /CHANGE /DISK-TIMEOUT-DC 29
POWERCFG /CHANGE /STANDBY-TIMEOUT-DC 30
POWERCFG /CHANGE /MONITOR-TIMEOUT-AC 10
POWERCFG /CHANGE /DISK-TIMEOUT-AC 29
POWERCFG /CHANGE /STANDBY-TIMEOUT-AC 30
exit /b
:minpower
POWERCFG /CHANGE /MONITOR-TIMEOUT-DC 1
POWERCFG /CHANGE /DISK-TIMEOUT-DC 2
POWERCFG /CHANGE /STANDBY-TIMEOUT-DC 3
POWERCFG /CHANGE /MONITOR-TIMEOUT-AC 1
POWERCFG /CHANGE /DISK-TIMEOUT-AC 2
POWERCFG /CHANGE /STANDBY-TIMEOUT-AC 3
exit /b 

Put the PC to sleep when it has been idle for 10 minutes:

  1. Create a Scheduled Task to run psshutdown.exe -d -t 0 -accepteula when the PC has been idle for ten minutes.
  2. Psshutdown must be run in a window with admin privileges.
  3. -rundll32.exe powrprof.dll,SetSuspendState 0,1,0 prevents wakeup by scheduled task.

Right click Start - click Device Manager - expand Human Interface Devices, Keyboards, Mice and other pointing devices, Network Adapters, and Universal Serial Bus Controller.

  1. Uncheck allow this device to wake the computer. screenshot of device manager
  2. Network Adapters: only allow a magic packet to wake the computer OR
  3. All wake on "Magic Packet" or "Pattern Match" or "Link Settings" of all network adapters are set to "Disabled" in the Advanced settings of the devices in Device Manager.

Screenshot network adapters

Go to BIOS - Power Management and disable Wake by mouse, Wake by keyboard, Resume by alarm, Power on by keyboard, Power on by mouse, Wake on LAN, Wake setup, ...

I put my PC to sleep, woke it up with the USB mouse, ran powercfg -lastwake:

screenshot of powercfg -lastwake

Previous powercfg -lastwake was:

screenshot of powercfg -lastwake2

I put my PC to sleep, woke it up with the USB keyboard, ran powercfg -lastwake:

Wake History Count - 1
Wake History [0]
Wake Source Count - 1
Wake Source [0]
Type: Device
Instance Path: PCI\VEN_8086&DEV_8C31&SUBSYS_50071458&REV_05\3&11583659&0&A0
Friendly Name: Intel(R) USB 3.0 eXtensible Host Controller - 1.0 (Microsoft)
Description: USB xHCI Compliant Host Controller
Manufacturer: Generic USB xHCI Host Controller

Automatic Maintenance: Left click Start. Type Control Panel. Click Control Panel App - Security and Maintenance - Maintenance - Change maintenance settings

screenshot of Automatic Maintenance

See How to tell what wake source is when Wake Source: Unknown

Why is my computer awake? PC wakes up when everything is set to never wake. PC unexpectedly awake.


Computer wakes up from Sleeping Mode

I had the same problem the past few days, but I got mine fixed. Whether this solves it for you - we will have to see:

Out of the clear blue, my machine would wake up immediately after putting it to sleep. There have been no recent hardware or software changes.

After a wakeup, running "powercfg -lastwake" gave same result listed above:

Instance Path: PCI\VEN_8086&DEV_A36D&SUBSYS_50071458&REV_10\3&11583659&0&A0 Friendly Name: Intel(R) USB 3.0 eXtensible Host Controller - 1.10 (Microsoft) Description: USB xHCI Compliant Host Controller Manufacturer: Generic USB xHCI Host Controller

I did all of the usual software checks and tweaks, and I was unable to correct the problem. When I first got my current Win10 machine, I had all kinds of wake up problems, but I have since squashed them all, so this was new, and seemed odd that the usual config tweaks, registry hacks, and so on did not solve it.

While I am just as apt as anyone to blame Microsoft for a buggy OS, the fact that this is a host controller / usb issue does imply something hardware. Since I have set all of my mice and keyboards to "do not wake up", perhaps the problem was in the usb controllers or hubs.

First thing I did was go to device manager and uninstall that driver (the usb 3 host controller). I was hoping it would just disable the USB 3 ports, but it basically shut down all usb, so my mouse and keyboard would not work. I turned off the machine from the front panel, and restarted it. The OS found "new" hardware, reinstalled the driver and devices. Once booted, I tried to sleep - same problem, system woke right up. So, resetting the driver did not help.

So, next tweak - turn off the usb peripheral devices. I have several multi-port usb hubs plugged in. One sits right on my desk, and it has a master on-off switch. That was the easiest to reach hub, so I chose that one first. I turned off the power to that hub (if it did not have a switch, I would have unplugged it). My main mouse and keyboard are not on that, so I could continue working. Then, I put the system, to sleep - no problems! - all normal!

I then turned the device back on, but unplugged each device attached. One by one I reinserted the peripherals then put the machine to sleep - no problems. After getting all eight devices back online, still no problems - the machine slept as it should.

It seems that the hub itself was the problem, and that turning it off then rebooting it cleared whatever it was doing. That particular powered hub has been buggy before, and I have plugged devices into it causing power surges or transient shutdown of a plugged in device. It was so infrequent that I never bothered to crawl under the desk to replace it. I do recall that the day or day before that the sleep problem started, that I had plugged in some old flash drives, so one of them I suppose caused some kind of surge and latched up something in the hub. Now, it is gone, a new hub in its place, and hopefully the problem will not resurface.

My suggestion - after doing all of the software and OS tweaks already suggested in this thread - because they are good things to do no matter what - try to troubleshoot the hardware, specifically usb hubs and devices.

Take your mouse and keyboard and plug them directly into your rig through a usb 2 or usb 1 port, then disconnect or power down all other hubs. If that solves the sleep problem, then it is just a matter of being methodical as you bring each device back online and check to see if the sleep problem recurs.

What a relief. I hope this works out as well for you as it did for me.