Skip to main content
Up and Coming
February 8, 2014

Help needed. Prevent OS sleep.

Any advice on how to prevent an OS from going to sleep for any of that make VR games that don't require input from a keyboard / mouse / controller. I can't exactly tell the player to change their power profile.
    This topic has been closed for replies.

    5 replies

    Up and Coming
    February 8, 2014
    Well you should, because there's no easy way for that. Not in unity.
    Inspiring
    February 11, 2014
    That's a good point. Let me see what I can find out.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Inspiring
    February 11, 2014
    On Windows, the solution I think is to send some bogus mouse input using SendInput, but I have no idea how to do this in a cross-platform way. Really good question!
    Titans of Space PLUS for Quest is now available on DrashVR.com
    Inspiring
    February 11, 2014
    I just tested this on Winodws 7, and there seems to be no problem. I set sleep to kick in after 1 minute. Then I opened Tuscany Unity and left my desk. Even after a few minutes, the machine did not go to sleep. It appears having a full-screen game running prevents sleep mode.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    RaveTZAuthor
    Up and Coming
    February 15, 2014
    "cybereality" wrote:
    I just tested this on Winodws 7, and there seems to be no problem. I set sleep to kick in after 1 minute. Then I opened Tuscany Unity and left my desk. Even after a few minutes, the machine did not go to sleep. It appears having a full-screen game running prevents sleep mode.


    Windows is giving me a completely different issue. Any notification (updates for Java, steam, anything) minimizes the Unity build (always freaks me out).

    I'm still diving into how to address these oddities.