Technical Anshu
Tutorials Blog

A PC never wakes up for no reason - something asked it to. In almost every case it is one of five things: a wake timer set by Windows Update or a backup program, a scheduled task with wake permission, a mouse, keyboard or network adapter allowed to wake the PC, Wake on LAN answering a packet from the network, or Automatic Maintenance. The good news is Windows keeps a record of every wake, so you do not have to guess: the command powercfg /lastwake names the exact culprit, and the rest of this guide is just switching that one trigger off. Work in order and stop as soon as the PC stays asleep through the night.

Windows 11  ·  Terminal (Admin)
PC asleep at 2 AM - wakes up alone. Screen on, fans spinning, nobody touched it.

X The PC wakes in the middle of the night, or the moment you put it to sleep

X The screen lights up and the fans spin while the room is empty

X It happens again the next night, even after a restart

X Putting the PC to sleep again does not help - it wakes itself up the same way

C:\> powercfg /lastwake Wake History Count - 1 Wake History [0] Wake Source Count - 1 Wake Source [0] Type: Wake Timer

POWERCFG  powercfg /lastwake names the exact trigger - a wake timer, a scheduled task or a device - so you fix the real cause instead of turning sleep settings off at random.

The fingerprint of this problem: the PC fully wakes - screen and fans - with no one touching it. The fault is a timer, a task or a wake-enabled device, and Windows records which one it was.

Before you start: run the check in Fix 1 right after an unwanted wake, before you put the PC to sleep again or restart it - powercfg /lastwake only remembers the most recent wake, and a restart or a new sleep cycle overwrites it. If you already restarted, use the Event Viewer step in Fix 1 instead - that record survives a restart.
1

Find What Woke It With powercfg /lastwake ⭐

This is the main step, and it takes about a minute. Guessing wastes an evening - this command tells you whether a timer, a task or a device woke the PC, so every fix after it targets the right thing.

  1. Press Win + X and choose Terminal (Admin) or Command Prompt (Admin). Click Yes on the permission prompt.
  2. Type powercfg /lastwake and press Enter. Read the Wake Source line: it will say Wake Timer (a scheduled timer), name a device (mouse, keyboard, network adapter), or name a scheduled task or program.
  3. For the full picture, run these two as well in the same window: powercfg /waketimers shows every timer that is armed and when it will fire, and powercfg /devicequery wake_armed lists every device currently allowed to wake the PC.
  4. If /lastwake shows Wake History Count - 0 or names nothing, open Event Viewer > Windows Logs > System, click Filter Current Log, pick the source Power-Troubleshooter, and read the Wake Source line on the newest entry. On a Modern Standby laptop that line often says Unknown - then run powercfg /sleepstudy and check the exit reasons there.
  5. Whatever the command named - timer, task or device - is the fix you need. Go to the matching fix below: timer or task → Fix 2, device → Fix 3, network adapter → Fix 4, nothing named → Fix 5, then Fix 6.
2

Switch Off Wake Timers and the Task That Sets Them

Wake timers are alarms Windows and your programs are allowed to set - Windows Update, backup software and maintenance tasks use them to wake a sleeping PC and do their job at night. Switching the timers off stops the wake; the updates and backups still run whenever the PC is awake.

  1. Press Win + R, type powercfg.cpl and press Enter. Click Change plan settings next to your active plan, then Change advanced power settings.
  2. Expand Sleep > Allow wake timers and set both On battery and Plugged in to Disable. Click OK.
  3. If /waketimers named a specific program - a backup tool is the classic one, and people have found forgotten fortnightly backup schedules this way - open Task Scheduler (press Win + R, type taskschd.msc, press Enter), find that task, open its Properties > Conditions tab and uncheck "Wake the computer to run this task".
  4. Do not delete Windows Update tasks from Task Scheduler - only untick their wake permission. Deleting them breaks updates; unticking wake only stops them waking a sleeping PC.
  5. Put the PC to sleep and leave it overnight. If it stays asleep, the timer was the cause and you are done.
3

Stop the Device That Wakes It

If /lastwake or /devicequery wake_armed named a device - usually the mouse, the network adapter or a USB hub - that device has permission to wake the PC, and a small movement, a vibration or a network packet is enough to trigger it.

  1. Open Device Manager (press Win + X, choose Device Manager). Find the device the command named - for a mouse, expand Mice and other pointing devices; for the network card, expand Network adapters.
  2. Right-click the device, choose Properties, and open the Power Management tab. Uncheck "Allow this device to wake the computer" and click OK.
  3. Or do the same from the admin Terminal with one command - use the exact name from the wake_armed list: powercfg /devicedisablewake "Realtek PCIe GbE Family Controller" (replace the name in quotes with your own device name).
  4. Take wake permission away from only the device the command named. If you untick it for everything, the keyboard and mouse will stop waking the PC too, and you will have to press the power button every morning - a new problem hiding the old one.
  5. Test it: put the PC to sleep, wait a minute, then move the mouse. The PC should stay asleep until you press the power button or a key you deliberately left wake-enabled.
4

Turn Off Wake on LAN

