Search Unity

gfx.waitforpresent issue with multiple monitors

Discussion in 'Editor & General Support' started by NovaDynamics, May 24, 2018.

  1. NovaDynamics

    NovaDynamics

    Joined:
    Sep 6, 2017
    Posts:
    25
    Hey guys.
    I have an application that starts running very slowly when I add a second monitor (20fps). I connected the profiler to the build and found that 70% of the time unity is in gfx.waitforpresent, (which I understand to be the CPU waiting on the GPU). This problem gets much worse with a third monitor, bringing the FPS down to 6 FPS.

    Any idea on what could be causing this?

    VSYNC is disabled.

    Profiler.png
     
    Last edited: May 24, 2018
  2. NovaDynamics

    NovaDynamics

    Joined:
    Sep 6, 2017
    Posts:
    25
    Just tested it in a scene that had nothing but a sphere and two cameras. It only ran at 22 FPS (VSYNC disabled). All of the time was taken up by "Other" on the GPU. Why would this be? It runs fairly fast with only one monitor.
     
  3. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,460
  4. NovaDynamics

    NovaDynamics

    Joined:
    Sep 6, 2017
    Posts:
    25
    No, I don't think so. GSYNC is not enabled in the Nvidia control panel. I have tried all of the solutions on the page linked with no result.

    I think my scenario is slightly different than most as Unity runs plenty fast if I only plug one monitor in. Its only when I add a second monitor and activate it using Display.displays[1].Activate() that it slows down.
     
    Last edited: May 29, 2018
  5. NovaDynamics

    NovaDynamics

    Joined:
    Sep 6, 2017
    Posts:
    25
    Fixed! Uninstalled some bloatware and the FPS jumped to 60. I believe it was "Rivatuner statistics server" that did the trick. (It's hard to say as I uninstalled multiple programs before checking)
     
    MartinTilo likes this.