If your Windows PC wakes up at night by itself, something has permission to pull it out of sleep. It’s usually one of three things: a scheduled task or wake timer, a network wake signal, or a USB or Bluetooth device. Run powercfg /lastwake from an elevated Command Prompt to see which one did it, then remove that permission.
Why your PC wakes up on its own
Windows almost never wakes itself without a specific trigger. Something on the system has been given explicit permission to interrupt sleep mode. Either an app granted that permission during installation, or it’s a default setting nobody checked.
Windows keeps a record of these wake events, so you don’t need to guess. The three most common causes are:
- Scheduled tasks and wake timers, including Windows Update, backup tools, antivirus definition updates and manufacturer bloatware
- Network-triggered wake, known as Wake-on-LAN or “wake on magic packet”
- USB or Bluetooth peripherals, such as wireless mouse and keyboard receivers, docking stations, external hard drives and some USB hubs
Find out what woke your PC
Start here. The command tells you which of the three causes applies to you, so you can go straight to the right fix.
- Open Command Prompt as an administrator (an “elevated” prompt).
- Type
powercfg /lastwakeand press Enter. - Read the output. It reports what triggered the most recent wake, whether that’s a scheduled task, a wake timer or a piece of hardware.
- Type
powercfg /waketimersand press Enter to list any timers that are currently armed and ready to fire.
The second command helps when your PC wakes hours after you last used it, because it shows timers waiting to go off before they do.
Turn off wake permission for a scheduled task
Windows Update often needs the machine awake to check for and install patches during its maintenance windows. Task Scheduler also has a setting called Wake the computer to run this task, and third-party installers often turn it on without asking you.
If powercfg /lastwake or powercfg /waketimers names a task, do this:
- Open Task Scheduler.
- Find the task named in the command output.
- Open the task and go to its Conditions tab.
- Uncheck Wake the computer to run this task.
- Save the change.
This usually stops that task from waking your PC for good.
Turn off Wake-on-LAN for your network adapter
Many network adapters ship with Wake-on-LAN turned on. It lets another device on your network, such as a router, a NAS (a network storage box) or a phone running a remote-access app, send a signal that wakes the PC.
That’s useful if you need to reach a machine remotely without leaving it fully powered on. If you don’t, routine network traffic or a misconfigured device can set it off by accident, and you’re probably better off with it disabled.
- Open Device Manager.
- Expand Network Adapters.
- Open your network adapter’s Properties.
- Go to the Power Management tab and turn off the option that lets the device wake the computer.
- Go to the Advanced tab and look for a Wake on Magic Packet setting. It can be disabled separately.
- Click OK to save.
Check your router or mesh system app too. Some are set to ping connected devices for status updates, and a small number of consumer routers have sent wake packets during those checks.
If you run file-sync software, media servers or remote-desktop tools, pay close attention here. Those apps are the most likely to have asked for wake permission during setup, and turning it off may affect how they work.
Stop USB and Bluetooth devices from waking your PC
Wireless mouse and keyboard receivers are the usual suspects. Minor electrical interference or a small bump to your desk can register as input and wake the PC. Docking stations, external hard drives and some USB hubs can carry the same permission, depending on how their drivers were installed.
List every device that can wake your PC
- Open Command Prompt as an administrator.
- Type
powercfg /devicequery wake_armedand press Enter. - Note every device in the list. These are all the devices currently allowed to wake your computer.
This is much faster than opening each device one by one.
Remove wake permission from a device
- Open Device Manager.
- Find the device from the list, usually under the USB or Human Interface Devices entries.
- Open the device’s properties and go to the Power Management tab.
- Turn off the option that allows the device to wake the computer.
- Repeat for each peripheral that doesn’t need to wake your PC.
Start with wireless mouse receivers, especially ones sitting near other electronics. Turning this off fixes most of these cases and doesn’t change how the device works while you’re using it during the day.
Frequently asked questions
What command shows what woke up my Windows PC?
Run powercfg /lastwake from an elevated Command Prompt. It reports whether the last wake came from a scheduled task, a wake timer or a hardware device.
How do I see which devices are allowed to wake my PC?
Run powercfg /devicequery wake_armed from an elevated Command Prompt. It lists every device that currently has permission to wake the computer.
Will my mouse still work if I stop it waking the PC?
Yes. Turning off wake permission for a peripheral like a wireless mouse receiver doesn’t affect normal use of the device during the day.
Should I turn off Wake-on-LAN?
If you don’t need to wake the PC remotely, you’re probably better off without it. Keep it on if you rely on remote access, media servers or remote-desktop tools that use it.
