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 during long tasks #44

Closed
mattbisme opened this issue Feb 20, 2022 · 4 comments
Closed

Prevent Sleep during long tasks #44

mattbisme opened this issue Feb 20, 2022 · 4 comments

Comments

@mattbisme
Copy link

I noticed when processing large files, such as videos, the app will not prevent the system from sleeping. While upscaling a job overnight, the computer fell asleep. Upon waking it, the app continued the upscale job.

Instead, it would be best if the app prevented system sleep while running a task.

@imxieyi
Copy link
Owner

imxieyi commented Feb 20, 2022

This feature was already implemented in iOS. The same API doesn't work in macOS though.

Looks like it's not easy preventing system sleep on macOS. It requires calling some low-level OS API, which is not easy to do in a Mac Catalyst app and may not be approved by App Store reviewers.

You can try to enable Prevent computer from sleeping automatically when the display is off in macOS Settings and connect your Mac to power while processing.

This feature may come in a future update if there is a viable way to do it. But don't get your hopes too high.

@imxieyi
Copy link
Owner

imxieyi commented Feb 24, 2022

It is possible to prevent sleep. However, it also prevents the display from turning off automatically. Therefore the display will be kept on through the whole process. Will this work for you?

@mattbisme
Copy link
Author

Yes, it's normal for apps that prevent sleep to keep the display on as well. That's no problem. It's possible to use a hot corner to turn off the screen without putting the computer to sleep (I do this with Handbrake all the time). Having the computer stay awake during a job is much better than having the job never finish! Thanks!

@imxieyi
Copy link
Owner

imxieyi commented Mar 9, 2022

This feature is now supported in the latest version (6.0). Feel free to update.

@imxieyi imxieyi closed this as completed Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants