Search Unity

Constant Perform. Spikes "VR.WaitForGPU" & "Unaccounted time between: camera.render and GUI.repaint"

Discussion in 'AR/VR (XR) Discussion' started by Rodiaz89, Dec 12, 2016.

  1. Rodiaz89

    Rodiaz89

    Joined:
    Apr 11, 2014
    Posts:
    136
    I keep getting spikes periodically when using the Steam VR plugin. It's around every 2 seconds or so. It started randomly, pretty much after I updated to Unity 5.5 but I checked in 5.4 and now I'm getting the same issue... I also tried the latest patch of 5.5. I'm even getting this issue with a scene that has nothing except the "[CameraRig]" prefab from SteamVR.

    I checked if it was a HTC Vive issue but I played a game and it didn't have that lag every 2 seconds.

    Here is the profiler of the empty scene.
    Capture.PNG

    I'm getting both spikes from VR.WaitForGPU or Unaccounted time between: camera.render and GUI.repaint
    Something that I saw as well is that in the Memory section of the profiler the MeshMemory gets some spikes at the same time.

    I tried turning off the VSync (didn't do anything)

    I already created a bug report (Case 860579)

    Anyone have any solutions before I get completely dizzy?
     
  2. Rodiaz89

    Rodiaz89

    Joined:
    Apr 11, 2014
    Posts:
    136
    Found the answer, it was all caused by a program I have called f.lux...
    for some reason it just makes this spikes when it's turned on and when turned off it works like a charm.

    Hope this helps someone :)
     
    Auxonaut and Foxician like this.
  3. vdwtanner

    vdwtanner

    Joined:
    Jun 10, 2015
    Posts:
    8
    Definitely helped me! Thanks a bunch! (Sorry to necro this, but this has been bugging me for months)
     
    Rodiaz89 likes this.
  4. Foxician

    Foxician

    Joined:
    Jul 7, 2017
    Posts:
    2
    Months later and the problem persists. Turning off f.lux stopped the performance spikes for me as well.
    You still deserve a big THANK YOU @Rodiaz89 !
     
    Last edited: Jan 8, 2022
    Rodiaz89 likes this.
  5. Auxonaut

    Auxonaut

    Joined:
    Mar 3, 2017
    Posts:
    4
    Perfect fix. Thank you so much for posting it :)
     
    Rodiaz89 likes this.
  6. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
  7. LangTao92

    LangTao92

    Joined:
    May 13, 2017
    Posts:
    15
    what‘s mean called "f.lux"?can you explain this detailedly?
     
  8. LangTao92

    LangTao92

    Joined:
    May 13, 2017
    Posts:
    15
    How to turning off f.lux? what's mean f.lux?
     
  9. Rodiaz89

    Rodiaz89

    Joined:
    Apr 11, 2014
    Posts:
    136
    f.lux is a different program that I had installed in my computer, nothing to do with Unity but it was giving me the performance spikes. So I closed the program and I stopped getting the spikes.