Prevent system sleep when reading lon pieces of text in say all#10643
Conversation
|
@feerrenrut: I'd like to shamelessly ask you to review this, as this really interrupts my current work flow in a major way. I have a system that has a lock of the screen enforced at one minute by means of a group policy, and this makes it very hard to use say all in Word and on the web. |
|
Hi, On systems without group policies set, it's preventing my laptop from turning off the screen which is consuming more power on my laptop. My laptop has a very small battery, so I need to get as much power out of it as I can, and this will have negative effects. Thank you very much and I look forward to any input you may have. Thanks, Brandon |
|
@LeonarddeR Did you investigate using only @btman16 It would be best if you create a new issue to explain the problem. In the new issue please answer the following:
|
|
This flag was added on request of @michaelDCurran in #10111 (comment) . I"m happy to remove it for this case and provide a pr. Does this block 2020.1 from being released, though? |
I'd like to understand the use-cases from @btman16 better first.
I don't think this is a serious enough issue to block the release at this late stage. From the MS docs:
This makes me think that Also the end of the MS docs has an answer to the screen saver question. Though the use of screen savers is pretty rare these days!
|
|
@btman16 Would you be able to try this build of NVDA to see whether this fixes it for you? |
That's what I figured as well. Especially if we intend the NVDA highlighter to follow along say all at some point. @btman16 nevertheless, it would be helpful to see how the try build behaves in your case. Also, wouldn't it be possible for you to disable your screen with windows+p entirely (choose second screen)? That works for several older pc's that still have a dedicated VGA connector, like my five year old laptop. |
|
Hi,
Fixed!
Thanks so much! I think this will be perfect!
Thanks,
Brandon
…On 5/4/20, Leonard de Ruijter ***@***.***> wrote:
>
>
> > I"m happy to remove it for this case and provide a pr.
>
> I'd like to understand the use-cases from @btman16 better first.
>
> > Does this block 2020.1 from being released
>
> I don't think this is a serious enough issue to block the release at this
> late stage.
>
> From the [MS
> docs](https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate):
>
> > Multimedia applications, such as video players and presentation
> > applications, must use ES_DISPLAY_REQUIRED when they display video for
> > long periods of time without user input. Applications such as word
> > processors, spreadsheets, browsers, and games do not need to call
> > SetThreadExecutionState.
>
> This makes me think that `ES_DISPLAY_REQUIRED` isn't appropriate for audio
> only users, though, > Low-vision users may still want the screen to be
> kept on. It's certainly annoying for me having the screen turn off while
> I'm trying to read a long thing.
That's what I figured as well. Especially if we intend the NVDA highlighter
to follow along say all at some point.
@btman16 nevertheless, it would be helpful to see how the try build behaves
in your case. Also, wouldn't it be possible for you to disable your screen
with windows+p entirely (choose second screen)? That works for several older
pc's that still have a dedicated VGA connector, like my five year old
laptop.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#10643 (comment)
--
“Be what you are. This is the first step towards becoming better than you are.”
– J. C. Hare & A. W. Hare
|
|
Hi,
Another question is, since this Try build seemed to fix it, do I still
need to make a new issue?
Thanks,
Brandon
…On 5/4/20, Brandon Tyson ***@***.***> wrote:
Hi,
Fixed!
Thanks so much! I think this will be perfect!
Thanks,
Brandon
On 5/4/20, Leonard de Ruijter ***@***.***> wrote:
>>
>>
>> > I"m happy to remove it for this case and provide a pr.
>>
>> I'd like to understand the use-cases from @btman16 better first.
>>
>> > Does this block 2020.1 from being released
>>
>> I don't think this is a serious enough issue to block the release at
>> this
>> late stage.
>>
>> From the [MS
>> docs](https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate):
>>
>> > Multimedia applications, such as video players and presentation
>> > applications, must use ES_DISPLAY_REQUIRED when they display video for
>> > long periods of time without user input. Applications such as word
>> > processors, spreadsheets, browsers, and games do not need to call
>> > SetThreadExecutionState.
>>
>> This makes me think that `ES_DISPLAY_REQUIRED` isn't appropriate for
>> audio
>> only users, though, > Low-vision users may still want the screen to be
>> kept on. It's certainly annoying for me having the screen turn off while
>> I'm trying to read a long thing.
>
> That's what I figured as well. Especially if we intend the NVDA
> highlighter
> to follow along say all at some point.
>
> @btman16 nevertheless, it would be helpful to see how the try build
> behaves
> in your case. Also, wouldn't it be possible for you to disable your
> screen
> with windows+p entirely (choose second screen)? That works for several
> older
> pc's that still have a dedicated VGA connector, like my five year old
> laptop.
>
> --
> You are receiving this because you were mentioned.
> Reply to this email directly or view it on GitHub:
> #10643 (comment)
--
“Be what you are. This is the first step towards becoming better than you
are.”
– J. C. Hare & A. W. Hare
--
“Be what you are. This is the first step towards becoming better than you are.”
– J. C. Hare & A. W. Hare
|
|
Hi, no. As for releasing as part of 2020.1, I’m personally against it due to risk of regressions in areas such as power usage, so I propose letting it bake for a while in alpha. Thanks.
|
|
Hi,
I'm sorry for sending so many messages, I missed your question about
using second screen only.
On this machine, that strategy won't work since there's no VGA connector.
As for the highlighter, that is a good point, and I don't know what we
could do in that instance. Is it possible to perhaps do some sort of
logic, where if the user had the highlighter enabled, then you could
call the IsDisplayRequired, but not call it if the highlighter is
turned off?
As I said before I totally see where you're coming from, and I think
this try build does fix my case.
And for you, are you still able to read without an issue if you use
the try build?
Thanks,
Brandon
…On 5/4/20, Brandon Tyson ***@***.***> wrote:
Hi,
Another question is, since this Try build seemed to fix it, do I still
need to make a new issue?
Thanks,
Brandon
On 5/4/20, Brandon Tyson ***@***.***> wrote:
> Hi,
>
> Fixed!
>
> Thanks so much! I think this will be perfect!
>
> Thanks,
>
> Brandon
>
> On 5/4/20, Leonard de Ruijter ***@***.***> wrote:
>>>
>>>
>>> > I"m happy to remove it for this case and provide a pr.
>>>
>>> I'd like to understand the use-cases from @btman16 better first.
>>>
>>> > Does this block 2020.1 from being released
>>>
>>> I don't think this is a serious enough issue to block the release at
>>> this
>>> late stage.
>>>
>>> From the [MS
>>> docs](https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate):
>>>
>>> > Multimedia applications, such as video players and presentation
>>> > applications, must use ES_DISPLAY_REQUIRED when they display video
>>> > for
>>> > long periods of time without user input. Applications such as word
>>> > processors, spreadsheets, browsers, and games do not need to call
>>> > SetThreadExecutionState.
>>>
>>> This makes me think that `ES_DISPLAY_REQUIRED` isn't appropriate for
>>> audio
>>> only users, though, > Low-vision users may still want the screen to be
>>> kept on. It's certainly annoying for me having the screen turn off
>>> while
>>> I'm trying to read a long thing.
>>
>> That's what I figured as well. Especially if we intend the NVDA
>> highlighter
>> to follow along say all at some point.
>>
>> @btman16 nevertheless, it would be helpful to see how the try build
>> behaves
>> in your case. Also, wouldn't it be possible for you to disable your
>> screen
>> with windows+p entirely (choose second screen)? That works for several
>> older
>> pc's that still have a dedicated VGA connector, like my five year old
>> laptop.
>>
>> --
>> You are receiving this because you were mentioned.
>> Reply to this email directly or view it on GitHub:
>> #10643 (comment)
>
>
> --
> “Be what you are. This is the first step towards becoming better than you
> are.”
> – J. C. Hare & A. W. Hare
>
--
“Be what you are. This is the first step towards becoming better than you
are.”
– J. C. Hare & A. W. Hare
--
“Be what you are. This is the first step towards becoming better than you are.”
– J. C. Hare & A. W. Hare
|
|
While low vision or sighted users likely want to keep their screen on during long periods of reading, I think they are more likely to windows settings appropriate for keeping their screen on, and familiar with using the mouse to keep the screen on. It's certainly too late 2020.1, but I would accept a PR for this change. |
|
Hi,
Thanks for these changes, and your input.
Would you still like me to make a new issue describing this case?
Thanks,
Brandon
…Sent from my iPhone
On May 5, 2020, at 11:58 AM, Reef Turner ***@***.***> wrote:
While low vision or sighted users likely want to keep their screen on during long periods of reading, I think they are more likely to windows settings appropriate for keeping their screen on, and familiar with using the mouse to keep the screen on.
It's certainly too late 2020.1, but I would accept a PR for this change.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
|
As for the highlighter, that is a good point, and I don't know what we
could do in that instance. Is it possible to perhaps do some sort of
logic, where if the user had the highlighter enabled, then you could
call the IsDisplayRequired, but not call it if the highlighter is
turned off?
Perhaps a stupid question since noone has asked it yet, but wouldn't the screen
curtain figure into this as well?
In other words: if it's on, you would want to let the display keep sleeping, but
otherwise keep the machine awake.
|
|
Hi,
This is a totally separate instance, I think.
The reason is that screen curtain related things don't apply at all to
Windows 7, so the proposed solution would probably not want to center
around screen curtain.
Does that answer your question?
Thanks,
Brandon
…On 5/6/20, Luke Davis ***@***.***> wrote:
> As for the highlighter, that is a good point, and I don't know what we
> could do in that instance. Is it possible to perhaps do some sort of
> logic, where if the user had the highlighter enabled, then you could
> call the IsDisplayRequired, but not call it if the highlighter is
> turned off?
Perhaps a stupid question since noone has asked it yet, but wouldn't the
screen
curtain figure into this as well?
In other words: if it's on, you would want to let the display keep sleeping,
but
otherwise keep the machine awake.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#10643 (comment)
--
“Be what you are. This is the first step towards becoming better than you are.”
– J. C. Hare & A. W. Hare
|
|
Yes, I had missed the Win 7 affiliation, sorry.
|
@btman16 No new issue required. Thanks! |
|
I would like to thank you all for you help and proposing a solution to
the issue.
Will it be showing up in Alpha?
|
Yes, it was delivered with PR #11118 and should now be available in alpha. |
Fixes #17649 Partially reverts #11118 Follow up of #10111, #10643, Summary of the issue: On some systems (mine, for example 😉) the screen still locks during a say all even though we reset the system idle timer. We also reset the display timer in the past, but this was reverted in #11118, particularly on request of @btman16 Description of user facing changes Added a new advanced setting that, when enabled, also resets the display timer. Description of development approach Added new helper/wrapper methods to systemUtils Rather than resetting the timer(s) many times during a say all, we now persist the state during say all using the ES_CONTINUOUS flag. This should avoid an edge case where reading a line takes more then a minute and the sleep timer is a minute, in which case the system will still lock.
Link to issue number:
Follow up of #10111
Summary of the issue:
When a system is set up to lock or go to sleep within one minute, say all is interrupted when reading long paragraphs in virtual buffers. Possibly in other cases as well.
Description of how this pull request fixes the issue:
Similar as in #10111. We instruct the system not to sleep. This happens on every line we reach.
Testing performed:
Tested with a long paragraph of text in Firefox browse mode. My system no longer locks within one minute.
Known issues with pull request:
In theory, say all could still be interrupted when reading a very long line at a very slow rate.
Change log entry: