
Here are some details on what you should check to fix Windows 7 sleep from waking up automatically.
How to prevent windows from waking up
Prevent your Network Card to wake your Windows Vista/7 up from its sleep
Check your network card properties through the device manager and disable the “Allow this devide to wake the computer” feature.
- Right click on your “My Computer” then select Properties.
- Click Device Manager on the left side of the Properties window.
- Check your Network card on the Network Adapters (Click on the + sign to expand).
- Right click on your network card and select properties.
- Go to the Power Management tab and untick the option there to prevent your network card from ever waking up your Windows.

Find out what wakes up your Windows 7/Vista from its sleep
To find out what event/device woke up your Windows from its sleep state, go to command prompt (type cmd on the Run/Search box and press ENTER), then type this:
powercfg – lastwake

To get the most detailed info (and probably easiest) on the device that wakes your Windows up during the sleep, type:
powercfg –devicequery wake_armed

There! You’ll find the culprit
I clicked my mouse to wake my Windows up intentionally so that’s why you see an HID compliant mouse on the screenshot above. Yours might be different.
Hope this helps to prevent your computer wakes up from sleep by itself!
If it still doesn’t work:
- Check out your Power Management Options on your Control Panel (Start, Control Panel, Power Settings, Change plan settings, Change advanced power settings).
-> “Multimedia settings” option, “When sharing media.” ->”Allow the computer to sleep.
-> Check other options one by one while you’re at it.



