Skip to content

Option to prevent OS from sleeping #5856

Description

@akleshchev

Feature

In Preferences -> Setup, add a an option to prevent OS from sleeping when agent is not away
Defaults to off

When enabled, App will prevent OS from sleeping if character is not in "away" mode. In case of away mode, signal OS to restart the 'time till sleep' timer.

Benefits:

  • For users that means less distruptions (like OS deciding to sleep duting a concert)
  • For Viewer it means more reliable shutdowns as viewer can't function correctly with sleep.

Test plan

  • set OS to turn off monitor or sleep in 5 minutes
  • select an apropriate option in preferences
  • set 'away' timeout to 10 minutes
  • login
  • OS shouldn't sleep at least for 10 minutes. Should sleep after 15 minutes or once agents turns 'away' (OS specific).

Notes

For potential implementations check SetThreadExecutionState (Windows) and IOPMAssertion (MacOS)

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requeststaletriageFlags issues that need to be triaged

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions