VBL-Synchronization error_MacOS_Monterey

authentication token - VZVZT-Y7-2024527132144:027ed7fc331c79118f50803d69b7c41f2e5a4806fdcee5196fce18149b186a6b

Hello all, I am trying to run Psychtoolbox on macOS Monterey, my programming platform is MATLAB_R2021a. While trying to open the PTB window, I am getting the following error:

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


I have tried to run the VBLSyncTest as suggested in one of the forums, I am still getting the error below:


Tried to prepare a new configuration phase via PsychImaging(‘PrepareConfiguration’), but did not finalize the previous phase yet.
You must call the PsychImaging(‘OpenWindow’, …); command at least once to open an onscreen
window according to the provided settings, before you can specify settings for additional onscreen windows.

The most likely reason you see this error message is because your script aborted with some error
before it managed to open the onscreen window. In that case it is best practice to execute a ‘clear all’
command at the Matlab/Octave prompt before you restart your script.

I will restart configuration now and forget the previously made PsychImaging(‘AddTask’, …); settings.
Warning: Tried to prepare a new configuration phase, but you did not finalize the previous phase yet!

In PsychImaging (line 1779)
In VBLSyncTest (line 281)

PTB-INFO: This is Psychtoolbox-3 for Apple macOS, under Matlab 64-Bit (Version 3.0.19 - Build date: Dec 16 2023).
PTB-INFO: OS support status: macOS version 12 is no longer tested or officially supported for this Psychtoolbox release.
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 support, support memberships and other commercial services, please type
PTB-INFO: ‘PsychPaidSupportAndServices’.

PTB-INFO: Installation of the PsychtoolboxKernelDriver is strongly recommended if you care about precise visual
PTB-INFO: onset timestamping or timing. See ‘help PsychtoolboxKernelDriver’ for installation instructions.

PTB-INFO: OpenGL-Renderer is ATI Technologies Inc. :: AMD Radeon Pro 5500M OpenGL Engine :: 2.1 ATI-4.8.54
PTB-INFO: Renderer has 4080 MB of VRAM and a maximum 3829 MB of texture memory.
PTB-INFO: VBL startline = 1920 , VBL Endline = -1
PTB-INFO: Beamposition queries unsupported or defective on this system. 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 = 16.666913 ms [59.999114 Hz]. (300 valid samples taken, stddev=1.906440 ms.)
PTB-INFO: Reported monitor refresh interval from operating system = 16.666756 ms [59.999680 Hz].
PTB-INFO: Small deviations between reported values are normal and no reason to worry.

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 PsychImaging (line 2470)
Error using Screen
See error message printed above.

Error in VBLSyncTest (line 295)
w = PsychImaging(‘OpenWindow’,screenNumber, 0, , , , stereo);

Can you provide a minimal piece of code that exhibits the error. Some of the errors/warnings in what you cut and paste are not related to synchronisation.

Also, please provide a description of your setup.

The best you are likely to get currently with macOS is a single full screen working ok. Note also, that you version is macOS is no-longer supported for the release you are using.

P

Hello, this is the piece of code I am trying to run-

[window, windowRect] = PsychImaging(‘OpenWindow’, screenNumber, grey, , 32, 2);

I am currently using Psychtoolbox-3-3.0.19.7,
These are the details of my set-up:

  • macOS Monterey, version 12.4
  • Processor: 2.3 GHz 8-Core Intel Core i9
  • Memory: 16 GB 2667 MHz DDR4
  • Graphics: AMD Radeon Pro 5500M 4 GB; Intel UHD Graphics 630 1536 MB

This is the only system I have, can you kindly suggest the best course of action for this system?

Kind regards,
Kiran

Ok, token checks out. You are in the unlucky position of having bought one of the final/most recent IntelMac machines that has one of the latest AMD gpu’s with DCN display engine, ie. one were the PsychtoolboxKernelDriver wouldn’t work at all, even if you had followed the printed instructions and installed it. That’s a step we can skip, but it also means various workarounds for timing and diagnostics will not ever work on that machine under macOS to detect and/or fix/workaround certain problems.

I assume this is a 2019 16 inch Retina MacBookPro and you are testing this on the internal Retina panel with its native 3072‑by‑1920 native resolution in standard display orientation (upright / no display rotation), and no display mirroring / clone mode active?

Options to make this work are very limited on this hardware under macOS. It looks like extremely bad timing, pointing to the desktop compositor being active, which would be game over for any trustworthy timing. Without the unsupported PsychtoolboxKernelDriver we can’t find this out for certain, but the huge stddev of almost 2 msecs (far beyond the maximum allowed of 0.2 msecs) is a strong hint towards that. I assume this sync failure happens at every run, not just occassionally?

Run clear all; Screen('Preference','Verbosity', 10); VBLSyncTest; again and post the full debug output.

Also something to try afterwards, again posting all output, would be clear all; Screen('Preference','Verbosity', 10); Screen('Preference','ConserveVRAM', 2); VBLSyncTest;

Please follow these instructions to the point and swiftly. At this point you’ve already used up the 30 minutes of my work time you paid for, we are at 42 minutes now, so all future advice will be just my goodwill, or would have to be additionally paid.

Hi Mario thank you for your time, here is the complete output of the first run, and the second one too. Yes, the sync failure happens every time.
Thanks,
Kiran

There is no output posted at all.

Work time now at 45 Minutes, already 15 minutes unpaid time. Please double-check what you post, these kinds of avoidable problems are wearing my goodwill thin.

Dear Mario, I have no interest in taking this discussion any further. Thank you for your time and take care.

Interesting response to my generous offer to provide you with over 15 minutes of my work time for free, which in the end would have ended up with probably over 60 minutes of work time for the price of 30 minutes, ie. a > 50% discount. All I asked you was to be respectful of the free work time you are gifted with. But sure, to each their own.

Good luck.

In order to make this not a total waste, as I value efficient use of my work time and money: For those Intel Mac users reading this: The machines to especially avoid are those with recent AMD gpu’s of the AMD Vega gpu family (stuff with “Vega” in its name, often 2018 / 2019 models) and AMD Navi gpu family (also known as RDNA graphics, something with names like Radeon Pro 5300M/5500M/5600M, RX5700, RX6600, ie. all 5xxx, 6xxx, … model numbers). This covers most of the more IntelMac high end stuff from the years 2019, 2020 and later. The PsychtoolboxKernelDriver can’t support these, so many of Psychtoolbox workarounds for macOS bugs and diagnostics are not usable, so timing and reliability will always be worse than with older Intel Macs / other gpu’s and little can be done to solve problems.

There are volunteer efforts to get Linux running on the 2018+ machines with T2 controller chip. See https://wiki.t2linux.org/ for the status of that (Device Support and State of Features - t2linux wiki), and installation / setup instructions for different distributions. Even some premade versions of Ubuntu (Home - t2linux wiki) to simplify the install. Still has limitations, e.g., audio, suspend/resume, so this is for the desperate or more experienced who are willing to tinker and make compromises to get their machines running.

1 Like