{ 141 comments… read them below or add one }
Next Comments →
Nice tip. Thanks for the info. WIll share this post with my friends who are using vista and windows 7.
I am now happy with Windows XP
Well, most people are still happy with Windows XP
im still happy with 3.5…. get with the program
yes, i’m still very very happy with my windows XP
Actually I never realized how sick I was of XP until I started using Win7. In particular, networking and hardware installation are vastly improved. Score one (just one) for M$.
Ah, finally my computer sleeps undisturbed.
Appears to have been my network card. I did kindof suspect it as the MSN window popped back up when it resumed from sleep.
Cool
Most of the time, the issue comes from the network card
Thanks that was anoying the hell out of me
Thanks, that really helped diagnose the problems I was having, didn’t know about the powercfg command-line
Thanks so much! Just went online and encountered this problem. The microsoft article said to click manage…did not work. Your solution is to click properties…now I have sleep. As a newby to the computer world, I will keep your website in mind for reference. If you ever need any help with a wood lathe…just drop a line.
Thanks
Glad that the post helped you out. Feel free to subscribe to this blog (through the feed button on the top)
thanks man, i looked at the powercfg and it says the network card did it.
so i turned it off and it should fix this for good
The “-” hyphen syntax may not allow the command to be recognized when typing it in the Search/Run/Console.
Just exclude the “-” hyphen and the command will run fine:
powercfg lastwake
powercfg devicequery wake_armed
thanks a lot, that really helped. Mine was the network card. thanks again.
Actually, in my previous comment, I should have noted that you need to open the Windows Console to execute the powercfg commands.
To Start a new Command Prompt shell in Windows, just type CMD in the Windows Vista “Start Search” box or open the Windows “Run” dialog box in the Windows Start Menu and type CMD.
Then the Console will open and you can type your powercfg commands to isolate what is causing the system to wake from Sleep/Hybernation mode:
powercfg lastwake
powercfg devicequery wake_armed
In my situation, I had already “unchecked” the box in the Power Management tab for Network devices so I knew that these devices were not waking up my system. But something was waking up my system so I used Michael Aulia’s command line tech tips and finally got my notebook system to stay in sleep mode and it also now stays in hybernation mode, it was my keyboard/touchpad device that was waking up my system.
Thanks for the tech tips Michael.
Thank you for that!
I’ve been searching the internet the whole day to find out the problem, and then i ran into this, 10 minutes later and keyboard + mouse wake disabled, it finally goes into sleep mode.
Thanks again.
Thanks a lot..it really worked
I was tired with this sleep prob. in win 7.
you are a champion, this problem was driving me crazy
people listen
if your computer is old like a p4 then win xp is where u want to stay at. if you are running anything new that came with vista its time to leave that in the dark. again win 7 is not for older pc’s
win 7 = winxp + a hint of vista but alot more XP
I guess that’s your point of view.
I’m running Win 7 on a P3 laptop (an old Inspiron 8100) and it works just fine. No noticeable degredation in performance over the XP that was on it. Vista, however, I would not dare try to run on it. There are plenty of people on the web reporting that Win 7 is running great on older hardware.
What a strange thing to say…
Windows 7 is by far the greatest os MS have ever released, I’ve installed it on countless ‘old’ machines including laptops, old dell machines, all sorts. Performance is obviously not as fast as newer machines, but it’s only held back by the hardware, not the os.
I think the slowest machine I’ve installed it on was an Athlon 750 with 512MB ram. Sure it was not exactly a flyer, but it was no slower than windows 2000 or XP.
Thank You its really works
My PC had been running 32 bit XP and the sleep worked perfectly. I just upgraded to 64 bit Win7 and it started waking itself from sleep after only a few seconds. It never seemed to go completely to sleep. The display shut off, the hard drives spun down and the power light started to blink, but the cooling fans continued to run.
I found that both my keyboard and mouse had wake-from-sleep enabled. I tried to turn one off at a time and it didn’t help. Turning both off did the trick. The mouse and keyboard are wireless and work from a Microsoft USB Dual Receiver Wireless base and use the Intelli[Type|Point] drivers installed automatically by windows update.
The network driver had wake-from-sleep and magic packet enabled too, but those settings doesn’t seem to cause this problem.
This problem was the only really annoying glitch that I had (ignoring the hassle of backing up and restoring all of my data.)
It was a pain, wasn’t it. I have a Microsoft Wireless Mouse but thankfully never encountered such problem like you had
I think I found the root cause to my keyboard/mouse wakeup problem. It turns out that the motherboard has a default jumper setting that doesn’t provide standby power to the USB ports. When system went into standby, the ports would power down and that was interpreted as a turn on signal. Moving the jumper to provide standby power seems to have fixed the problem (as well as allowing the keyboard and mouse to actually bring the machine out of sleep.)
Thanks a million, my PC would go into a kind of half sleep and I could not get it do anything except by a hard shutdown. Why would Microsoft enable those wake on network activity settings by default? Anyway you saved me. Thanks
Thank you so much!! Windows Media Center was waking my computer up every night at midnight to download tv guide data. Your article helped me figure this out. THANKS!!
This is helpful… especially the powercfg command. Windows Media Center was the culprit, and it fried my system board… I had the laptop in its neoprene sleeve, and at 8AM it woke my machine up to do some update that I don’t really care about. The heat buildup was enough to fry the board. Lucky the hard drive was still OK.
Funny thing is, MS makes it very hard to find a way to change the settings. Windows Media Center has no menus, so how the hell am I supposed to configure it? I may just uninstall it.
Great post! Great tip on finding the last wake device. I’m surprised that the network card is set to wake on default.
Thanks, mine was the keyboard.
Had to remove the dashes in the commands too.
FINALLY Hibernate & Sleep work on my Thinkpad!
You’re a lifesaver!
All the best from Vienna/.at,
Ben
I tried all of those options mentioned here but the problem really wasn’t with windows 7 at all.
I installed on an msi wind. Everything was great accept for the sleep issue. It would sleep for a while if i closed it but the screen would not shut off on its own and sleep would never come. It turns out a simple bios upgrade was the trick now all runs flawlessly.
So in short. Just upgrade your bios.
If you need to upgrade your bios, then a good source to find out which BIOS to download is http://www.wimsbios.com
Wim
Thanks for the help. I killed several things that could have been waking my computer (creating heat in the cabinet and burning power) but it would still wake overnight. With your help I found a sleep timer enabled that I would never have found on my own. The powercfg was a great bit of information.
John
Wicked, thank you. That’s rocked my world.
I just figured it out! I have a Dell Studio desktop, and recently it’s been waking up every couple of hours. Upon thinking about what I’ve done recently that could have caused this I remembered that I changed the power option plan to high performance. Upon looking into this I clicked on advanced options and found an option to wake the computer up on a timed schedule, it was checked!!I’ll see if this works.
Thanks much for the post, Windows was making me crazy always waking up at 5:30 AM. Turns out it was Windows Media Center trying to update itself (mceupdate_scheduled). The task inexplicably had “Wake Computer to Run Task” checked.
Thanks for the tips. I have been having this problem for weeks. Looks like it was some stupid program that did it again and again. I removed it. Hope this works.
Is that command new to Windows 7 and Vista? I only recently installed Windows 7 from XP, I skipped Vista entirely and have yet to really get beyond the ooo’s and ahhh’s of it all. I’m bookmarking this for future reference.
Thanks for sharing it!
.-= Wayne John´s last blog ..How to install Windows 7 – Upgrade your operating system with ease with these tips =-.
Thank you for the command line to show what was waking my PC!
Thank you Michael, That solved the problem!
This is not a perfect solution tho to turn off wake on lan completely because what if you need it later.
I wonder if anyone else notices things like your box turns on for 1-5 sec then it turns back off. So we can see a great work in winsucks7 again…
Thank you for this posting!
Michael,
Thanks for this article, but I’m still having trouble. I know the problem is the network card (Trendnet USB) cause I can unplug it and the system sleeps like a baby. I’ve checked all the things you say to check, but when I use powercfg -lastwake, it says “wake history count – 1, wake shistory[0], wake source count – 0″
I’m using an Asus P5WD2 Premium MB and I never had this problem till I installed Vista (now running windows 7 ultimate 32). I’m really stumped, any suggestions??
Thanks,
Mitch
Ugh.. I’m sorry I can’t help you on this. Have you found out the solution? Maybe try updating your network card’s driver?
Thanks for this post. I have massive issues with this since I currently need a laptop battery and never turn my laptop off. I am just tired of waking up in the morning and having to reboot to the windows black choice screen
I has the same problem and found the solution :
In the Task Scheduler go to : Microsoft -> Windows -> Media Center
Then, open the task “mcupdate_scheduled” and uncheck “Wake this computer to run this task” in the conditions tab.
Enjoy ! Don’t know why it’s on by default.
Perfect solution to my problem, thanks so much. With ‘lastwake’ I could see it was the network card, then just followed your instrutions as above. Presto!
Dude! Thanks a lot. This problem was extremely annoying. How dare my Windows 7 disobey my commands!
Nice, easy to read page too. Clearly, this wasn’t written up by Micrsoft.
You did your good deed for the day!!!!
Thanks this fixed it for me on Windows 7 Professional 64 bit – it all happened after the network card driver was updated after a Microsoft update.
Cheers!
that helped me with that, but now for some reason i cant seem to stop windows media center to stop from popping up when i click on something its like its taken control of my programs help please.
I spent so long searching for a solution to this problem; i changed all the devices connected to my computer to not allow them to wake the computer when in sleep mode (wake on lan), I updated my bios, and tried numerous different things I found online but it still randomly woke while in sleep mode. After months of no luck i finally came to the solution MOZILLA FIREFOX; when Firefox is running and the computer is put to sleep it will wake up but is you close the browser the computer stays asleep. I hope this helps those who have tried everything out there and still cant find the solution.
Yes, I just found that on my Dell XPS-400 (2005 ish), this seems to be what is waking my Win 7 machine. Not at all what I expected to be the culprit. I was closing background things one-by-one, then thought to try Firefox. Now my computer is resting peacefully. Annoying…
Thanks a lot for the cmd line syntax.
The problem I had was using an iOmega USB KVM switch, seems it keeps sending a signal via the keyboard input. So disabling “allow this device..” on my keyboard did the trick!
Hey thanks for the info. the command prompt method work out excellent i would have never known it was my mouse that was waking my computer. anyways i found the problem and the PC stays asleep all night. thanks a million for your help. As for those who are having problems with the command prompt line dont include the ” – ” between the “powercfg – lastwake” it wont work in the command prompt i found after many trials. anyways thanks a bunch.
Thanks man,it worked !!!
Great !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Great tutorial, thank you very much for the breakdown.
This is, however, far too much work to begin with. You shouldn’t even have had to write this tutorial at all
I am also having the same problem with my media box waking up during the night. It doesn’t do it every night, but maybe every other night. I have previously been through the powercfg malarkey, and I disabled everything bar the athome ir control device as without that I can’t wake the computer with the media remote control.
Trouble is, I don’t want to mess with things like the mcupdate scheduled task as that is required in order to download guide data (as far as I know).
The other annoying thing is that even though I have the power management settings to put the computer to sleep after 30 minutes, it completely ignores this if the media centre is running. If I close wmc and leave it on the desktop, it will sleep as it’s meant to… still wakes up during the night, but sleeps again after 30 minutes.
Really annoying!
Any ideas anyone? TIA
Thanks a lot. Your article really helped me diagnose an issue I was experiencing. I will talk about it on my blog. Cheers!
Thank you so much! This helped me out a lot I was having a such a problem and being the novice I am had no idea what to do
This worked for me! Thanks for the tutorial!
Nichole recently posted..Youtube to Mp3
thank you very much!
Absolutely key article. The powercfg tool was crucial.
Great tip!!! Thanks for this. I seriously thought my system was compromised. Kept waking up around 2 am.
Next Comments →
{ 8 trackbacks }