Jump to content

Sleep and scheduled defragmentation = Away Mode?


Recommended Posts

I had scheduled some recordings which would end at 3:15am, and then DVBV should send the PC into sleep.

 

post-125142-0-04602700-1431029430_thumb.png

 

Instead, DVBViewer sent the PC into Away Mode. For my machine, that means it's only turning off the monitor.

 

DVBViewer.log

 

Why's that?

 

I noticed that the scheduled defragmentation started and immediately stopped at 1:00am. Could that have any influence on the machine being sent to away mode instead of sleep/stand-by?

 

Now I've disabled away-mode and deactivated the scheduled defragmentation. But sleep-mode usually worked before, so I don't know what the problem was this time around.

Link to comment

If you use Windows Vista or newer, a program cant prevent sleep mode triggered by a program or user anymore.

The only way to prevent sleep mode in this situation is to let the PC go into Away Mode.

The DVBViewer sends the PC never in Away Mode, it only sets a flag which results in the PC going into Away Mode if a user or program try to send the PC into sleep mode during a recording.

Link to comment

DVBViewer usually resets the ES_AWAYMODE_REQUIRED flag for its process (!) immediately after recording is done. However, another process may still have it set. If only one process in your system has this flag set the PC will not go to sleep mode, but to away mode under the conditions described by Tjod.

Link to comment

If you use Windows Vista or newer, a program cant prevent sleep mode triggered by a program or user anymore.

 

The only way to prevent sleep mode in this situation is to let the PC go into Away Mode.

 

The DVBViewer sends the PC never in Away Mode, it only sets a flag which results in the PC going into Away Mode if a user or program try to send the PC into sleep mode during a recording.

So the last line in the log

"06.05.15 03:14:30.251 TfrmMain Powermessage Going Away..."

is no message from DVBViewer?

 

When the PC successfully goes into Sleep mode after a recording, that line isn't in the log.

Link to comment
"06.05.15 03:14:30.251 TfrmMain Powermessage Going Away..."

is no message from DVBViewer?

 

It's a WM_POWERBROADCAST message with a PBT_POWERSETTINGCHANGE parameter sent by Windows to all running processes. It informs them that the PC is going to away mode, which means, an application or the user has tried to trigger sleep mode, but the ES_AWAYMODE_REQUIRED flag was set by at least one process.

Link to comment
  • 2 weeks later...

No way known to me.

 

I've written a tool that displays the current ES_SYSTEM_REQUIRED and ES_DISPLAY_REQUIRED state, but for some unknown reason the Windows API call used for retrieving this information does not tell anything about ES_AWAYMODE_REQUIRED.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...