Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Anyway to prevent the Oculus from going to sleep-mode/freeze-mode

InxInx Posts: 8
NerveGear
Hi!

We are currently using the Oculus rift on a exhibition, however.. 
we are experiencing some issues with our Unity-application from time to time freezes..

We noticed that the Oculus for some reason decides to freeze the last frame once you remove the HMD from the head, so we covered the light-sensor with a pice of tape. This works for now.. but I really dont think this is a solid way of doing it... so is there anyway to disable this "freeze-mode"?

We have also noticed that if the Oculus isnt used for a few minutes, the application also freezes on the last frame, we are currently not sure if this is caused by the Oculus rift or some other part of the system, but is there some sort of "idle-timer" kicking in when the oculus hasnt detected change in position/rotation for a while?.. if there is.. then is there a way to disable this?

Our goal is to be able to use the Oculus without any freezing for at least a few hours (at least 10h)

Regarding all the freezing.. Im not sure if this is a part of the Oculus runtime/"driver", or if its a part of Unitys implemenmtation of the runtime/SDK... but no matter... PLEASE consider changing this behavior.. it would be extremly much more helpful to simply give the developers and event to listen to and then take which ever action they prefer, then to "lock" your developers to do things the way Oculus thinks we want to use the hardware.. we are for this very reason now considering switching to the HTC Vive since it appears to be a more solid pice of software and hardware.

Is the freezing anything anyone else can relate to?
Tagged:

Comments

  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    You can do this by enabling the Run In Background player swtting and checking the OVRManager.isUserPresent property in an Update function. If the value becomes false, you will need to set VR.VRsettings.enabled=false to resume rendering to the main monitor. Another option is to add a Camera just for the main monitor whose tarfet eye is None (Main Monitor). But that will cost performance when VR is active. The reason we stop rendering to the headset when you take it off is to prevent burn-in. Unfortunately there is no way to globally disable that behavior yet, but it would probably only be feasible as a user setting.
  • InxInx Posts: 8
    NerveGear
    Hi,
    Thanks for the reply, thats some great info!
    I will try the "Run In Background"-option as soon as possible and also make sure to use the OVRManager.isUserPresent to enable/disable VR.
  • 3dw3dw Posts: 1
    This works but after the user has removed the headset and VRSettings.enabled is set to false, the camera still has the distortion applied to it which is uses when rendering to the Oculus.

    Has anyone else experienced this?
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    Are you using Rift or Gear VR? Gear VR currently doesn't support dynamic switching between VR and non-VR modes. Rift does support it and it would be very difficult to end up with a post-distortion image on the main monitor.
  • Gibbie_learnersedgeGibbie_learnersedge Posts: 29
    Brain Burst
    edited October 2016
    vrdaveb said:
    Are you using Rift or Gear VR? Gear VR currently doesn't support dynamic switching between VR and non-VR modes. 
    Hi @vrdaveb

    When will Gear VR supports dynamic switching between vr modes to non-vr modes(I assume like normal apps)? It is possible, I mean the oculus app it self supports both non-vr and vr modes. Come on Oculus release this feature already! We are all wanting to implement this to our vr apps.
  • srowlandssrowlands Posts: 12
    NerveGear
    I am also suffering from a distorted image on the main monitor when turning vrsettings.enabled to false on Rift, it works fine in editor.
  • srowlandssrowlands Posts: 12
    NerveGear
    @vrdaveb

    It seems to be an FOV issue, however adjusting the FOV doesn't resolve the problem. I am using Unity 5.4.1p4 and the Oculus Utilities for Unity 1.8.
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    > When will Gear VR supports dynamic switching between vr modes to non-vr modes

    We don't have a firm ETA, but I would guess within the next 6 months.

    >  oculus app it self supports both non-vr and vr modes

    Actually there are two separate apps for 2D and 3D modes. Today you can do the same and send intents between the two apps to provide a unified experience.

    > distorted image on the main monitor when turning vrsettings.enabled to false

    Distorted how? Can you provide a screenshot and output_log.txt? When VR is enabled, Unity controls the camera's FOV and local pose. When it's disabled, you may need to set the values differently from script. I would need more information about the problem to be sure.
  • srowlandssrowlands Posts: 12
    NerveGear
    edited October 2016
    I sorted it, you have to reset the cameras aspect ratio & FOV when you call VRSettings.enabled = false.

    Thanks Dave.
  • infectednlinfectednl Posts: 24
    Brain Burst
    Any chance you want to share the code srowlands? I also need this for an exhibition. I get the idea but having difficulty writing a code since I'm not a programmer.
  • doustindoustin Posts: 3
    NerveGear
    vrdaveb said:
    You can do this by enabling the Run In Background player swtting and checking the OVRManager.isUserPresent property in an Update function. If the value becomes false, you will need to set VR.VRsettings.enabled=false to resume rendering to the main monitor. Another option is to add a Camera just for the main monitor whose tarfet eye is None (Main Monitor). But that will cost performance when VR is active. The reason we stop rendering to the headset when you take it off is to prevent burn-in. Unfortunately there is no way to globally disable that behavior yet, but it would probably only be feasible as a user setting.
    It doesnt work, the only thing that worked was using the Gear VR service and set it in developer mode but since last update it doesnt work anymore. This is essential for applications online as when go sleep it breaks the connection
Sign In or Register to comment.