Recently there were some changes in TvService/Scheduler/Scheduler.cs that result in setting ES_SYSTEM_REQUIRED while recording is active but never releasing it after recording is finished. So the system idle timer gets disabled while recording but never gets (re-)enabled, which prevents the system from going to sleep automatically (without user intervention or forced standby by PowerScheduler).
I am quite sure that the real cause for mantis 2693 ("PowerScheduler does not prevent windows standby even when StandbyHandlers disallow it") ist the use of (unpredictable) timer threads calling SetThreadExecutionState() both in Scheduler and in PowerScheduler (see here). This bug has been fixed for Scheduler by gibman_dk ("proper thread used instead of timer"). Thus there is no need for touching the SetThreadExecutionState calls and my proposal is simply to restore these as they were in RC1 and before (see patch).
Michael
PS: gibman_dk's fix should be applied to PowerScheduler too, because it also uses timer threads calling SetThreadExecutionState() to allow and prevent standby. I am just making a complete rework of PowerScheduler that also addresses this issue...
I am quite sure that the real cause for mantis 2693 ("PowerScheduler does not prevent windows standby even when StandbyHandlers disallow it") ist the use of (unpredictable) timer threads calling SetThreadExecutionState() both in Scheduler and in PowerScheduler (see here). This bug has been fixed for Scheduler by gibman_dk ("proper thread used instead of timer"). Thus there is no need for touching the SetThreadExecutionState calls and my proposal is simply to restore these as they were in RC1 and before (see patch).
Michael
PS: gibman_dk's fix should be applied to PowerScheduler too, because it also uses timer threads calling SetThreadExecutionState() to allow and prevent standby. I am just making a complete rework of PowerScheduler that also addresses this issue...