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

Prevent sleep and reboot and f**k Windows Update #3

Open
ghost opened this issue Jun 20, 2021 · 3 comments · May be fixed by #12
Open

Prevent sleep and reboot and f**k Windows Update #3

ghost opened this issue Jun 20, 2021 · 3 comments · May be fixed by #12

Comments

@ghost
Copy link

ghost commented Jun 20, 2021

Windows will sleep, reboot, and do update, which interrupt encoding. OKE should prevent these stupid things.

@bodayw
Copy link

bodayw commented Sep 3, 2021

AFAIK mpv does prevent Windows from going to sleep / turning off the screen while running. Maybe check how mpv does it?

Just to mention that most systems running Windows nowadays are using "modern standby" (and in many cases it cannot be disabled), and it seems that it's not possible to prevent sleeping while the screen is turned off. For example, see:

https://answers.microsoft.com/en-us/windows/forum/all/stop-modern-standby-from-activating-on-sp4/466f2392-6f54-42c0-a1f8-ee3eb1135f15

and

https://www.asus.com/support/FAQ/1043537/

@MysteryDove
Copy link

There's an api called ShutdownBlockReasonCreate provided by microsoft: https://docs.microsoft.com/zh-cn/windows/win32/api/winuser/nf-winuser-shutdownblockreasoncreate

Maybe we should give it a shot.

Also, the application is expected to react with WM_QUERYENDSESSION to prevent shutdown either?

Another reference about Shutdown Changes for Windows Vista should be helpful.

I'm not familiar with the Windows stuff, but this should be work somehow

@MysteryDove MysteryDove linked a pull request Feb 13, 2022 that will close this issue
@MysteryDove
Copy link

As of now OKEGUI is the only program that is able to block shutdown and being killed by the system. The other major processes(e.g. x26x, vspipe, EAC, etc.) are still killed by Windows.

Is there any way to run these stuff as a subthread of the OKEGUI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants