Skip to content

Windows wakes in a bag: powercfg /lastwake before disabling devices

By Published 14 min read

Some links on TechInfoTime are affiliate links: if you sign up or buy through them we may earn a commission, at no extra cost to you. We recommend a tool only where it fits the problem, and say who should skip it.

On this page (11 sections)
  1. The short version
  2. What you need before you start
  3. How to read powercfg /lastwake and tell a device from a timer
  4. powercfg /devicequery wake_armed: which devices are still allowed to wake it
  5. powercfg /waketimers and scheduled wakes versus a hardware wake
  6. Why closing the lid doesn't stop modern standby, and what hibernate changes
  7. Turning hibernate on and setting lid-close and sleep actions
  8. The network adapter, USB mouse and dock cases that still wake it
  9. How to verify the fix after a bag trip
  10. When to add monitoring instead of chasing wake sources
  11. Questions people still ask

In short: Run powercfg /lastwake first and you'll see the one source that woke the machine. If it's a device, disable its wake permission; if it's a timer, reschedule it. For bag carry, switch to hibernate so a stray wake can't run in a sealed sleeve.

Part of our guide on audio drivers stop working after update windows 11

Closing the lid only turns the screen off on a modern standby laptop: the machine keeps listening in your bag.

At a glance
First commandpowercfg /lastwake
Armed devicespowercfg /devicequery wake_armed
Timerspowercfg /waketimers
Bag settingHibernate on battery
Modern standbyS0, listens while lid shut
Hibernate stateS4, board powered down

The short version

  • Read before you disarm: /lastwake names the source, /devicequery wake_armed lists every device still allowed to wake the machine.
  • Two suspects cause almost all bag wakes: a network adapter armed for magic packets, and a scheduled maintenance or update timer.
  • Closing the lid only disables the screen on modern standby (S0) machines; the box keeps listening and warming up.
  • Hibernate writes the session to disk and powers the board down, so a touchpad nudge or a magic packet can't start it.
  • Change both actions: what closing the lid does on battery, and what the sleep timer does on battery.

What you need before you start

You need one elevated Command Prompt and about ten minutes. Every command below reads or changes power settings, so a normal window will refuse the writes.

Press the Windows key, type cmd, right-click Command Prompt, and pick Run as administrator. Keep that window open for the whole session.

You don't need any third-party tool for the diagnosis. Everything comes from powercfg, which ships with Windows.

One caution before you change anything: read the current state first. Guessing which device wakes the laptop is why most people disable five things and still find it warm. It helps to understand bat script keep running after error before going further.

  • Elevated Command Prompt: right-click, Run as administrator.
  • Your laptop's charger: hibernate and wake tests need stable power.
  • Notebook and pen: write down each source before you touch a setting.
  • A quiet minute: watch what wakes the machine, so you can tell a device from a timer.

How to read powercfg /lastwake and tell a device from a timer

open laptop on kitchen table showing black command prompt window
open laptop on kitchen table showing black command prompt window

Say you pull the laptop out at a cafe and it's warm, half charged, and the fan was running in your bag. The machine already recorded why.

Type powercfg /lastwake and press Enter. The output is short: a wake history count, then a wake source entry with a type and a name.

The type is the whole answer. Device means a piece of hardware triggered it, and the name tells you which one. Fixed Feature means a power button, lid switch, or similar built-in control, which usually means a physical knock, not a rogue driver. There is more on windows 11 crashes after sleep in a separate guide.

No name under the source often points at firmware or a timer rather than a listed device. That's the moment to check /waketimers instead of opening Device Manager.

Timers show as scheduled software, not hardware, so they respond to Task Scheduler changes, not to unchecking a box in Device Manager. Mixing the two is the most common wasted hour on this problem.

  1. Open the elevated Command Prompt.
  2. Type powercfg /lastwake and press Enter.
  3. Read the Wake Source line: note whether the Type says Device, Fixed Feature, or nothing.
  4. Write down the named device or the timer it points to.
  5. If no device is named, run powercfg /waketimers next.
What each wake source type means for your fix
Source typeWhat fired itWhere you fix it
DeviceNetwork adapter, USB mouse, dock, BluetoothDevice Manager, uncheck wake permission
Fixed FeaturePower button, lid switch, keyboard knockBag padding, or disable lid wake in firmware
No name / timerWindows Update, maintenance, scheduled taskTask Scheduler conditions
Not listedFirmware, fast startup wake, unknownFirmware settings, then hibernate

powercfg /devicequery wake_armed: which devices are still allowed to wake it

Picture a laptop that woke three times overnight, and every device looks innocent. The list you need is the one showing who's allowed to try. For the detail, see our notes on fixing altgr key after sleep.

Type powercfg /devicequery wake_armed and press Enter. It returns only devices currently holding wake permission, which is a much shorter list than Device Manager shows.

An armed device doesn't wake the machine by itself; it's simply permitted. A USB mouse that's armed will wake it when the bag jostles. A network adapter armed for magic packets wakes it when another machine sends the right packet.

For each armed device you can live without, open Device Manager, find it under its category, right-click, Properties, Power Management tab, and uncheck Allow this device to wake the computer. People in this spot often ask about troubleshooting firmware errors in Windows as well.

If that tab is missing for a device, the driver doesn't support wake settings and disabling won't help. Leave it and move to the next one.

Common offenders on a travelling laptop: the Ethernet or Wi-Fi adapter, a USB mouse or keyboard, a dock, and a Bluetooth radio. Disarm the one that matches your /lastwake line, not the whole list.

  • Network adapter: disarm it on a laptop that never needs Wake-on-LAN.
  • USB mouse or keyboard: disarm both; bag jostling is enough to wake them.
  • Docking station: disarm unless you rely on waking by dock button.
  • Bluetooth radio: disarm if you never wake by Bluetooth accessory.
  • Touchpad and keyboard: usually can't be disarmed from Windows; they sit on the Fixed Feature path.

powercfg /waketimers and scheduled wakes versus a hardware wake

Say you disarm the network adapter and it still wakes at 3am. The clock is the clue. A wake that lands at the same time each night is almost never a device. People in this spot often ask about registry edit not working after saving as well.

Run powercfg /waketimers in the elevated prompt. It lists active wake timers with the task name and the next time it's due.

Most names point at Windows Update, Windows Defender maintenance, or scheduled defrag and backup tasks. These do real work, so disabling them outright trades battery drain for missed updates.

The cleaner fix is to change the conditions on the task. Open Task Scheduler, find the task named in the timer output, open its properties, and on the Conditions tab uncheck Wake the computer to run this task.

You can also block wake timers wholesale while on battery. The setting lives under Power Options, Change plan settings, Change advanced power settings, Sleep, Allow wake timers, and set it to Disable on battery.

That switch stops scheduled wakes when the laptop is unplugged, which is exactly the in-a-bag case. Plugged in, your updates still run on time.

  1. Run powercfg /waketimers and read the task names.
  2. Open Task Scheduler and locate each named task.
  3. Open Properties, go to the Conditions tab, uncheck Wake the computer to run this task.
  4. In Power Options, set Allow wake timers to Disable on battery.
  5. Run /waketimers again to confirm fewer or no entries remain.

Why closing the lid doesn't stop modern standby, and what hibernate changes

laptop screen filling frame with white text command prompt output
laptop screen filling frame with white text command prompt output

You close the lid, slide the laptop into its sleeve, and assume it's off. On a modern standby machine, that's not what happened.

Modern standby, or S0 low power idle, keeps the processor and network stack in a listening state while the lid is shut. The screen is off; the machine is not. A magic packet, a firmware wake, or a scheduled task can bring it fully awake in a sealed bag.

There's nowhere for the heat to go. That's why the sleeve feels warm and the battery drops overnight.

Hibernate is the bag setting because it writes the whole session to disk and powers the board down, entering what Windows calls S4. In that state nothing is listening, so a jostled touchpad or a network packet can't start it.

Think of sleep as a shop with the lights off but the door unlocked. Hibernate is the same shop with the power cut and the door bolted.

The cost is a slower resume, usually a handful of seconds longer than sleep while the session reads back from disk. For a laptop that travels in a bag, that's a fair trade.

Sleep states on a laptop that lives in a bag
StateWhat stays liveWake risk in a bagLid-close speed
S3 sleepRAM held, some devices armedModerate to highFast
S0 modern standbyProcessor and network listeningHighFast but drains
S4 hibernateNothing; session on diskNone from devicesSlower resume

Turning hibernate on and setting lid-close and sleep actions

Hibernate sometimes disappears from the power menu on machines with fast startup set up a certain way. Bring it back before you touch the lid settings.

Open the elevated Command Prompt and run powercfg /hibernate on. Nothing prints if it works; run powercfg /a afterwards and check hibernate is listed as available.

Then set the two actions that decide what your laptop does by itself. Open Power Options, choose what closing the lid does, and set On battery to Hibernate. Set Plugged in to whatever you prefer, since a bag trip is unplugged by definition.

Set the sleep timer on battery as well: Power Options, Change plan settings, Change advanced power settings, Sleep, Sleep after, and choose a short On-battery value such as 10 or 15 minutes. A laptop that hibernates early runs cooler in a bag.

If hibernate never appears as an option in the dropdown, your firmware or a policy is blocking it. Check the firmware setup for a hibernate or S4 support entry, then rerun powercfg /hibernate on.

  1. Run powercfg /hibernate on in the elevated prompt.
  2. Run powercfg /a to confirm hibernate is available.
  3. Open Power Options and choose what closing the lid does.
  4. Set On battery to Hibernate.
  5. Set Sleep after on battery to a short value.

The network adapter, USB mouse and dock cases that still wake it

