Hello
I'm trying to understand how to determine which monitor is queried for VBL timestamping in a multi-monitor setup.
I'm using MATLAB 2015b on Ubuntu 16 with an NVIDIA Quadro P2000 graphics card and the NVIDIA binary driver. I'm using a Datapixx2 system and the PLDAPS code package to run experiments. In particular, I'm using the "software overlay" mode.
-> I'm not familiar with PLDAPS, in fact didn't know it existed until reading this message. So many high-level toolkits on top of PTB, so little communication and feedback by the authors of such software :(. I'm always baffled why they don't even advertise their creations on the PTB forum or our Wiki. What is "software overlay mode" and how does it relate to such multi-display setups?
There are three monitors connected; one for the command window, the second for the console display, and the third connected to DataPixx and then to the test monitor.
The command window is on Screen 0 and the two other monitors are Screen 1.
-> Is there a reason not to use Datapixx built-in method of mirroring one video output from the graphics card to two connected monitors - one for the subject, the other for the console display? That would solve 2/3rd of all potential visual timing problems if one needs a console display for monitoring.
How can I determine which monitor is queried for time stamps? I'd like it to be the monitor seen by the subject.
-> That's a good question, but not easy to answer reliably if you use NVidia's proprietary graphics driver, instead of a recommended Intel or AMD graphics card with open-source drivers. The open-source drivers on a multi-display setup with multiple outputs per screen choose the monitor output with the larger pixel area as timing master for all scheduling and timestamping. The NVidia driver might do something similar, or something else, depending on whatever NVidia decided for a given driver version.
If your 2nd x-screen (PTB screenid 1) drives two separate video outputs then both video outputs need to be synchronized in their display timing, ie. two *identical* display devices, with identical video mode settings, and the NVidia driver must auto-sync the displays. It used to do that in the past if all conditions were right. The script GraphicsDisplaySyncAcrossDualHeadsTestLinux allows to test for such proper sync.
If both outputs are synchronized that's good. If not, depending if they are in a fixed phase relationship or if they are drifting against each other, that could cause substantial performance degradation/loss and permanent or periodic timing problems.
The whole problem can be avoided by driving both the subject and console monitor from the Datapixx two video outputs, set up via the Datapixx('SetVideoHorizontalSplit', 0); setting. Not sure how that integrates with the PLDAPS thingy. Then PTB screen 1 would just drive one video output from the graphics card, feeding into the video input of the Datapixx.
The command Screen('Flip') appears to be sending back the time stamping for screen 0.
-> Mostly see "help DisplayOutputMappings": For the high precision beamposition based timestamping, PTB has to make an educated guess via a heuristic if the NVidia proprietary graphics driver is used, as that driver doesn't provide us with actual needed information. The more video outputs connected, the more likely for the mapping to go wrong. If you run PerceptualVBLSyncTest and you get homogeneous, tear-free, high frequency black-white flicker and the yellow lines cluster at the very top of the screen, that would probably mean the timestamping corresponds to the correct video output. Otherwise you have to use Screen('Preference','ScreenToHead', 1, 0, x) for a suitable x in range 0, 1, 2, 3 until you get the correct result.
-> With a Datapixx you could also use PsychDatapixx('LogOnsetTimestamps') logging to get hardware timestamps from the Datapixx, assuming your PLDAPS toolbox supports that, or at least doesn't interfere with PTB. Generally Datapixx hw timestamping incurs about 2-3 msecs of overhead per Flip, and can have its own caveats, and a properly working PTB setup will provide Flip timestamps as accurate or even better than what Datapixx hw timestamping can do, but it is another nice way to double-check timing on a VPixx device.
-mario
Thanks,
Lee Lovejoy