| Windows 7: How do I prevent going to sleep with processes active? |
09 Sep 2011
|
| | |
How do I prevent going to sleep with processes active? My normal settings are for the display to 'sleep' after 15 mins and the computer to 'sleep' after 20 mins. This is fine for day to day use but once a week and once a month a virus scan and backup are scheduled to run. It is really anoying for the computer to go to sleep whilst these are running and having to remember to set sleep never for these days. Is there a 'switch' somewhere that I am missing?
Windows 7 64 bit | My System Specs |
| |
09 Sep 2011
|
| | Windows 7 Home Premium 64bit 6.1 Build 7601 (SP1) 378 posts |
You can thank MS for Windows 7's incredibly aggressive power savings functionality, which doesn't seem to care what the CPU is doing and goes to sleep during any program operation. Any program, that is, which does not know the "Secret Handshake" to tell Windows 7 to leave it the heck alone (somethng called STES iirc).
Anyway if your AV program isn't smart enough to keep Windows 7 awake (my Comodo isn't either) then you can create your own batch commands to change your Power settings (via CLI powercfg) prior to your AV running, and return the settings back to normal after. Nontrivial at best...
Here's a freeware I just found that might be of interest http://www.ghacks.net/2010/11/21/don...wn-in-windows/
And here is what Programmers need to know to make their proggies keep Windows from sleeping: http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
A couple other programs I found. What you want to do is to Wake your PC just prior to those dates/times when your AV is scheduled to run, then restore your Sleep settings after the AV scan is complete: http://www.dennisbabkin.com/wosb/ http://ck-tnt.blogspot.com/2011/04/h...-stand-by.html | My System Specs | | OS Windows 7 Home Premium 64bit 6.1 Build 7601 (SP1) |
09 Sep 2011
|
| | Windows 7 Ultimate x64/Windows 8 Consumer Preview x64/Ubuntu 11.04 8,372 posts Somewhere Over The Rainbow |
What AV do you use? The reason I ask this is because some anti-virus has an option to automatically shutdown or sleep after a scan is finished. | My System Specs | | System Manufacturer/Model Number Custom Build OS Windows 7 Ultimate x64/Windows 8 Consumer Preview x64/Ubuntu 11.04 CPU Intel Pentium Dual Core E6700 3.2GHz Motherboard ASUS P5G41T-M LX Memory Strontium 8192MB DDR3 1333Mhz Graphics Card msi GeForce N560GTX-M2D1GD5 1GB Sound Card Realtek HD Audio Monitor(s) Displays CHIMEI CMV 221D 22" Screen Resolution 1680x1050 Keyboard Microsoft Wireless Keyboard 1000 Mouse Microsoft Wireless Optical Mouse 2000 PSU SHAW Viper-1500w Gaming PSU Case Black eMaxx ATX Mini Tower Case Hard Drives Seagate Barracuda LP Green 3.5'' 2TB Internal HDD 5900RPM + WD Elements Desktop 1TB External HDD 7200RPM Internet Speed 100GB @ 4.76Mbps |
09 Sep 2011
|
| | Windows 7 Ultimate SP1 (x64) 9,922 posts South Australia |
Hi,
I think the tool that might help you here is powercfg. You access it from an elevanted CMD window.
If you type powercfg /? in the cmd window, it will list several usage options. The one I think might be able to help you is: powercfg -requestoverride
I have never used it, but from the description it looks like you can use a service (for example a backup service or security service) to override the sleep state (i.e. it 'wakes' the computer when the service sends a signal to start). Code:
-REQUESTSOVERRIDE
Sets a Power Request override for a particular Process, Service,
or Driver. If no parameters are specified, this command displays
the current list of Power Request Overrides.
Usage: POWERCFG -REQUESTSOVERRIDE <CALLER_TYPE> <NAME> <REQUEST>
<CALLER_TYPE> Specifies one of the following caller type:
PROCESS, SERVICE, DRIVER. This is obtained by
calling the POWERCFG -REQUESTS command.
<NAME> Specifies the caller name. This is the name
returned from calling POWERCFG -REQUESTS command.
<REQUEST> Specifies one or more of the following Power
Request Types: Display, System, Awaymode.
Example:
POWERCFG -REQUESTSOVERRIDE PROCESS wmplayer.exe Display System I'll see if one of the more experienced users can confirm or deny this, or maybe make an alternative suggestion.
Regards,
Golden | My System Specs | | Computer type PC/Desktop System Manufacturer/Model Number Golden Mk. I.3 OS Windows 7 Ultimate SP1 (x64) CPU Intel i7 860 @ 2.80 GHz Motherboard Gigabyte P55A-UD3R Rev.1. Award BIOS F13 Memory 16GB Corsair Vengance DDR3 @ 661 MHz Dual Channel (9-9-9-24) Graphics Card EVGA NVidia GTX 560 1024MB Sound Card Realtek Integrated Monitor(s) Displays Dual Samsung SyncMaster 2494HS Screen Resolution 1920*1080 and 1920*1080 Keyboard Logitech G110 Mouse Logitech MX518 PSU Thermaltake ToughPower QFan 750W Case Thermaltake Element S VK60001W2Z Cooling Corsair H60 Water Cooling, 2*230mm and 2*80mm case fans Hard Drives 1*OCZ Vertex 2 60GB SSD;
2*Samsung F3 SpinPoint 1TB in RAID0;
3*Samsung F1 SpinPoint 1TB in RAID5;
1*Western Digital 500GB External USB 3.0
1*Seagate 500GB External USB 2.0 Internet Speed Not fast enough!!! Antivirus MSE and Malwarebytes Pro Browser Chrome Version 27 Other Info Laptop: ASUS X54C, Intel Core i3-2330M @ 2.0Ghz, 4GB RAM, Intel HD on-board graphics, Windows 7 Professional SP1 (x64), LinuxMint 14 (x64), PepperMint 3 (x86) |
09 Sep 2011
|
| | MS Windows 7 Ultimate SP1 64-bit 10,288 posts Austin, Texas |
| My System Specs | | System Manufacturer/Model Number Toshiba Satellite S875D-S7239 laptop OS MS Windows 7 Ultimate SP1 64-bit CPU AMD A10-4600M Motherboard AMD Pumori (Socket FT1) Memory 6.00 GB Dual-Channel DDR3 @ 798MHz (11-11-12-28) Graphics Card AMD Radeon HD 7660G Sound Card High Definition Audio Device Monitor(s) Displays Generic PnP Monitor (1600x900@60Hz) Screen Resolution 1600x900@60Hz Keyboard Standard PS/2 Keyboard Mouse HP Wireless Optical Mobile Mouse Model FHA-3410 Hard Drives SSD 119GB Corsair CSSD-V128GB2 ATA Device Internet Speed What the local pub, local coffee shop offers. Other Info Optical Drive:MATSHITA BD-CMB UJ160B ATA Device
Also have an Asus ha1002xp netbook with Win 7 Ultimate installed. |
09 Sep 2011
|
| | MS Windows 7 Ultimate SP1 64-bit 10,288 posts Austin, Texas |
JB,
Would you: | Administrative Tools | Task Scheduler | left-click on Task Scheduler Library | highlight the task in question (from the middle pane) | click on Export (right-hand pane) | Save button.
You will have saved a .xml file. Tack a .txt on to that file so that you can upload it and then upload the file. Files and Screenshots - Upload and Post in Seven Forums
How to Upload and Post a Screenshot and File in Seven Forums | My System Specs | | System Manufacturer/Model Number Toshiba Satellite S875D-S7239 laptop OS MS Windows 7 Ultimate SP1 64-bit CPU AMD A10-4600M Motherboard AMD Pumori (Socket FT1) Memory 6.00 GB Dual-Channel DDR3 @ 798MHz (11-11-12-28) Graphics Card AMD Radeon HD 7660G Sound Card High Definition Audio Device Monitor(s) Displays Generic PnP Monitor (1600x900@60Hz) Screen Resolution 1600x900@60Hz Keyboard Standard PS/2 Keyboard Mouse HP Wireless Optical Mobile Mouse Model FHA-3410 Hard Drives SSD 119GB Corsair CSSD-V128GB2 ATA Device Internet Speed What the local pub, local coffee shop offers. Other Info Optical Drive:MATSHITA BD-CMB UJ160B ATA Device
Also have an Asus ha1002xp netbook with Win 7 Ultimate installed. |
09 Sep 2011
|
| | Windows Server 2008 R2 2,363 posts |

