VBL (vertical retrace) syncing problem

With that kind of laptop you may well be in trouble, IIRC those kind of optimus designs don’t allow for display timing good enough for PTB. The error message gives you the two options that you have, did you try?

This will seriously impair proper stimulus presentation and stimulus presentation timing!
Please read ‘help SyncTrouble’ for information about how to solve or work-around the problem.
You can force Psychtoolbox to continue, despite the severe problems, by adding the command
Screen(‘Preference’, ‘SkipSyncTests’, 1); at the top of your script, if you really know what you are doing.

Cheers,
Dee

Hi Dee,
Thanks for the prompt reply!

Do you think it has something to do with 4k screens? We encountered the same issue on another laptop with the following specification:
Alienware m15 R3
Matlab version R2020b
Memory 15.7GB(usable)
Processor: Intel® Core™i7-10750H CPU @2.60GHz 2.59GHz
Graphics: Intel UHD Graphics and Nvidia RTX 2070 (This has a discrete graphics card - moreover, its port is directly accessible from outside. It doesn’t seem to be an “Optimus” design).
Display Resolution: 3840x2160 (16:9, 4K)
OS type 64-bit
1TB SSD

PsychtoolboxVersion

ans =

‘3.0.17 - Flavor: beta - Corresponds to SVN Revision 11735
For more info visit:
GitHub - Psychtoolbox-3/Psychtoolbox-3: Psychophysics Toolbox Version 3 (PTB-3) is a free set of Matlab and GNU Octave functions for vision and neuroscience research.

Error message:

SimpleMovieDemo

PTB-INFO: This is Psychtoolbox-3 for Microsoft Windows, under Matlab 64-Bit (Version 3.0.17 - Build date: Dec 16 2020).
PTB-INFO: OS support status: Windows 10 (Version 10.0) supported and tested to some limited degree.
PTB-INFO: Type ‘PsychtoolboxVersion’ for more detailed version information.
PTB-INFO: Most parts of the Psychtoolbox distribution are licensed to you under terms of the MIT License, with
PTB-INFO: some restrictions. See file ‘License.txt’ in the Psychtoolbox root folder for the exact licensing conditions.

PTB-INFO: For information about paid priority support, community membership and commercial services, please type
PTB-INFO: ‘PsychPaidSupportAndServices’.

PTB-INFO: The detected endline of the vertical blank interval is equal or lower than the startline. This indicates
PTB-INFO: that i couldn’t detect the duration of the vertical blank interval and won’t be able to correct timestamps
PTB-INFO: for it. This will introduce a very small and constant offset (typically << 1 msec). Read ‘help BeampositionQueries’
PTB-INFO: for how to correct this, should you really require that last few microseconds of precision.
PTB-INFO: Btw. this can also mean that your systems beamposition queries are slightly broken. It may help timing precision to
PTB-INFO: enable the beamposition workaround, as explained in ‘help ConserveVRAMSettings’, section ‘kPsychUseBeampositionQueryWorkaround’.
PTB-WARNING: Couldn’t even collect one single valid flip interval sample! Sanity range checks failed!
PTB-WARNING: Could be a system bug, or a temporary timing problem. Retrying the procedure might help if
PTB-WARNING: the latter is the culprit.

WARNING: VBL Calibration run No. 1 failed. Retrying…
PTB-WARNING: Couldn’t even collect one single valid flip interval sample! Sanity range checks failed!
PTB-WARNING: Could be a system bug, or a temporary timing problem. Retrying the procedure might help if
PTB-WARNING: the latter is the culprit.

WARNING: VBL Calibration run No. 2 failed. Retrying…
WARNING: Will enable VBL busywait-workaround before trying final VBL Calibration run No. 3.
WARNING: This will hopefully work-around graphics driver bugs of the GPU sync-to-retrace mechanism. Cross your fingers!
PTB-WARNING: Couldn’t even collect one single valid flip interval sample! Sanity range checks failed!
PTB-WARNING: Could be a system bug, or a temporary timing problem. Retrying the procedure might help if
PTB-WARNING: the latter is the culprit.

PTB-INFO: OpenGL-Renderer is NVIDIA Corporation :: GeForce RTX 2070/PCIe/SSE2 :: 4.6.0 NVIDIA 461.09
PTB-INFO: VBL startline = 1080 , VBL Endline = 1080
PTB-INFO: Measured monitor refresh interval from beamposition = 16.666635 ms [60.000115 Hz].
PTB-INFO: Beamposition queries are supported, but disabled. Using basic timestamping as fallback:
PTB-INFO: Timestamps returned by Screen(‘Flip’) will be therefore less robust and accurate.
PTB-INFO: Measured monitor refresh interval from VBLsync = 0.000000 ms [inf Hz]. (0 valid samples taken, stddev=10000000.000000 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 16.666667 ms [60.000000 Hz].
PTB-INFO: Small deviations between reported values are normal and no reason to worry.
PTB-INFO: ==============================================================================================================================
PTB-INFO: WINDOWS DWM DESKTOP COMPOSITOR IS ACTIVE. On this Windows-10 or later system, Psychtoolbox can no longer reliably detect if
PTB-INFO: this will cause trouble for timing and integrity of visual stimuli or not. You might be just fine, or you could be in trouble.
PTB-INFO: Use external measurement equipment and independent procedures to verify reliability of timing if you care about proper timing.
PTB-INFO: ==============================================================================================================================

WARNING: Couldn’t compute a reliable estimate of monitor refresh interval! Trouble with VBL syncing?!?

WARNING: Mismatch between measured monitor refresh interval and interval reported by operating system.
This indicates massive problems with VBL sync.

----- ! PTB - ERROR: SYNCHRONIZATION FAILURE ! -----

One or more internal checks (see Warnings above) indicate that synchronization
of Psychtoolbox to the vertical retrace (VBL) is not working on your setup.

This will seriously impair proper stimulus presentation and stimulus presentation timing!
Please read ‘help SyncTrouble’ for information about how to solve or work-around the problem.
You can force Psychtoolbox to continue, despite the severe problems, by adding the command
Screen(‘Preference’, ‘SkipSyncTests’, 1); at the top of your script, if you really know what you are doing.

Both machines are Optimus laptops with Intel + Nvidia gfx, so they are mostly toast on MS-Windows when it comes to display timing. Absolutely not recommended for timed visual stimulation, as our website states. Upgrading to Linux is the best course of action if you do need precise timing, although your options will be limited there as well, given these models of NVidia gpu’s. “help HybridGraphics”. Maybe you get lucky with an external monitor directly connected to the NVidia, maybe not. Nothing new here. Oh and a 4k high-dpi monitor would likely pose additional problems on Windows on top if it (“help RetinaDisplay”).

If you need further explanations from me, feel free to get your lab to buy priority support, although i think our current docs are quite informative on this already.
-mario