POV-Ray : Newsgroups : povray.beta-test : Beta version waking my computer from sleep : Re: Beta version waking my computer from sleep Server Time
20 Apr 2024 03:50:44 EDT (-0400)
  Re: Beta version waking my computer from sleep  
From: clipka
Date: 3 Dec 2016 00:16:04
Message: <58425514$1@news.povray.org>
Am 02.12.2016 um 02:05 schrieb Mike Horvath:
> I tracked down the cause of my computer waking up from sleep to some
> sort of wake timer in Persistence of Vision(tm) Ray Tracer Version
> 3.7.1-x.knockout.8881807+av294.msvc14.
> 
> Why does it do this? How do I make it stop?

Okay, after having searched in the wrong places for a while, I guess I
have finally found the answer to the puzzle.

POV-Ray uses boost for thread management, and among other things makes
use of a function that causes a thread to enter idle state for a given
duration, so that it doesn't waste computing power just waiting for
messages from other threads.

Boost 1.58 introduced a change in the way this sleep functionality is
implemented on Windows systems; where previous versions used
`SetWaitableTimer()`, boost 1.58 and later use `SetWaitableTimerEx()`,
because this allows to use so called "coalescing timers" that can
presumably save some more energy in standby mode.

Unfortunately, according to the Internerds the new implementation was
buggy, and called `SetWaitableTimerEx()` with a combination of
parameters that the system would interpret as a request to wake up from
sleep mode when the timer expired, defying the whole purpose of the change.

The Internerds also say that this has been fixed in boost 1.60; however,
the current versions of POV-Ray for Windows happen to be using boost
1.59, so does suffer from this bug. The 3.7.0 stable version is
unaffected since it used an earlier version of boost.


So I guess I'll have to merge a new boost version into our repo.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.