Quote: Originally Posted by maxseven You can thank MS for Windows 7's incredibly aggressive power savings functionality, which doesn't seem to care what the CPU is doing and goes to sleep during any program operation. Any program, that is, which does not know the "Secret Handshake" to tell Windows 7 to leave it the heck alone (somethng called STES iirc). Actually, the "secret handshake" is publicly documented and a very easy-to-use API. It's probably best to lay the blame at a vendor's feet for not keeping a machine awake when it's doing something it thinks is of utmost importance, rather than blaming Microsoft's environment that has been this way since 2000 (at least). Also, other power state options are also well documented, so applications that "must" keep the system awake (and don't) are to blame in this case.
As to the OP's question, powercfg does provide the override function (as per Golden's post), which will allow a particular running process to keep a machine awake if the power plan attempts to sleep whilst that process is running. However, if the antivirus scan runs under the same process name as it's resident A/V (and not a separate process), creating an override for this process will keep the machine awake indefinitely. | My System Specs | | System Manufacturer/Model Number HP Z400 workstation OS Windows Server 2008 R2 CPU Intel Xeon 3550 @3.06GHz Motherboard HP Memory 16GB DDR3 Graphics Card Nvidia Quadro 600 Sound Card Realtek ALC262 Monitor(s) Displays 2x Hanns-G HG281 Screen Resolution 1920x1200 Keyboard Microsoft Natural Ergonomic Keyboard 7000 Mouse Microsoft Intellimouse Explorer 3.0 PSU HP Case HP Hard Drives 1x Samsung 160GB SSD
2x WD 1TB (RAID1) |
09 Sep 2011
|
| | Windows 7 Home Premium 64bit 6.1 Build 7601 (SP1) 378 posts |

