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: Is there a way to find out what put computer into sleep mode?

06 Feb 2016   #1
dc2000

Windows
 
 
Is there a way to find out what put computer into sleep mode?

I know that there's a good powercfg command line call that can tell what last woke up computer from sleep:

powercfg /lastwake

what I need is a reverse -- command/software to tell me what was the last process that put computer into automatic sleep?

PS. I've done all the usual checks in the power settings and such. None were found. The system in question has some running service/process that puts it into automatic sleep after a predictable amount of time. I just need to find which one it is.


My System SpecsSystem Spec
.
07 Feb 2016   #2
maxseven

Windows 7 Home Premium 64bit 6.1 Build 7601 (SP1)
 
 

Quote   Quote: Originally Posted by dc2000 View Post
I know that there's a good powercfg command line call that can tell what last woke up computer from sleep:

powercfg /lastwake

what I need is a reverse -- command/software to tell me what was the last process that put computer into automatic sleep?

PS. I've done all the usual checks in the power settings and such. None were found. The system in question has some running service/process that puts it into automatic sleep after a predictable amount of time. I just need to find which one it is.
Well the place to start is in your Windows System log--look for Kernel-Power. Here's my last:

Code:
Log Name:      System
Source:        Microsoft-Windows-Kernel-Power
Date:          2/7/2016 6:54:13 AM
Event ID:      42
Task Category: (64)
Level:         Information
Keywords:      (4)
User:          N/A
Computer:      Latitude
Description:
The system is entering sleep.

Sleep Reason: System Idle
You may have to examine the events around this one as well to help you understand what happened.
My System SpecsSystem Spec
07 Feb 2016   #3
dc2000

Windows
 
 

Thanks. That's a good start. If I go to Event Viewer -> Windows Logs -> System and then set a filter on "Kernel-Power" I get these:

Quote:
The system is entering sleep.

Sleep Reason: Application API
and then if I go to Details and set XML view, I get this:

Quote:
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Microsoft-Windows-Kernel-Power" Guid="{331C3B3A-2005-44C2-AC5E-77220C37D6B4}" />
<EventID>42</EventID>
<Version>2</Version>
<Level>4</Level>
<Task>64</Task>
<Opcode>0</Opcode>
<Keywords>0x8000400000000004</Keywords>
<TimeCreated SystemTime="2016-02-06T02:02:03.935384200Z" />
<EventRecordID>33360</EventRecordID>
<Correlation />
<Execution ProcessID="4" ThreadID="2344" />
<Channel>System</Channel>
<Computer>DESKTOP-69AQNQQ</Computer>
<Security />
</System>
- <EventData>
<Data Name="TargetState">2</Data>
<Data Name="EffectiveState">2</Data>
<Data Name="Reason">4</Data>
<Data Name="Flags">0</Data>
</EventData>
</Event>
The problem is that ProcessID="4" is always identified as SYSTEM. So that doesn't help much.
My System SpecsSystem Spec
.

08 Feb 2016   #4
maxseven

Windows 7 Home Premium 64bit 6.1 Build 7601 (SP1)
 
 

Quote   Quote: Originally Posted by dc2000 View Post
The problem is that ProcessID="4" is always identified as SYSTEM. So that doesn't help much.
You're right, I looked at this PC and 4 is simply "System".

You said sleep occurs "after a predictable amount of time". I can only suggest that you look at the Event Logs to see if this specific timing points you at an activity.

Since Event Viewer has numerous Windows logs in it, I have found it useful to create a Custom View selecting all Event Levels and and also checking "By log" both "Windows Logs" and also "Application and Service Logs" and limiting Logged to e.g. the last hour. Then it's of a manageable length.

I think too that once the Custom View has been created you can select Properties on the right and fine-tune the params as you see fit.
My System SpecsSystem Spec
08 Feb 2016   #5
dc2000

Windows
 
 

Thanks for the suggestion.
My System SpecsSystem Spec
08 Feb 2016   #6
UsernameIssues

W7 Pro SP1 64bit
 
 

Change the power settings to put the computer to sleep...
...then change them back - as desired.

If that fails to prevent sleep, see if you can find the offending app via:
Troubleshoot Application Conflicts by Performing a Clean Startup
My System SpecsSystem Spec
08 Feb 2016   #7
AddRAM

Windows 7 Pro x64 Windows 10 Pro x64
 
 

The only thing that should be putting your pc to sleep is the power plan.

Set it how you want it.

Gateway:


Attached Images
Is there a way to find out what put computer into sleep mode?-capture.png 
My System SpecsSystem Spec
Reply

 Is there a way to find out what put computer into sleep mode?




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
How to get SSD to lock computer when I put it in sleep mode?
I like using sleep mode for a quick shut down/computer lock, but ever since switching to an SSD, it doesn't lock when I put it to sleep. Is it possible to have the computer lock in sleep mode on SSDs?
Hardware & Devices
BSOD when i put computer into sleep mode
This has been going on for a few weeks now, I finally saw it happen when I manually slept my computer
BSOD Help and Support
BSOD After Computer goes into SLEEP mode.
Hello, I recently started having trouble with my computer shutting down after placing it into SLEEP mode. Here is the Error information: Problem signature: Problem Event Name: BlueScreen OS Version: 6.1.7601.2.1.0.768.3 Locale ID: 1033 Additional information about the problem: ...
BSOD Help and Support
Computer will not boot after sleep mode
Hello, I've recently upgraded Windows XP to Windows 7, and just last night I put my computer in sleep mode. It seemed to be fine, but it acted weird, it actually completely shut off, then back on. I just thought it was a weird bug, so I just took power from it overnight. When I tried to boot...
BSOD Help and Support
Computer into sleep mode
Hi, I have a problem, my computer won't star again After I put it to sleep last time.. I did this from my iPhone and now my computer won't come back. It starts and everything but screen, mouse and KB dosent work.. When I look inside my computer there are 4 shining lights.. 1234 phase led I think...
Performance & Maintenance


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 15:35.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App