Say you did everything and it woke once more. Three hardware paths cause most leftovers, and each needs a different stop.

The network adapter is the classic. If it's armed for magic packets or pattern match, another device on the same network can wake it. Disarm wake on the adapter in Device Manager, and in the adapter's own Advanced tab look for Wake on Magic Packet and Wake on Pattern Match and disable them too.

A USB mouse or dock wakes on the smallest movement. Unplugging the receiver before it goes in the bag is the free fix; disarming the device in Device Manager is the tidier one. A dock has a dedicated wake button on many models, which means the dock stays armed even when you don't want it.

Bluetooth is the quiet one. A paired phone or headset reconnecting can wake the machine, so disarm the Bluetooth radio if you never wake by accessory.

After a change, test at home: close the lid, leave it an hour, and reopen it. If it resumes without warmth and without a battery drop, the bag trip is fixed.

  • Network adapter: disarm wake in Device Manager and in the adapter's Advanced tab.
  • USB mouse: unplug the receiver before bagging, or disarm it in Device Manager.
  • Dock: disarm unless you specifically use its wake button.
  • Bluetooth: disarm the radio if nothing needs to wake the machine.

How to verify the fix after a bag trip

device manager window open beside a usb mouse on a desk
device manager window open beside a usb mouse on a desk

A fix you haven't tested is a guess. The verification is quick if you know what to look for.

After a trip, open the elevated prompt and run powercfg /lastwake first. If the source is a device or a timer you didn't change, you've found the second cause.

Run powercfg /devicequery wake_armed next and compare with your earlier list. Anything that reappeared got re-armed, usually by a driver update.

For a deeper look, run powercfg /sleepstudy and open the HTML report it writes. Look at the battery drain line and the wake entries in the same window you travelled in.

If the machine now reports no wake sources for that window and the battery percentage is close to where it was, the job is done. Pair the software settings with a padded sleeve so a power button press has less chance of catching.

  1. Run powercfg /lastwake and note the source.
  2. Run powercfg /devicequery wake_armed and compare with your earlier list.
  3. Run powercfg /sleepstudy and open the report.
  4. Check battery drain across the travel window.
  5. If anything re-armed itself, disarm it again after the next driver update.

When to add monitoring instead of chasing wake sources

This is a machine-level fix, so it doesn't tell you who used the laptop or what ran while it was awake. If the laptop is shared or managed, that's a different question.

SentryPC is cloud-based monitoring software for parents and employers, and it fits that second question rather than the wake problem itself. It logs activity in real time, filters content, and can schedule device usage windows from a central dashboard.

It won't stop a network adapter waking the machine, and it isn't a power management tool. Set hibernate first, then use it if you need a record of what happens on the device.

One honest limitation: it runs in the background by design, so it won't announce itself to the person using the laptop. That's the point for a parent or an employer, and a reason to skip it if you're the only user.

  • Set hibernate on battery and disarm the wake source first: that fixes the bag problem.
  • Add SentryPC only if you need activity logs, content filtering or time limits.
  • Skip it for a personal laptop you use alone.
The verdict

Read the wake source, disarm the one device or reschedule the one timer, then set hibernate on battery for the bag.

Questions people still ask

Why does my laptop get hot in the bag even after I set it to sleep?

Sleep states on modern hardware keep the network stack and some devices listening. A magic packet, a scheduled task or a jostled touchpad can bring the machine fully awake with the lid shut, and a sleeve traps that heat. Hibernate powers the board down instead.

I disabled every wake device and it still wakes. What did I miss?

Check powercfg /waketimers rather than Device Manager. Scheduled Windows Update and maintenance tasks wake the machine on a clock, and they don't appear in the armed device list. Disable wake on those specific tasks or set Allow wake timers to Disable on battery.

Can I stop a USB mouse waking the laptop without unplugging it?

Yes. Open Device Manager, right-click the mouse, open Properties, and on the Power Management tab uncheck Allow this device to wake the computer. If that tab isn't there, the driver doesn't expose the setting and unplugging the receiver is the practical option.

Does hibernate use more battery than sleep?

No, it uses less over hours. Hibernate writes the session to disk and powers down, so drain is near zero in a sealed bag. Sleep keeps RAM powered and, on a modern standby machine, keeps listening, which is where the overnight drain comes from.

How do I know the fix worked without travelling with it?

Close the lid at home, leave the laptop for an hour, and open it. Run powercfg /lastwake and check for a source. If the list is empty and there's no warmth around the lid, the same will hold in a bag.

I've opened a sleeve to a laptop warm enough to worry me, and the answer was always in the two lines powercfg prints, not in the five settings I'd already changed.

Daniel Brooks Editor

Daniel Brooks writes TechInfoTime's guides to Windows, Mac and phone problems, online privacy and security, and the apps and AI tools worth using, working through each fix step by step on the settings real people have.

More in Windows & PC Help