Quote: Originally Posted by cluberti Actually, the "secret handshake" is publicly documented and a very easy-to-use API. It's probably best to lay the blame at a vendor's feet for not keeping a machine awake when it's doing something it thinks is of utmost importance, rather than blaming Microsoft's environment that has been this way since 2000 (at least). Also, other power state options are also well documented, so applications that "must" keep the system awake (and don't) are to blame in this case. Actually it changed with Vista, but let's agree to disagree on this one--there are just way too many user problems associated with S3 such that most folks just turn it off (so much for Windows being Green). And way too many vendors whose products don't know about all these "well documented" requirements. | My System Specs | | OS Windows 7 Home Premium 64bit 6.1 Build 7601 (SP1) |
09 Sep 2011
|
| | Windows 7 Home Premium 64bit 6.1 Build 7601 (SP1) 378 posts |

Quote: Originally Posted by Golden I think the tool that might help you here is powercfg. Hmmm I think I said that.
Depends on the program, but for some I create a batch file that just does this: Code: powercfg -change -standby-timeout-ac 0
powercfg -change -hibernate-timeout-ac 0
powercfg -change -monitor-timeout-ac 1
CALL whatever process you want
powercfg -change -standby-timeout-ac 30
powercfg -change -hibernate-timeout-ac 30
powercfg -change -monitor-timeout-ac 5 For my Comodo Internet Security weekly AV scans, I use Task Scheduler to wake the computer and do the above "change to 0" then 2 hours later put the settings back via "change to 30" which is plenty of time for the AV scan to complete.
No fun, but it works. | My System Specs | | OS Windows 7 Home Premium 64bit 6.1 Build 7601 (SP1) |
09 Sep 2011
|
| | |
Karlsnooks
Thanks for reply. First time I've gone into Task Scheduler, interesting!
Seems McAfee must use its own scheduler as it does not appear in the list. I am using McAfee version 11.0.578 and Virusscan ver 15.0.291 which runs every friday.
The other 'problem program' is standard Windows backup, set to run on the 1st of the month. There appears to be 3 entries for backup? I will upload a file if you still need it. | My System Specs | | How do I prevent going to sleep with processes active? problems? All times are GMT -5. The time now is 12:58 PM. | |