Solving the Mystery of the Self-Waking Laptop

The story is one that bugged me for quite a long time, through not one but three different models of laptops from Lenovo. First there was my previous work’s Lenovo T510, then a new T420S, and finally a Lenovo T430S. The first laptop was running Windows 7. The second and third were running Windows 8. My problems began when I started carrying these laptops to work everyday in my backpack. I used to configure them to sleep when pressing the right combination of keys (usually FN + F4), or when closing the lids. The laptop would take a few seconds to do whatever it had to do in order to prepare for sleep mode, then the screen would shut down and the “moon” LED icon would turn on (or flash, depending on the laptop’s model), and I would put it into my backpack.

So far so good. But every once in a while I would get to work, to a customer, or back home, and I would see that all this time the laptop was in fact turned on. Obviously this is not just a wasted battery issue but an actual security hazard: the laptop heating up in the enclosed confinements of my backpack, all vents working at full speed and not being able to get enough fresh air to cool it down. When I got the laptop out of the backpack it would be so hot, too hot to touch, and I can only imagine that not only it could melt internal components, but possibly also being in danger of bursting into flames. What was causing this? In this article, I’ll show you how I figured out what was causing my laptop to wake up by itself and some troubleshooting tips on how to fix it.

Laptop Automatically Wakes Up: Testing

Luckily for me, none of the laptops were actually damaged, but even after searching in the Lenovo support site and on their forums, I couldn’t really find one solution that would work for me. What was clear was that something in my laptop’s configuration was causing it to spontaneously wake up from sleep mode, and while shutting it down totally before placing it in the backpack did the trick, it wasn’t always the best solution because I had open apps and browser tabs in my session, and I really didn’t want to have to load everything up from scratch every time I booted my computer. Hibernating the laptop would work, but I found that it took too much time – sometimes matching the length of the time it took to perform a cold boot or even longer. (Though boot time has greatly improved in Windows 8 in comparison to Windows 7).
Herein lies the mystery: What was waking up my laptops?
One method of testing – which may not always work, and if it does it may give you false answers – is using the powercfg.exe command line tool.

  • Open a Command Prompt window and type the following command: powercfg -lastwake

You will get a result similar to this:
laptop wakes up by itself: powercfg -lastawake
By looking at the output you may think you know what caused the last wake-up from the last sleep mode – the “Intel(R) 82579LM Gigabit Network Connection”.
However, in this particular case, that is not true. When I took these screenshots and wrote this article, I actually already knew how to cause this wake-up, and it wasn’t the NIC that did it.

Laptop Waking Up: Network Settings

One option, had the computers been connected to the network, was a Wake On LAN (WOL) packet, which uses a “magic packet” (hard-coded) to trigger a wake-up event that was potentially being sent by another computer, possibly infected by some type of malware. However, in this case the laptops were disconnected from a physical network.
Another option that was related to a network connection was a network adapter setting called “Wake on pattern match,” which turns out is enabled by default in Windows 7 and Windows 8. (More information about these two settings can be found in the following Microsoft article, “Power Management for Network Devices.”)

How to Disable Power-On Settings

If you do want to disable these power-on settings, follow these steps:

  • Access your LAN and WiFi network adapter driver properties (from Device Manager), and make sure the following options are set to disabled (screenshots are done for specific NICs, but in most cases they should be also present for other NICs).
  • In the Advanced tab, select the Wake on Magic Packet and change value to Disabled.

laptop wakes up by itself: power-on setting

  • Select the Wake on Pattern Match and change value to Disabled.

laptop wakes up by itself: power-on setting

  • In addition, in the Power Management tab, uncheck Allow this device to wake the computer and Only allow a magic packet to wake the computer. Click OK.

