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 When VM is Running #4963

Closed
peterstory opened this issue Jan 23, 2023 · 1 comment
Closed

Prevent Sleep When VM is Running #4963

peterstory opened this issue Jan 23, 2023 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@peterstory
Copy link

peterstory commented Jan 23, 2023

When running a service within a VM, disabling sleep on the host may be desirable. This could be a per-VM setting, where UTM would set a sleep assertion when the VM is running. For example, see the caffeinate utility:

CAFFEINATE(8)                System Manager's Manual               CAFFEINATE(8)

NAME
     caffeinate – prevent the system from sleeping on behalf of a utility

SYNOPSIS
     caffeinate [-disu] [-t timeout] [-w pid] [utility arguments...]

DESCRIPTION
     caffeinate creates assertions to alter system sleep behavior.  If no
     assertion flags are specified, caffeinate creates an assertion to prevent
     idle sleep.  If a utility is specified, caffeinate creates the assertions
     on the utility's behalf, and those assertions will persist for the duration
     of the utility's execution. Otherwise, caffeinate creates the assertions
     directly, and those assertions will persist until caffeinate exits.

     Available options:

     -d      Create an assertion to prevent the display from sleeping.

     -i      Create an assertion to prevent the system from idle sleeping.

     -m      Create an assertion to prevent the disk from idle sleeping.

     -s      Create an assertion to prevent the system from sleeping. This
             assertion is valid only when system is running on AC power.
...
@peterstory peterstory added the enhancement New feature or request label Jan 23, 2023
@ro--
Copy link

ro-- commented Jan 24, 2023

i use the amphetamine app for this purpose. the caffeinate tool does not keep the mac awake the way i want it to.

@osy osy modified the milestones: Future, v4.2 Feb 26, 2023
@osy osy closed this as completed in b8fcad9 Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants