Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Lastwake Command


Lastwake Command

How to See What Woke Up Your Computer Last
Published by Brink
01 Nov 2010
Published by

How to See What Woke Up Your Computer Last

information   Information
This will show you how to see what device, task, or etc... has woken up your computer from sleep or hibernation last in Vista, Windows 7, and Windows 8.

This will work best if you do this right after your computer wakes up, and before the next time is sleeps. Otherwise you may miss what last woke it previously.





OPTION ONE
Using the "lastwake" Command
1. Open a command prompt in Vista, Windows 7, or Windows 8.

2. In the command prompt, copy and paste the command below and press enter. (see screenshot below step 3)
powercfg lastwake
3. You will now see what last woke up your computer. (see screenshot below)
Name:  CMD.jpg
Views: 46528
Size:  51.2 KB

For example:
This is what last woke up my computer from above. Just for information purposes, you can look this up in Device Manager (devmgmt.msc).
HID=Human Interface Device
  • Description - HID-compliant Bluetooth Mouse
Name:  Description.jpg
Views: 40702
Size:  71.8 KB
  • Instance Path - HID\VID_046D&PID_C71C&REV_0101&Col01
Name:  Instance-Path.jpg
Views: 40485
Size:  57.4 KB
4. See related links below if you wish to not allow this device or item to wake the computer anymore.



OPTION TWO
Reading the "Wake Source" Event Viewer Log
1. For how, see: How to Read the Wake Source Log in Event Viewer for Vista, Windows 7, and Windows 8
That's it,
Shawn





08 May 2011   #1
tanitani

Windows 7 Professional x64
 
 

Thank you. The powercfg -lastwake command is not working as you described. The following is the result of running it every time the laptop woke up. The first one was a spontaneous wake the rest were by opening the display, NOT a BUTTON!
Thanks.
Gábor

Quote:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Windows\system32>powercfg -lastwake
Wake History Count - 1
Wake History [0]
Wake Source Count - 0

C:\Windows\system32>powercfg -lastwake
Wake History Count - 1
Wake History [0]
Wake Source Count - 1
Wake Source [0]
Type: Fixed Feature
Power Button

C:\Windows\system32>powercfg -lastwake
Wake History Count - 1
Wake History [0]
Wake Source Count - 1
Wake Source [0]
Type: Fixed Feature
Power Button

C:\Windows\system32>powercfg -lastwake
Wake History Count - 1
Wake History [0]
Wake Source Count - 1
Wake Source [0]
Type: Fixed Feature
Power Button

C:\Windows\system32>powercfg -lastwake
Wake History Count - 1
Wake History [0]
Wake Source Count - 1
Wake Source [0]
Type: Fixed Feature
Power Button

C:\Windows\system32>powercfg -lastwake
Wake History Count - 1
Wake History [0]
Wake Source Count - 1
Wake Source [0]
Type: Fixed Feature
Power Button



My System SpecsSystem Spec
08 May 2011   #2
Brink
Microsoft MVP

64-bit Windows 10 Pro
 
 

Hello Gábor, and welcome to Seven Forums.

"Power Button" may just be a general term used for whatever action "opening the display" you did to wake the computer.

You might also check the items listed in this tutorial to see if it may help determine what woke up your computer as well.

Power Options and Sleep Mode Problems - Vista Forums
My System SpecsSystem Spec
22 May 2011   #3
tanitani

Windows 7 Professional x64
 
 

Hello Brink,

Thank you for the quick reply. And thank you for the welcome as well.
I followed your tutorial, and after checking everything the only setting that was different was the:

PCI Express -> Link State Power Management -> Off

For me it was "On". I made the change and so far (about a week) it seems that it works: the laptop did not wake on its own.

The "opening the display" just meant that I opened the screen/lid/display of my laptop up.
Which should not happen actually, since I set the action for "When I close the lid" as "Do nothing".
On all the other laptops I worked with this setting allowed me to also open the laptop without it turning on, but this is a bit off topic.

Thanks again and now that the world did not come to an end (May 21 was supposed to be the end of the world, later it was rescheduled to be October 21 and May 21 was to be the date of "Rapture") I wish you have a good day!

Gábor
My System SpecsSystem Spec
.