Wake on LAN lets a network packet wake the PC - useful in an office, but on a home network a stray packet from the router or another device can wake it at night. If the network adapter was named in Fix 1, this is very likely the cause.

  1. Open Device Manager > Network adapters, right-click your Ethernet or Wi-Fi adapter and choose Properties.
  2. Open the Advanced tab. Find Wake on Magic Packet and set it to Disabled. Do the same for Wake on Pattern Match if it is listed.
  3. On the same Properties window, open the Power Management tab and uncheck "Allow this device to wake the computer".
  4. Skip this fix if you use Wake on LAN on purpose - for example, to reach an office PC remotely. In that case the wake is the feature working, not a fault, and the real fix is to send the magic packet only when you mean to.
5

Stop Automatic Maintenance and Fast Startup Waking It

Two Windows features of their own can wake a sleeping PC: Automatic Maintenance, which runs updates and scans on a schedule, and Fast Startup, which changes how shutdown and sleep behave. Both are quick to tame.

  1. Open Control Panel > System and Security > Security and Maintenance, expand Maintenance and click Change maintenance settings. Uncheck "Allow scheduled maintenance to wake up my computer at the scheduled time" and click OK.
  2. Press Win + R, type powercfg.cpl, press Enter, and click "Choose what the power buttons do" on the left.
  3. Click "Change settings that are currently unavailable", then uncheck "Turn on fast startup (recommended)" and click Save changes.
  4. Restart the PC once, then put it to sleep and leave it. If it still wakes, the trigger is not in Windows at all - go to Fix 6.
6

Check the BIOS Wake Alarm

If nothing in Windows explains the wake, the alarm may live in the BIOS itself - a "Resume by Alarm" or "Wake on RTC" setting that powers the PC on at a set time, or a "Power on after power failure" option that wakes it after a brief power cut.

  1. Restart the PC and press the BIOS key as it starts (usually Del, F2 or F10 - it flashes on the first screen).
  2. Look under Power Management, Advanced or APM for Resume by Alarm, Wake on RTC or Power On By Alarm and set it to Disabled. The exact name differs by motherboard maker.
  3. Leave "Restore on AC Power Loss" as it is unless the PC wakes right after a power cut - that setting is meant to restart a PC after an outage, and changing it has side effects on a machine you want to stay on.
  4. Save and exit the BIOS. Change nothing else in there - one setting is the whole job.
Do not do this: do not take wake permission away from every device at once - the keyboard and mouse will stop waking the PC too. Do not delete scheduled tasks blindly from Task Scheduler - untick their wake permission instead. Do not turn sleep or hibernate off as a "fix" - that hides the symptom and wastes power. Do not blame one Windows update without evidence - powercfg /lastwake names the cause, and in most reports it turns out to be a forgotten backup schedule, a mouse, or Wake on LAN. And do not install "sleep fixer" or registry-cleaner tools that promise to stop the waking - they cannot name the trigger, and they only add risk.

More PC Fixes on Technical Anshu

Every week: Windows problems, hidden tools and full setup guides, explained step by step.

Subscribe on YouTube

Frequently Asked Questions

Why does my Windows 11 PC turn on by itself at night?

A PC never wakes for no reason - something asked it to. The usual triggers are a wake timer set by Windows Update or a backup program, a scheduled task with wake permission, a mouse, keyboard or network adapter allowed to wake the PC, Wake on LAN answering a packet from the network, or Automatic Maintenance. Run powercfg /lastwake in an admin Terminal right after an unwanted wake and it names the exact trigger, so you switch off that one thing instead of guessing.

powercfg /lastwake shows Wake History Count - 0. What now?

A zero count only means the last-wake query could not name the trigger - it does not mean nothing woke the PC. Open Event Viewer, go to Windows Logs > System, filter the log by the source Power-Troubleshooter, and read the Wake Source line on the most recent entry. On a Modern Standby laptop the log often says Unknown, so run powercfg /sleepstudy instead and check the exit reasons there.

Is it safe to disable Allow wake timers?

Yes. Disabling wake timers only stops timers from pulling a sleeping PC awake - Windows Update and your apps still run normally whenever the PC is awake. The one thing to check first is a backup program with a night schedule: if it relies on a wake timer, its backup will wait until the PC is next awake instead of running at night.

My PC wakes up the second I put it to sleep. Is it the same fix?

Yes, almost always. A wake within seconds of sleeping is usually a device sending a wake signal - most often the mouse, the network adapter, or a USB hub. Run Fix 1 to confirm with powercfg /lastwake, then Fix 3 to take wake permission away from exactly that device. If nothing is named, also run powercfg /requests to see whether an app is holding the PC awake.

Is this the same problem as battery draining in sleep mode?

No. Battery draining in sleep means the laptop stays semi-awake with the screen off and slowly burns power. This problem is the PC fully waking up - screen on, fans spinning - on its own. The two share the same diagnostic commands, but the symptom and the fix are different. If your laptop both drains battery and wakes by itself, fix the waking first, because every wake burns far more battery than sleep itself.

Guide by Technical Anshu · Problem collected from widespread forum reports (Microsoft Community, r/Windows11, and a WindowsForum/XDA account of a forgotten backup schedule waking a PC at night); solution written in original words and verified against Microsoft's powercfg documentation (powercfg /lastwake, /waketimers, /devicequery wake_armed, /devicedisablewake) and the Power-Troubleshooter event log on 15 November 2026. No matching long video exists on the channel - no wake or sleep title was found in the channel catalog - so this blog has no video section and the topic joins the fresh video-topic bank. No Shorts are linked in this blog.