White flashes happen while using asynchronous flip

Hi, I use 2 or even 3 monitors to present 3D stimuli. The angle between two monitors is less then 180 degree so that they can cover a larger field of view. My GPU is RTX 2080 Ti, so is definitely powerful enough. When using the synchronous flip function Screen(‘flip’,…), the time consuming for each monitor’s flip is almost equal to the 1/refresh_rate, let say the refresh rate is 60Hz, so the time needs to flip it 1/60 second. For just one monitor, there’s no problem since it still has 60Hz, but when I increase the monitor number to 2 or 3, let say 3, then the refresh time for each time is triple, the refresh rate drop to less then 20Hz. So I decide to use the “Asynchronous flip” which indeed dramatic increase the refresh rate. But the downside is that there are white flashes for the visual stimuli. Especially when I use mouse to click other Apps from another monitor which is not used for presenting the stimuli, the frequency of white flashes is really high. What’s more, when my experiment camera is running, which control through a software that running in the same computer, the frequency of white flashes maybe higher then 20Hz. Can some one tell me how to avoid these white flashes?

Your framerate drops because you flip one window at a time, not what you want.
See the discussion here to get you started:
https://github.com/Psychtoolbox-3/Psychtoolbox-3/issues/655

I’m not sure what the best way is to flip more than two screens, but hopefully this gets you started.

You should not be clicking other apps (or running non-fullscreen windows) when running PTB, on the same computer. That will destroy your timing.

Also, please say with OS, MATLAB and PTB version you’re using

The “don’t click on other things” rule only applies to the unfortunate souls that have to use MS-Windows for visual stimulation. On Linux that is generally fine. You’d use a separate X-Screen for all 2 or 3 visual stimulation displays, and timing would be reliable and likely properly synchronized if you use 3 identical monitors set to the same video settings and refresh rate. A single onscreen window would cover the full X-Screen and thereby all three display monitors – of course if your other apps would do very graphics intense work on the same graphics card there might still be dropped frames due to those apps overloading the graphics card.

Also you should not use NVidia graphics, but AMD for best performance and precision on Linux, and it wouldn’t hurt on Windows either.

On MS-Windows things are less fun and likely much less reliable. Don’t click on things is only one rule to follow. Windows-10 often has serious timing problems if you have more than one visual stimulation display in use, or a mixed setup with visual stimulation + other monitors. The only way that might work somewhat is to enable NVidia’s “Mosaic” mode to make the stimulation monitors appear to the operating system as one large virtual monitor. AMD graphics on Windows has something known to work (at least on Windows-7 as last tested 8 years ago) as “Single large surface mode” or Eyefinity. I do not have any experience or advise to give on how to set this up on Windows. I also don’t know if GeForce consumer graphics cards support Mosaic, or only more expensive Quadro cards.

The general advise for such setups is to switch to Linux + AMD (, or Linux + Intel if you only need at most 3 monitors in total and not such high performance), to enjoy best timing reliability and precision with least headaches…

Problem solved!
Thanks anyway. The white flashes emerge because I issue the “asyn flip” right after the rendering or drawing, perhaps it’s because the rendering isn’t finished yet. When I add a certain delay, in my script I put the “asyn flip” after other script executions, there’s no flashes any more.

Win 10, PTB 3.0, Matlab 2020a

Yes you’re right about the timing. It’s not so precise, especially when there’s more than one monitor to show the visual stimuli.

My graphic does support mosaic mode. In my experiment, one monitor is on the front and the other two are place on two sides, if I make 3 monitors as one, then I have to perform the geometric transformation of 3D stimuli, which I don’t know how to yet.