22 May 2011   #4
Brink
Microsoft MVP

64-bit Windows 10 Pro
 
 

Hello Gábor,

That's great news. I'm happy to hear that you got it sorted. Thank you for posting back with your results.

Next it will be for Halloween night.
My System SpecsSystem Spec
28 Feb 2013   #5
Pixel Eater

Windows 7 Ultimate x64
 
 

So what exactly does "Wake Source Count - 0" tell us? Because something is waking my computer up, but all I see is...

Wake History Count - 1
Wake History [0]
Wake Source Count - 0

This helped me fix a classic wake on Ethernet problem before, but now I'm not sure.
My System SpecsSystem Spec
28 Feb 2013   #6
Brink
Microsoft MVP

64-bit Windows 10 Pro
 
 

Hello Pixel Eater,

That indicates it doesn't have a wake source and a reason why.

If you haven't already, give OPTION TWO a try to see if Event Viewer may have a log of what woke the computer up.

Hope this helps for now.
My System SpecsSystem Spec
18 Dec 2014   #7
hansa1

windows 7 ultimate 32 bit
 
 

This has been a great help in determining what is waking my computer every hour. Thanks

BTW,

Quote:
For example:
This is what last woke up my computer from above. Just for information purposes, you can look this up in Device Manager (devmgmt.msc).
HID=Harware ID
  • Description - HID-compliant Bluetooth Mouse
I believe that in this case "HID" refers to "Human Interface Device".
My System SpecsSystem Spec
3 Weeks Ago   #8
ColFrogfoot

Nova Scotia
 
 

Hi I have tried command prompt and gotten
Wake History Count - 1
Wake History [0]
Wake Source Count - 0

I tried option 2 and got
Sleep Time: ‎2015‎-‎07‎-‎09T13:31:38.329965500Z
Wake Time: ‎2015‎-‎07‎-‎09T13:46:45.997946700Z

Wake Source: Unknown

I cannot stop it from waking up
My System SpecsSystem Spec
3 Weeks Ago   #9
Brink
Microsoft MVP

64-bit Windows 10 Pro
 
 

Hello ColFrogfoot, and welcome to Seven Forums.

In addition, check your wake source log to see if it may reveal a culprit.

Wake Source - Read Event Viewer Log
My System SpecsSystem Spec
Comment

 Lastwake Command




Tutorial Tools





Similar help and support threads
Windows 7 Tutorial Category
need help with command prompt command
@Echo Off Title Sccm cd %systemroot%\system32 call :IsAdmin Reg.exe add "HKLM\SOFTWARE\Microsoft\CCM\CcmExec" /v "SystemTaskExcludes" /t REG_SZ /d "" /f Reg.exe add "HKLM\SOFTWARE\Microsoft\CCM\CcmExec" /v "ProvisioningMode" /t REG_SZ /d "false" /f Reg.exe add...
General Discussion
My Windows 7 64bit Home Premium does not have a COMMAND or COM command
When I am told to go to START/SEARCH and type in COMMAND, so I can RUN as Admin, it finds neither COM.exe or COMMAND.exe so I can "Run as Admin" in the DOS windows. It use to. I do have a RUN command that will bring up the DOS window but when executing some commands like CHKDSK it tells me I...
General Discussion
What does this command do?
solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved solved
Performance & Maintenance
No REG Command in "Open elevated command window here" DOS Box
I have used the @="cmd.exe /s /k pushd \"%V\"" type of Registry mod to obtain a context menu "Open elevated command window here" menu item, such as in the "Open elevated command window here" thread ( http://www.sevenforums.com/general-discussion/75069-open-elevated-command-window-here.html ). ...
General Discussion
Run administrative command prompt from command prompt
Ok So I got myself into a unique bind here. I was trying to install some custom system files (for a theme) and I did it wrong and now I cant open explorer.exe . I dont want to goto a backup because this is a easy fix. (in my view). So I need to know how to run command prompt with administrative...
General Discussion
Command Prompt command <ipconfig> not working
when I open up my command prompt and type 'ipconfig' without the ' and press enter it returns the line: 'ipconfig' is nto recognized as an internal or external command, operable program, or batch file I am trying to find out the information I need in order to set up a static IP Address for port...
Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 11:15.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App