laptop wakes up by itself: power-on setting
If you want to disable these features you may also want to to it on the Wireless WiFi adapter, and not just on the LAN NIC:
laptop wakes up by itself: power-on setting
laptop wakes up by itself: power-on setting
laptop wakes up by itself: power-on setting
Also, many laptops come with a 3G/4G cellular modem that allows you to insert a SIM card and use your cellular data plan to get cellular data for the laptop when there is no WiFi or cabled connections available. Be sure to also disable the power settings on that type of card, if you have one. For example, in my case, it’s a Ericsson H5321 GW cellular card:
laptop wakes up by itself: power-on setting
Also check your laptop’s BIOS menu for any option that is related to Wake On LAN.
laptop wakes up by itself: wake on LAN
However, in this case the laptops were disconnected from a physical network, so that couldn’t be it.

The Culprits: USB Mice, Keyboards, and Other Devices

What I found is that something I was doing was causing the laptop to wake up on its own. After testing, I came to the conclusion that anytime I disconnected a USB device – mouse, portable HD, flash disk, USB headphones, presenter dongle, etc. – the laptop would wake up, even if it was fast asleep.
In my case, there were at least four or five different mouse types that I’ve used on these laptops: a Microsoft standard wired wheel mouse, a Microsoft ARC mouse, a Microsoft ARC Touch mouse, a Microsoft Touch mouse, and possibly others.
So could it be my mice that are causing the laptops to wake up?
You would imagine that mouse movement shouldn’t wake up a computer from sleep, right? Well, think again. In Windows XP, you could move the mouse and the computer would stay in sleep. However, in Windows 7 and 8, any kind of movement from the mouse wakes the computer, even if you accidentally bump into the desk or if you move it just slightly while closing the laptop get ready to put it in the backpack.
Case in point: In order to capture the screenshots for this article I actually moved my mouse. That’s all it took.
Here is my laptop fast asleep, with the mouse connected to it by a dongle:
laptop wakes up by itself: sleep mode
And here, I moved the mouse just a tiny bit. I could have moved it even less – one millimeter is all it takes. The computer is now awake.
laptop wakes up by itself: awake mode

Disabling the Wake-Up

Normally you would go to Device Manager, find the mouse that is connected to your computer, and in the properties of the mouse driver uncheck the Allow this device to wake the computer box under the Power Management tab. However, some users report that in their case there was no Power Management tab for the mouse. Luckily for me, one mouse – the Micorosft ARC mouse – had such a tab, as shown below.
laptop wakes up by itself: mouse settings
The problem is that you must repeat this procedure with ANY mouse that you ever connect to your laptop. Each and every one of them acts independently, and sometimes, even the seemingly identical mouse may have different settings.
For example, same computer, this time with a Logitech R400 Wireless Presenter:
laptop wakes up by itself: mouse settings
And same computer, this time with the Microsoft ARC Touch mouse:
laptop wakes up by itself: mouse settings
But why stop here? What about keyboards or docking stations, perhaps even monitors? Yes. You need to manually set each and every one of them not to be able to power on the computer. Basically, you should also do the same for any device that you plug into your computer, and if it doesn’t have a power management tab, try doing this on the USB controllers and USB hubs in Device Manager:
laptop wakes up by itself: USB settings
Another solution would be to disconnect the mouse, keyboard, or dongle from the laptop just before you make it go to sleep, and only make it sleep after the cable or dongle was disconnected.

Disable Wake-Up Timers and Scheduled Tasks

But wait, that’s not all! In Windows Vista/7/8, there are many built-in scheduled tasks, some made by Microsoft (such as the Media Center update), some made by third-party vendors (such as Lenovo or Anti-Virus vendors). These tasks may also be responsible for some of these strange wake ups. To manually disable all of them, do the following:

  • Open Control Panel, and go to Power Options.
  • Click on your current power plan, then click on Change plan settings.

laptop wakes up by itself: plan settings

  • In the selected power plan, click on Change advanced power options.
  • In the Power Options window, scroll to Sleep, then disable Allow wake timers.

laptop wakes up by itself: power options
This should fix it.
Do you still see strange wake-ups from your laptop? Let us know in the comments!