macOS PTB users: Petition Apple at WWDC?

Try the same symbolic link hack for the MoltenVK.dylib or libMoltenVK.dylib.

Symlinking libMoltenVK.dylib into the Octave6OSXFiles64 folder has now got Vulkan to load in Octove 6.2, however the timing errors persist:

PsychVulkanCore-INFO: Vulkan instance (version 1.2.182) created.
PsychVulkan-INFO: Onscreen window at rect [0, 0, 2048, 1152] is aligned with fullscreen exclusive output for screenId 0.

PTB-INFO: This is Psychtoolbox-3 for Apple OS X, under GNU/Octave 64-Bit (Version 3.0.17 - Build date: Jul 28 2021).
PTB-INFO: OS support status: OSX version 11.0 is not yet tested or officially supported at all 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 priority support, community membership and commercial services, please type
PTB-INFO: 'PsychPaidSupportAndServices'.

PTB-INFO: External display method is in use for this window. Running short and lenient timing tests only.

PTB-INFO: OpenGL-Renderer is Intel Inc. :: Intel(R) Iris(TM) Pro Graphics 6200 :: 2.1 INTEL-16.5.2
PTB-INFO: Renderer has 1536 MB of VRAM and a maximum 3072 MB of texture memory.
PTB-INFO: VBL startline = 2304 , VBL Endline = 2369
PTB-INFO: Measured monitor refresh interval from beamposition = 16.672296 ms [59.979743 Hz].
PTB-INFO: Will use beamposition query for accurate Flip time stamping.
PTB-INFO: Measured monitor refresh interval from VBLsync = 16.675499 ms [59.968220 Hz]. (179 valid samples taken, stddev=1.557927 ms.)
PTB-INFO: Small deviations between reported values are normal and no reason to worry.
PTB-INFO: Psychtoolbox imaging pipeline starting up for window with requested imagingmode 3146753 ...
PTB-INFO: Will use 8 bits per color component framebuffer for stimulus drawing.
PTB-INFO: Will use 8 bits per color component framebuffer for stimulus post-processing (if any).
PTB-INFO: No image processing needed. Enabling zero-copy redirected output mode.
PTB-INFO: Using external textures as sinks for redirected output mode.
PsychVulkan-INFO: OpenGL implementation does not support OpenGL-Vulkan interop semaphores. Enabling operation without semaphores on gpu 1.
PsychVulkan-INFO: 8 bpc linear precision framebuffer will be used.
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 11638.649506 usecs.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 14130.081065 usecs.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 1807.516164 usecs.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 3447.857773 usecs.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 5248.189002 usecs.
The refresh interval reported by the operating system is 16.66667 ms.
libptbdrawtext_ftgl: External 'DrawText' text rendering plugin initialized.
libptbdrawtext_ftgl: Maximum number of cacheable fonts is 40, minimum number of supported concurrent windows is 10.
libptbdrawtext_ftgl: This plugin uses multiple excellent free software libraries to do its work:
libptbdrawtext_ftgl: OGLFT (http://oglft.sourceforge.net/) the OpenGL-FreeType library.
libptbdrawtext_ftgl: The FreeType-2 (http://freetype.sourceforge.net/) library.
libptbdrawtext_ftgl: The FontConfig (http://www.fontconfig.org) library.
libptbdrawtext_ftgl: Thanks!

Measured refresh interval, as reported by "GetFlipInterval" is 16.66667 ms. (nsamples = 1, stddev = 0.00000 ms)
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 8411.313087 usecs.
.... .... 
ns = 9.0000
2021-08-07 12:08:44.703 octave-gui[51165:736774] CoreAnimation: setting `contents' on CAMetalLayer may result in undefined behavior
PTB missed 29 out of 30 stimulus presentation deadlines.
One missed deadline is ok and an artifact of the measurement.
PTB completed 0 stimulus presentations before the requested target time.
Have a look at the plots for more details...

Ok, thanks. The last results show complete failure of macOS Metal implementation to timestamp any visual stimulus onset, ie. each timestamp query times out after 0.5 seconds and then just returns a random timestamp.

For completeness you could run and post the output at PsychVulkan('Verbosity', 9) to see how it fails specifically. Also once with line 592 commented in and once commented out.

However, i think we have exhausted all hacks and options here. macOS 11 Big Sur is just as broken wrt. Metal timing as macOS 10.15 Catalina, Vulkan or Metal is not an option to get good timing and PTB’s special OpenGL hacks, using our kernel driver, are the only way to get bearable timing. Only Apple can fix this.

I could send you my standalone XCode app to verify the utter brokeness independently of Matlab/Octave/PTB with a modified toy “Metal best practices” example from the iToys company itself, but i don’t expect any new actionable insights from that, and i can’t spend more time on this. Trying to make macOS Metal work wrt. timing has eaten up over 180 work hours by now, of which about 80 hours were sponsored by Mathworks, but the rest is just a big financial loss for us - money that could have been spent on more useful things on the Linux side.

If you feel adventurous, you could repeat the whole procedure with macOS 12 Monterey betas. macOS 11 is a lost cause anyway at this point, with macOS 12 not far away anymore and therefore the iToys company almost certainly not caring about macOS 11 bugs other than critical security bugs.

Or somebody repeats all these steps on a M1 Mac (minus use of the PsychtoolboxkernelDriver which is permanently dead on M1), where this matters way more for the future, as all our old tricks and hacks are completely dead on the M1 systems and future Apple proprietary SoC’s.

-mario

I think it is clear this is utterly broken, and I very much suspect your Metal-only code will be broken on this machine too. It seems no one else is able to test on an M1 (I may buy an M1 Mac Mini for my office but not for many months yet)… I don’t have a spare Mac to sacrifice to the macOS 12 beta…

For completeness, line 592 intact:

>> VBLSyncTest(10, [], [], [], [], [], [], [], true, 0)
ans = 0
PsychVulkanCore-INFO: At startup there are 12 Vulkan instance extensions available.
PsychVulkanCore-INFO: Found and enabled 0. instance extension 'VK_KHR_surface'.
PsychVulkanCore-INFO: Found and enabled 1. instance extension 'VK_KHR_get_surface_capabilities2'.
PsychVulkanCore-INFO: Found and enabled 2. instance extension 'VK_KHR_external_memory_capabilities'.
PsychVulkanCore-INFO: Found and enabled 3. instance extension 'VK_KHR_external_semaphore_capabilities'.
PsychVulkanCore-INFO: Found and enabled 4. instance extension 'VK_KHR_get_physical_device_properties2'.
PsychVulkanCore-INFO: Found and enabled 5. instance extension 'VK_EXT_debug_utils'.
PsychVulkanCore-INFO: Found and enabled 6. instance extension 'VK_EXT_metal_surface'.
PsychVulkanCore-INFO: Found and enabled 7. instance extension 'VK_EXT_swapchain_colorspace'.
PsychVulkanCore-INFO: Vulkan instance (version 1.2.182) created.
PsychVulkanCore-INFO: At startup there are 1 Vulkan devices available.
PsychVulkanCore-INFO: GPU 0: 'Intel(R) Iris(TM) Pro Graphics 6200' : Vulkan 1.1.182 : VendorId 0x8086 : DeviceId 0x1622 : Integrated graphics chip.
PsychVulkanCore-INFO: GPU 0: Driver 'MoltenVK' [1.1.4] : Driver version 0x2778
PsychVulkanCore-INFO: GPU 0: Probing 53 device extensions against required set.
PsychVulkanCore-INFO: Found and enabled 0. device extension 'VK_KHR_swapchain'.
PsychVulkanCore-INFO: Found and enabled 1. device extension 'VK_KHR_external_memory'.
PsychVulkanCore-INFO: Found and enabled 2. device extension 'VK_KHR_external_semaphore'.
PsychVulkanCore-INFO: Found and enabled 3. device extension 'VK_KHR_maintenance1'.
PsychVulkanCore-INFO: Found and enabled 4. device extension 'VK_KHR_portability_subset'.
PsychVulkanCore-INFO: Found and enabled 5. device extension 'VK_EXT_hdr_metadata'.
PsychVulkanCore-INFO: Device extension 'VK_AMD_display_native_hdr' is not supported.
PsychVulkanCore-INFO: Found and enabled 6. device extension 'VK_GOOGLE_display_timing'.
PsychVulkanCore-INFO: GPU 0: ACCEPTED AND ACTIVATED! Count now 1
PsychVulkan-INFO: Onscreen window at rect [0, 0, 2048, 1152] is aligned with fullscreen exclusive output for screenId 0.


PTB-INFO: This is Psychtoolbox-3 for Apple OS X, under GNU/Octave 64-Bit (Version 3.0.17 - Build date: Jul 28 2021).
PTB-INFO: OS support status: OSX version 11.0 is not yet tested or officially supported at all 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 priority support, community membership and commercial services, please type
PTB-INFO: 'PsychPaidSupportAndServices'.

PTB-INFO: External display method is in use for this window. Running short and lenient timing tests only.


PTB-INFO: OpenGL-Renderer is Intel Inc. :: Intel(R) Iris(TM) Pro Graphics 6200 :: 2.1 INTEL-16.5.2
PTB-INFO: Renderer has 1536 MB of VRAM and a maximum 3072 MB of texture memory.
PTB-INFO: VBL startline = 2304 , VBL Endline = 2369
PTB-INFO: Measured monitor refresh interval from beamposition = 16.672284 ms [59.979785 Hz].
PTB-INFO: Will use beamposition query for accurate Flip time stamping.
PTB-INFO: Measured monitor refresh interval from VBLsync = 16.667151 ms [59.998257 Hz]. (177 valid samples taken, stddev=1.695251 ms.)
PTB-INFO: Small deviations between reported values are normal and no reason to worry.
PTB-INFO: Psychtoolbox imaging pipeline starting up for window with requested imagingmode 3146753 ...
PTB-INFO: Will use 8 bits per color component framebuffer for stimulus drawing.
PTB-INFO: Will use 8 bits per color component framebuffer for stimulus post-processing (if any).
PTB-INFO: No image processing needed. Enabling zero-copy redirected output mode.
PTB-INFO: Using external textures as sinks for redirected output mode.
PsychVulkanCore-INFO: gpuIndex 1 [Intel(R) Iris(TM) Pro Graphics 6200] manually selected as gpu for presenting to the target surface.
PsychVulkanCore-INFO: For gpu [Intel(R) Iris(TM) Pro Graphics 6200] created a window Metal display surface [0x7fb5fb9e6650] for display window 1
PsychVulkanCore-INFO: Probing if gpu 'Intel(R) Iris(TM) Pro Graphics 6200' supports presenting to the target surface: Yes
Surface minImageCount 2 - maxImageCount 3
Surface currentExtent 4096 x 2304 pixels with up to 1 view layers
Display native HDR properties as queried from monitor:
Display Supports control of HDR local dimming: No
Display Gamut  R: [0.000000, 0.000000]
Display Gamut  G: [0.000000, 0.000000]
Display Gamut  B: [0.000000, 0.000000]
Display Gamut WP: [0.000000, 0.000000]
Display minLuminance: 0.000000 nits
Display maxLuminance: 0.000000 nits
Content maxFrameAverageLightLevel: 0.000000 nits
Content maxContentLightLevel: 0.000000 nits
Surface number of supported surface colorspace + pixelformat combinations: 50
[0] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR       - [0] Swapchain format VK_FORMAT_B8G8R8A8_UNORM
[1] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR       - [1] Swapchain format VK_FORMAT_B8G8R8A8_SRGB
[2] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR       - [2] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT
[3] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR       - [3] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32
[4] For colorspace VK_COLOR_SPACE_SRGB_NONLINEAR_KHR       - [4] Swapchain format VK_FORMAT_A2R10G10B10_UNORM_PACK32
[5] Swapchain format VK_FORMAT_B8G8R8A8_UNORM
[6] Swapchain format VK_FORMAT_B8G8R8A8_SRGB
[7] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT
[8] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32
[9] Swapchain format VK_FORMAT_A2R10G10B10_UNORM_PACK32
[10] Swapchain format VK_FORMAT_B8G8R8A8_UNORM
[11] Swapchain format VK_FORMAT_B8G8R8A8_SRGB
[12] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT
[13] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32
[14] Swapchain format VK_FORMAT_A2R10G10B10_UNORM_PACK32
[15] For colorspace VK_COLOR_SPACE_BT709_NONLINEAR_EXT      - [15] Swapchain format VK_FORMAT_B8G8R8A8_UNORM
[16] For colorspace VK_COLOR_SPACE_BT709_NONLINEAR_EXT      - [16] Swapchain format VK_FORMAT_B8G8R8A8_SRGB
[17] For colorspace VK_COLOR_SPACE_BT709_NONLINEAR_EXT      - [17] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT
[18] For colorspace VK_COLOR_SPACE_BT709_NONLINEAR_EXT      - [18] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32
[19] For colorspace VK_COLOR_SPACE_BT709_NONLINEAR_EXT      - [19] Swapchain format VK_FORMAT_A2R10G10B10_UNORM_PACK32
[20] Swapchain format VK_FORMAT_B8G8R8A8_UNORM
[21] Swapchain format VK_FORMAT_B8G8R8A8_SRGB
[22] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT
[23] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32
[24] Swapchain format VK_FORMAT_A2R10G10B10_UNORM_PACK32
[25] For colorspace VK_COLOR_SPACE_PASS_THROUGH_EXT         - [25] Swapchain format VK_FORMAT_B8G8R8A8_UNORM
[26] For colorspace VK_COLOR_SPACE_PASS_THROUGH_EXT         - [26] Swapchain format VK_FORMAT_B8G8R8A8_SRGB
[27] For colorspace VK_COLOR_SPACE_PASS_THROUGH_EXT         - [27] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT
[28] For colorspace VK_COLOR_SPACE_PASS_THROUGH_EXT         - [28] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32
[29] For colorspace VK_COLOR_SPACE_PASS_THROUGH_EXT         - [29] Swapchain format VK_FORMAT_A2R10G10B10_UNORM_PACK32
[30] For colorspace VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT - [30] Swapchain format VK_FORMAT_B8G8R8A8_UNORM
[31] For colorspace VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT - [31] Swapchain format VK_FORMAT_B8G8R8A8_SRGB
[32] For colorspace VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT - [32] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT
[33] For colorspace VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT - [33] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32
[34] For colorspace VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT - [34] Swapchain format VK_FORMAT_A2R10G10B10_UNORM_PACK32
[35] Swapchain format VK_FORMAT_B8G8R8A8_UNORM
[36] Swapchain format VK_FORMAT_B8G8R8A8_SRGB
[37] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT
[38] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32
[39] Swapchain format VK_FORMAT_A2R10G10B10_UNORM_PACK32
[40] Swapchain format VK_FORMAT_B8G8R8A8_UNORM
[41] Swapchain format VK_FORMAT_B8G8R8A8_SRGB
[42] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT
[43] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32
[44] Swapchain format VK_FORMAT_A2R10G10B10_UNORM_PACK32
[45] For colorspace VK_COLOR_SPACE_BT2020_LINEAR_EXT        - [45] Swapchain format VK_FORMAT_B8G8R8A8_UNORM
[46] For colorspace VK_COLOR_SPACE_BT2020_LINEAR_EXT        - [46] Swapchain format VK_FORMAT_B8G8R8A8_SRGB
[47] For colorspace VK_COLOR_SPACE_BT2020_LINEAR_EXT        - [47] Swapchain format VK_FORMAT_R16G16B16A16_SFLOAT
[48] For colorspace VK_COLOR_SPACE_BT2020_LINEAR_EXT        - [48] Swapchain format VK_FORMAT_A2B10G10R10_UNORM_PACK32
[49] For colorspace VK_COLOR_SPACE_BT2020_LINEAR_EXT        - [49] Swapchain format VK_FORMAT_A2R10G10B10_UNORM_PACK32
PsychVulkanCore-INFO: Using 10 bpc unorm [0; 1] range RGB10A2 framebuffer.
PsychVulkanCore-INFO: getMemoryTypeFromProperties(): Testing memoryType index 0 (1) against allowed 5 -  Properties 1 vs. required 1 - OK. Using memoryTypeIndex 0.
PsychVulkanCore-INFO: PsychCreateInteropTexture: Got OpenGL interop texture handle 2 [IOSurface 0x7fb5f7a370d0].
PsychVulkanCore-INFO: PsychCreateInteropTexture: Success for window 1.
PsychVulkanCore-INFO: PsychRecordCopyCommandBuffer(): Swapchainbuffer 0: Using vkCmdBlitImage() blit for interop -> swapchain transfer.
PsychVulkanCore-INFO: PsychRecordCopyCommandBuffer(): Swapchainbuffer 1: Using vkCmdBlitImage() blit for interop -> swapchain transfer.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 0 - Next swapChain backBuffer image with index 0 acquired.
PsychVulkanCore-INFO: Vulkan reports nominal refresh rate 60.000002 Hz for display associated with window 1.
PsychVulkan-INFO: OpenGL implementation does not support OpenGL-Vulkan interop semaphores. Enabling operation without semaphores on gpu 1.
PsychVulkan-INFO: 8 bpc linear precision framebuffer will be used.
PsychVulkan-INFO: Using tiled rendering layout framebuffer for interop rendering.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 0 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 0.000000 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 0 - swapChain image with index 0 queued for present at tWhen 0.000000 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 1 - Next swapChain backBuffer image with index 0 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.812944 msecs wait. Fetching last one 271140287.902654 msecs since tWhen.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp for frameIndex 0. Timed out. Carrying on with fallback.
PsychVulkanCore-DEBUG: PsychPresent(1): Present for frameIndex 0 completed: tComplete = 271140.287933 secs.
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 5423.485592 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 1 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 0.000000 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 1 - swapChain image with index 0 queued for present at tWhen 0.000000 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 2 - Next swapChain backBuffer image with index 1 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 1 timestamps after 0.000507 msecs wait. Fetching last one 271140290.095824 msecs since tWhen.
PsychVulkanCore-DEBUG: PsychPresent(1):0: presentID 0 [need 1] returned timestamp 0.000000.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.529365 msecs wait. Fetching last one 271140790.624682 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 7985.789794 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 2 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 0.000000 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 2 - swapChain image with index 1 queued for present at tWhen 0.000000 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 3 - Next swapChain backBuffer image with index 1 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.052110 msecs wait. Fetching last one 271141292.432483 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 9623.233113 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 3 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 0.000000 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 3 - swapChain image with index 1 queued for present at tWhen 0.000000 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 4 - Next swapChain backBuffer image with index 0 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 2 timestamps after 0.000724 msecs wait. Fetching last one 271141293.574323 msecs since tWhen.
PsychVulkanCore-DEBUG: PsychPresent(1):0: presentID 2 [need 3] returned timestamp 0.000000.
PsychVulkanCore-DEBUG: PsychPresent(1):1: presentID 1 [need 3] returned timestamp 0.000000.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.407380 msecs wait. Fetching last one 271141793.980979 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 10998.402548 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 4 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 0.000000 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 4 - swapChain image with index 0 queued for present at tWhen 0.000000 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 5 - Next swapChain backBuffer image with index 0 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.667854 msecs wait. Fetching last one 271142296.292212 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 13150.482322 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 5 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 0.000000 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 5 - swapChain image with index 0 queued for present at tWhen 0.000000 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 6 - Next swapChain backBuffer image with index 1 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 2 timestamps after 0.000866 msecs wait. Fetching last one 271142298.867599 msecs since tWhen.
PsychVulkanCore-DEBUG: PsychPresent(1):0: presentID 4 [need 5] returned timestamp 0.000000.
PsychVulkanCore-DEBUG: PsychPresent(1):1: presentID 3 [need 5] returned timestamp 0.000000.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.863815 msecs wait. Fetching last one 271142799.730548 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is -231.244485 usecs.
The refresh interval reported by the operating system is 16.66667 ms.
libptbdrawtext_ftgl: External 'DrawText' text rendering plugin initialized.
libptbdrawtext_ftgl: Maximum number of cacheable fonts is 40, minimum number of supported concurrent windows is 10.
libptbdrawtext_ftgl: This plugin uses multiple excellent free software libraries to do its work:
libptbdrawtext_ftgl: OGLFT (http://oglft.sourceforge.net/) the OpenGL-FreeType library.
libptbdrawtext_ftgl: The FreeType-2 (http://freetype.sourceforge.net/) library.
libptbdrawtext_ftgl: The FontConfig (http://www.fontconfig.org) library.
libptbdrawtext_ftgl: Thanks!

Measured refresh interval, as reported by "GetFlipInterval" is 16.66667 ms. (nsamples = 1, stddev = 0.00000 ms)
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 6 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 0.000000 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 6 - swapChain image with index 1 queued for present at tWhen 0.000000 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 7 - Next swapChain backBuffer image with index 1 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.869344 msecs wait. Fetching last one 271143400.882761 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 689.742796 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 7 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 271143.409249 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 7 - swapChain image with index 1 queued for present at tWhen 271143.409249 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 8 - Next swapChain backBuffer image with index 0 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 2 timestamps after 0.001720 msecs wait. Fetching last one 0.006121 msecs since tWhen.
PsychVulkanCore-DEBUG: PsychPresent(1):0: presentID 6 [need 7] returned timestamp 0.000000.
PsychVulkanCore-DEBUG: PsychPresent(1):1: presentID 5 [need 7] returned timestamp 0.000000.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.751338 msecs wait. Fetching last one 500.755739 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 9642.047051 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 8 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 271143.918368 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 8 - swapChain image with index 0 queued for present at tWhen 271143.918368 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 9 - Next swapChain backBuffer image with index 0 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.177913 msecs wait. Fetching last one 624.041428 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 8502.203913 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 9 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 271144.550774 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 9 - swapChain image with index 0 queued for present at tWhen 271144.550774 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 10 - Next swapChain backBuffer image with index 1 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 2 timestamps after 0.002242 msecs wait. Fetching last one 0.007726 msecs since tWhen.
PsychVulkanCore-DEBUG: PsychPresent(1):0: presentID 8 [need 9] returned timestamp 271143.918368.
PsychVulkanCore-DEBUG: PsychPresent(1):1: presentID 7 [need 9] returned timestamp 271143.409249.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.127522 msecs wait. Fetching last one 500.133006 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 158.077979 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 10 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 271145.059271 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 10 - swapChain image with index 1 queued for present at tWhen 271145.059271 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 11 - Next swapChain backBuffer image with index 1 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.090003 msecs wait. Fetching last one 500.094854 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 8449.566027 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 11 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 271145.567729 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 11 - swapChain image with index 1 queued for present at tWhen 271145.567729 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 12 - Next swapChain backBuffer image with index 0 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 2 timestamps after 0.002570 msecs wait. Fetching last one 0.008120 msecs since tWhen.
PsychVulkanCore-DEBUG: PsychPresent(1):0: presentID 10 [need 11] returned timestamp 271145.059271.
PsychVulkanCore-DEBUG: PsychPresent(1):1: presentID 9 [need 11] returned timestamp 271144.550774.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.184388 msecs wait. Fetching last one 500.189938 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 169.544539 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 12 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 271146.076292 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 12 - swapChain image with index 0 queued for present at tWhen 271146.076292 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 13 - Next swapChain backBuffer image with index 0 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.119310 msecs wait. Fetching last one 500.123530 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 8491.117333 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 13 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 271146.584780 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 13 - swapChain image with index 0 queued for present at tWhen 271146.584780 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 14 - Next swapChain backBuffer image with index 1 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 2 timestamps after 0.001976 msecs wait. Fetching last one 0.009317 msecs since tWhen.
PsychVulkanCore-DEBUG: PsychPresent(1):0: presentID 12 [need 13] returned timestamp 271146.076292.
PsychVulkanCore-DEBUG: PsychPresent(1):1: presentID 11 [need 13] returned timestamp 271145.567729.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.186084 msecs wait. Fetching last one 500.193425 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 207.797159 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 14 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 271147.093340 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 14 - swapChain image with index 1 queued for present at tWhen 271147.093340 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 15 - Next swapChain backBuffer image with index 1 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.184422 msecs wait. Fetching last one 500.189566 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 8592.286438 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 15 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 271147.601891 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 15 - swapChain image with index 1 queued for present at tWhen 271147.601891 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 16 - Next swapChain backBuffer image with index 0 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 2 timestamps after 0.001694 msecs wait. Fetching last one 0.007413 msecs since tWhen.
PsychVulkanCore-DEBUG: PsychPresent(1):0: presentID 14 [need 15] returned timestamp 271147.093340.
PsychVulkanCore-DEBUG: PsychPresent(1):1: presentID 13 [need 15] returned timestamp 271146.584780.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.738280 msecs wait. Fetching last one 500.743999 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 859.966094 usecs.
PsychVulkanCore-DEBUG: PsychPresent(1): Queuing frame 16 with VkPresentTimesInfoGOOGLE for present at time >= tWhen 271148.111000 secs.
PsychVulkanCore-DEBUG: PsychPresent(1): frameIndex 16 - swapChain image with index 0 queued for present at tWhen 271148.111000 secs.
PsychVulkanCore-DEBUG: PsychGetNextSwapChainTargetBuffer(1): frameIndex 17 - Next swapChain backBuffer image with index 0 acquired.
PsychVulkanCore-DEBUG: PsychPresent(1): fpGetPastPresentationTimingGOOGLE returned 0 timestamps after 500.086388 msecs wait. Fetching last one 500.090890 msecs since tWhen.
PsychVulkanCore-ERROR: PsychPresent(1): fpGetPastPresentationTimingGOOGLE failed to retrieve timestamp! Timed out.
PsychVulkanCore-ERROR: 'Present' operation failed for some reason! Trying to keep going, brace for impact!
PsychVulkan-DEBUG: Delta between Vulkan and reference timestamps is 9144.627431 usecs.
ans = 9.0000
PsychVulkanCore-INFO: Closing Vulkan window 1.
PsychVulkanCore-INFO: Vulkan window 1: swapChain is gone. Releasing display.
PsychVulkanCore-INFO: Vulkan window 1: Display or Window is gone. Releasing surface.
PsychVulkanCore-INFO: Vulkan window 1: Window successfully closed.
2021-08-09 13:47:45.405 octave-gui[45837:2350940] CoreAnimation: setting `contents' on CAMetalLayer may result in undefined behavior
PTB missed 9 out of 10 stimulus presentation deadlines.
One missed deadline is ok and an artifact of the measurement.
PTB completed 0 stimulus presentations before the requested target time.
Have a look at the plots for more details...

And commenting out line 592 (too big for forum, pasted into a gist):

Yes, that’s the same pattern of errors as on 10.15.7, no reason to investigate further on macOS 11. I think we are done here.

-mario