Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Turn off monitors on workstation lock' quirk #57

Closed
GTR8000 opened this issue Aug 24, 2016 · 4 comments
Closed

'Turn off monitors on workstation lock' quirk #57

GTR8000 opened this issue Aug 24, 2016 · 4 comments

Comments

@GTR8000
Copy link

GTR8000 commented Aug 24, 2016

Win10 Pro x64 Build 1607 14393.82
T-Clock Redux x64 - 2.4.1 Build 419

The 'Turn off monitors on workstation lock' feature works great, however I have found one quirk with it:

When the screensaver is active, bringing the PC back to life with a mouse movement/key press stops the screensaver and brings up the logon/lock screen. It appears that T-Clock is interpreting this as the PC being locked (which it already was), and is turning off the monitors. An additional mouse movement/key press is then required to turn the monitors back on.

I don't know if there's a way for T-Clock to distinguish between a user-initiated lock (ALT+CTRL+DEL then ENTER) vs the state of the screensaver changing from active to inactive then going to the logon/lock screen, but it seems that it's treating both events the same and is turning off the monitors when you're actually trying to unlock the PC.

Any thoughts are appreciated, thanks!

@White-Tiger
Copy link
Owner

White-Tiger commented Aug 24, 2016

There's not much one could do... at least nothing straight forward.
See: WTSRegisterSessionNotification

Your problem is, that the session isn't locked while the screensaver is running.. you wouldn't be able to see it otherwise... (since the lock screen is protected and usually not accessible by other apps)
And unfortunately, Windows doesn't seem to tell us when a screensaver toggled it..

Well... we could further delay the monitor turn-off and see if the user had been idle the entire time... Like delaying by 3 seconds and the user being idle for at least 2.4
And/or as someone once requested, keep the monitor turned off as long as the screen is locked... (so if something moved the mouse or pressed a key after the monitor was already turned off, it'll turn it off once again after a short delay)

@GTR8000
Copy link
Author

GTR8000 commented Aug 24, 2016

I should clarify that I meant the logon screen exclusively, not the Win10 "lock" screen. I have the lock screen disabled, so I go directly to the logon screen when waking up from the screensaver (old Windows behavior before Microsoft thought up the awful lock screen).

It's not really too big a deal, I just figured I'd mention the behavior in case there were a solution for it.

Thanks!

White-Tiger added a commit that referenced this issue May 21, 2017
…s user idle (#57)

this fixes issues with screensaver activated locks and allows us to turn off the monitor again after it's been turned on by mouse movement (eg. by accident; had been requested before on DonationCoder's)

In theory, T-Clock can now react on any kind if "lock" whether it's a "lock" or "switch user" that caused the logon screen to trigger. Though Windows doesn't yet allow us to turn off monitors or detect if the system is idle when it wasn't a "lock" that caused it
@White-Tiger
Copy link
Owner

@GTR8000
Copy link
Author

GTR8000 commented May 22, 2017

Yes, the 5 second delay makes a big difference, thank you!

Now when the screensaver is active, and the mouse is moved, instead of immediately turning off the monitor(s) it waits 5 seconds, allowing you to log in without having to shake the mouse again to wake the monitors up.

Perfect, much appreciated fix!

@GTR8000 GTR8000 closed this as completed May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants