Re: Laptop going to sleep during say all

Pranav Lal

Hi Tyler,

How would I reverse these changes in the code? I am trying to build an add-on around this.


-----Original Message-----
From: <> On Behalf Of Tyler Spivey via
Sent: Wednesday, May 24, 2023 7:19 AM
Subject: Re: [nvda] Laptop going to sleep during say all

Note that this is just a quick hack; it disables sleep permanently until NVDA is restarted.
If you want something more polished, you'll have to write an addon.

On 5/23/2023 6:15 PM, Pranav Lal wrote:

Your suggestion is working and the laptop is no longer going to sleep at least in my initial testing.


-----Original Message-----
From: <> On Behalf Of Tyler
Spivey via
Sent: Tuesday, May 23, 2023 12:55 PM
Subject: Re: [nvda] Laptop going to sleep during say all

Try this from the NVDA Python console:
import winKernel;winKernel.SetThreadExecutionState = lambda x: True

If it doesn't work, restarting NVDA will undo that.
On 5/22/2023 10:45 PM, Pranav Lal wrote:
Hi all,

1. I am not in a position to change the power settings of the machine
in question. This is a work machine.
2. My point Jean is that there is activity taking place in terms of
active output therefore to my way of thinking, the laptop should not
go to sleep because it is being actively used. However, now that I
have determined that this is not a screen reader specific problem, I
can move the topic to the chat subgroup if the moderator so desires.
Please note, I am not talking about when my computer is downloading
files etc. I am specifically talking about this occurring when I am
using a screen reader feature hence my post to this list.


*From:* <> *On Behalf Of *Gene
*Sent:* Tuesday, May 23, 2023 10:45 AM
*Subject:* Re: [nvda] Laptop going to sleep during say all

I see that others have discussed what settings to change. I'll add
that such problems should be asked about, rather than just trying to
solve them without results. Trying to solve such problems is fine if
people want to do so, though of course, you may ask without trying to
solve the problem if you wish. /I/f you don't ask, you are having
needless inconvenience and annoyance.

Such questions should be asked on the Chat subgroup, or in another
technology list, since they have nothing to do with NVDA. You would
have exactly the same problem regardless of screen-reader and you
would have it wile doing other things such as downloading long files
while doing nothing else with the computer.

When you see a behavior that is not logically connected with a
screen-reader, such a problem is unlikely to be a screen-reader
problem. It is illogical that a screen[-reader would degrade its own
performance in this way and cause problems for users, when using a
feature of the screen-reader, in this case say all.

On 5/22/2023 8:42 PM, Travis Siegel wrote:

NVDA isn't the only screen reader to do this, MacOS suffers from the
same problem on OSX. I had to add a keep alive routine in my dvd
player, just for that reason.
It also happened when I was reading long documents or web pages on
that platform too. It also happens on IOS, so NVDA is not the only
screen reader that this happens to. It's because, the method that
NVDA uses to scroll the screen doesn't trigger windows to reset the
sleep timer. Until some routine like that is added to NVDA, this
behavior won't change.
The only way I found to solve this problem (which really doesn't
solve it) is to every now and then, press the shift key, this resets
the windows sleep timer. Of course, you have to press it again so
NVDA will continue reading, so it's not exactly the best solution,
but it does work.


Join to automatically receive all group messages.