Sync Trouble on Windows Laptop with Nividia Geforce RTX2060

Dear Sir/Madam,

Hello, I am helping out a friend to setup a laptop using PTB with a Dell laptop with Nividia Geforce RTX2060

Encountered Sync Issue after switching SkipSyncTests from 0 to 1.

I have followed the page (docs/SyncTrouble) for debugging but still could not get it to work.

I have also tried to disable the iGPU (Intel® UHD Graphics) but Matlab does not seem to recognize the Nividia card as the default GPU.

Another thing I have tried is running PerceptualVBLSyncTest(http://psychtoolbox.org/docs/PerceptualVBLSyncTest).
The description in the documentation, " even randomly distributed lines indicate some bug in the driver of your graphics hardware.", matches what is displayed on my screen.

Could you please advise what am I doing wrong here? What other steps should I take?

Best Regards,
Curtis

============ Steps Taken as per Sync Trouble ============

The following lists shows the steps and what I have done:

  1. “Wait for vertical sync”, “Wait for vertical refresh” … [Done]

  2. -> Make sure the “Triple buffering” setting is off … [Done]

  3. If there is an option “Buffer swap mode” or “Bufferswap strategy”… [Unable to find this option]

  4. On dual/multi display setups MS-Windows allows you to assign one monitor the role of the “primary monitor” … [Only using the laptop’s monitor]

  5. If you have the choice to set your multi-monitor configuration to either “dual display mode”/”dual display performance mode”/”separate displays” … [Only using the laptop’s monitor]

============ Detailed Hardware Software Spec and Logs ============

  • Output of >> PsychtoolboxVersion
    ‘3.0.16 - Flavor: beta - Corresponds to SVN Revision 10582
    For more info visit:
    https://github.com/Psychtoolbox-3/Psychtoolbox-3

  • Which platform (Mac OS X, Windows XP/Vista/7, Linux, …) AND which MATLAB/Octave version you are using?
    Windows 10
    ‘9.8.0.1396136 (R2020a) Update 3’

  • A minimal code snippet that exhibits the issue you are having, please format the code with the preformatted text tool provided by the forum software, or use markdown [fenced code blocks ]

Screen('Preference', 'SkipSyncTests', 0);
Screen('OpenWindow', 0,0);
  • Warnings and Errors that were printed to the console ( please read them carefully , they may contain advice on how to solve your problem!)

PTB-INFO: This is Psychtoolbox-3 for Microsoft Windows, under Matlab 64-Bit (Version 3.0.16 - Build date: Apr 25 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: 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-INFO: OpenGL-Renderer is NVIDIA Corporation :: GeForce RTX 2060/PCIe/SSE2 :: 4.6.0 NVIDIA 451.67
PTB-INFO: VBL startline = 1080 , VBL Endline = 1080
PTB-INFO: Measured monitor refresh interval from beamposition = 6.944518 ms [143.998467 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 = 6.972854 ms [143.413300 Hz]. (50 valid samples taken, stddev=0.254389 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 6.944444 ms [144.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?!?

----- ! 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.

Error using Screen
See error message printed above.

Error in test_open (line 2)
Screen(‘OpenWindow’, 0,0);

  • Hardware setup (GPU etc.) and relevant driver versions.
    Processor Intel® Core™ i7-10750H CPU @ 2.60GHz, 2592 Mhz, 6 Core(s), 12 Logical Processor(s)
    Installed Physical Memory (RAM) 16.0 GB
    Name Intel® UHD Graphics
    Name NVIDIA GeForce RTX 2060
    Driver 451.67-notebook-win10-64bit-international-dch-whql

It’s an Optimus laptop, the use of which is strongly discouraged, so the typical conclusions and troubleshooting steps apply. Cfe.:

Also Psychtoolbox-3 - HybridGraphics

Iow.

  1. Maybe it works with external monitors if you are lucky.
  2. Maybe it works with Intel integrated graphics if your lucky.
  3. If not, maybe Intel graphics driver update or downgrade helps if you are lucky.
  4. If you upgrade to Linux you will at least get Intel graphics to work reliably.
    The end.

Hey Mario,
Thanks for the pompt response.

Well it is sad to hear because this laptop was only just purchased to do this…
I will try your recommendations.

Hi Mario,

Tried the fixes on the laptop but ran out of luck…
We will get a new desktop instead. Could you please help by taking a look at the original hardware spec provided to me? Really need to get it working this time.

Original Hardware Spec:

  1. Monitor: CRT Monitor, (cannot use LCD, cannot guarantee precision on stimulus)
    // is this really needed? it is not so easy to get your hands on a CRT these days…

  2. Graphics card: NVIDIA QuADro P2000
    // should I switch to AMD GPUs w.r.t. http://psychtoolbox.org/requirements.html?
    // if so could you give an example of the card model?
    // went to the forum to double check if anyone else is having sync issue with Nividia,
    https://psychtoolbox.discourse.group/t/ubuntu-nvidia-sync-trouble/3284/2?u=curtis
    even RTX-2070 runs into issue? would you recommend I switch to AMD cards despite the provided hardware spec?

  3. Sound card: Creative Sound Blaster Audigy5 (must install ASIO4ALL_2_14_English.exe)
    // built-ins sound chips should work fine w.r.t http://psychtoolbox.org/requirements.html?

  4. CPU I7-7700 Quad Core

  5. RAM: 16GB

  6. HDD: 256GB SSD

  7. OS: Windows 10

Thank you very much for your expert advice in advance!

Best Regards,
Curtis

GPUs

Mario lists the currently best supported AMD cards in this post: Ubuntu + Nvidia sync trouble

I use Radeon Prox WX5100 cards for all my lab machines, they work flawlessly with PTB and fast enough for pretty complex displays (I start to drop frames with just under ~5000 procedurally generated textures in 32bit mode). These are GCN4 or Polaris cards, the same Mario uses. As they are Pro cards they support 10-bit output as standard (though PTB has special support for extending bit depth to other models). The Vega cards are newer and Mario thinks they should be OK too.

Displays

Regarding displays (yes CRTs are impossible to find, and old ones from storage are starting to show significant nonlinearities due to their age), it really depends what types of task and what expectations for your research you have, if you are just showing pictures and absolutely no tight timing requirements (i.e. it doesn’t matter if something is ±50ms), and your experimental aims will not be impacted by poor image reproduction then any modern flat panel is going to be fine (for better or worse, many current studies are published using generic consumer flat panels these days, even ones that I would consider shouldn’t).

If you do care a bit about stimulus fidelity or timing, then you will want to ensure at a minimum the panel is both 10-bit (supporting better luminance steps and colour gamuts) and a gaming display (where extreme and variable latency delays are somewhat controlled). 10-bit IPS gaming displays (example) are really quite new, so no one has really had much chance to really study them (but I suspect they will be a step forward from older technologies). I develop with a 2019 144Hz gaming display that does render motion well with low latency, though bit-depth isn’t great. But lots of these types of displays have dynamic nonlinear “consumer” tweaks that are antithetical to vision research aims. Professional graphics monitors will be more linear and colour accurate for stimulus reproduction, but timing will be more of an issue (perhaps monitors aimed at e.g. video editors etc will handle this better). More exotic technologies are still not really yet in the mix…

So, if you are hoping to specialise in “quality” vision research, then you really should get a professional research display, that is either the Display++ as the most affordable, the more expensive ViewPixx or totally gorgeous but very expensive ProPixx. These displays are very carefully calibrated, and guarantee high bit depths and deterministic timing. They are explicitly supported by PTB, and handle things like precise synchronisation to other equipment. They are still not perfect, but this is as good as you will get at the present moment. The higher costs are more than offset if you imagine a reviewer who very well may question the quality of data from a consumer display if their defects could potentially account for some of your findings…

Computer + OS

If you are planning to do serious research, then you really should consider switching the OS to Linux. I use Dell workstations, and dual-booting them with Windows 10 I really confirm that PTB runs much better under Linux. This is a huge factor in having a stable and productive PTB system, so I really encourage everyone to follow Mario’s advice. Almost all systems can be dual-booted so there really is no excuse to continue using Windows for PTB (unless there is something that is Windows-only that you just have to run simultaneously on the same machine). The peace of mind in knowing all the fidelity checks are optimal is worth the cost of learning and adapting to a new OS.

Hi Ian,

We got your advice. Bought a new desktop with Radeon Prox WX5100.
Installed matlab, ptb on windows. Still got VBL sync error when using Screen()

So our next step is to try installing Linux ( Ubuntu Desktop 20.04)
Installed matlab for Linux
Installed Neuro Debian installation (Recommended!)

Error when: sudo apt-get install matlab-psychtoolbox-3
Got an error: E: Unable to locate package matlab-psychtoolbox-3

So we tried following Subversion-based installation (http://psychtoolbox.org/download)
Installed subversion

Got a savepath error, something to do with admin rights DownloadPsychtoolbox('/home/foo/toolbox')

A bit drained and we decided to stop and ask before we searching how to start matlab with admin rights.

So the question is:
On windows, sync test still fails. My friend is using a old LCD monitor which requires a VGA adaptor and cable. Also she mentioned some screen flickering, which I am guessing is poor connection contact. Would this setup affect the VBL sync test? I mean it would be best to get it working on Windows …

The second question is whether there is an update on http://neuro.debian.net/pkgs/matlab-psychtoolbox-3.html. I saw some comments 4 years ago having the same issue.

As a newbie user for Linux, matlab and PTB, this is a bit overwhelming. Any helps and tips would be very much appreciated.

P.S. The matlab scripted provided to us mentioned changing the monitor frequency to 75Hz
But our monitor does not have such option. Could this be a problem?

On operating systems other than Linux, or if you choose NVidia hardware there isn’t any guarantee wrt. good timing from our side. The drivers are proprietary, nothing i can do about problems, you get what you get.

Congratulations, good choice! Wrt. the failure, did you follow the one-time setup instructions from NeuroDebian properly? Because that package should work just fine, unless you skipped a step / or that step failed for some reason:

http://neuro.debian.net/install_pkg.html?p=matlab-psychtoolbox-3

If you would have skipped step 1 in the above linked instructions, and directly proceeded to step 2, the kind of failure you report would be the expected outcome.

After installation via Neurodebian you can type ptb3-matlab in a terminal to launch Matlab with PTB added to Matlab’s path. And then inside Matlab you could do a savepath if you wanted it permanent. Also run PsychLinuxConfiguration once, so it can tune your system for use with PTB.

Without precise description of the error, nobody can help you.

Probably not the sync tests, but still the actual results. The sync tests measure if the timing of the signal leaving your graphics card is correct, but one can’t detect if the display itself messes things up further. There are ample ways for that, e.g., if the panel is not used at its native video resolution and refresh rate - which is usually 60 Hz. Or if the display is old enough to only accept VGA that also sounds not so good. Old LCD panels likely add more timing delays etc. than recent ones, …

Imho in terms or avoiding to learn something new, aka short-term gains, maybe. In terms of providing higher quality research results and saving time in the long term, most likely not.

That would be bad advise to follow on a non-CRT monitor, as most LCD panels do not natively run at 75 Hz and would introduce timing artifacts (e.g., weird flicker, tremors, judder) by resampling the signal in time.

However, Psychtoolbox on Linux with AMD graphics hardware like yours, and a DisplayPort connected “FreeSync2” certified monitor would allow fine-grained control over stimulus animation framerates and presentation timing in a wide range, cfe. Psychtoolbox-3 - VRRSupport

Hi Mario,

Thank you for your advice.

My friend switched to another LCD monitor and got all the scripts working on Windows.

Thank you very much to you all!