# Trouble running PTB on my macbook pro 2019 16 inch

**URL:** <https://psychtoolbox.discourse.group/t/trouble-running-ptb-on-my-macbook-pro-2019-16-inch/3939>\
**Category:** Bugs & Features\
**Tags:** macos, gpu\
**Created:** [July 29, 2021, 9:32am UTC](https://psychtoolbox.discourse.group/t/trouble-running-ptb-on-my-macbook-pro-2019-16-inch/3939 "2021-07-29T09:32:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![makis6](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@makis6](https://psychtoolbox.discourse.group/u/makis6)\
**Post date:** [July 29, 2021, 9:32am UTC](https://psychtoolbox.discourse.group/t/trouble-running-ptb-on-my-macbook-pro-2019-16-inch/3939/1 "2021-07-29T09:32:28Z")

</div>

Hi there

I am using a MacBook pro with the following specs:  
 ![Screenshot 2021-07-29 at 11.26.23](https://global.discourse-cdn.com/free1/uploads/psychtoolbox/original/1X/8214adace7ef25d862fbace93508173b487961c0.png)

I have installed Matlab 2021a and PST version:

```
'3.0.17 - Flavor: beta - Corresponds to SVN Revision 12153
 For more info visit:
 https://github.com/Psychtoolbox-3/Psychtoolbox-3'

```

I am trying to runt his example [here](http://peterscarfe.com/totallyminimaldemo.html) and after executing the command `window, windowRect] = PsychImaging('OpenWindow', screenNumber, grey);`, i get the following traceback:

> PTB-INFO: This is Psychtoolbox-3 for Apple OS X, under Matlab 64-Bit (Version 3.0.17 - Build date: Apr 18 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: 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.6.20  
> PTB-INFO: Renderer has 4080 MB of VRAM and a maximum 3829 MB of texture memory.  
> PTB-INFO: VBL startline = 1080 , 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.665355 ms [60.004722 Hz]. (299 valid samples taken, stddev=0.770480 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.
> 
> 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 PsychImaging (line 2330)  
> [win, winRect] = Screen(‘OpenWindow’, screenid, clearcolor, winRect, pixelSize, numbuffers, stereomode, multiSample, imagingMode, specialFlags,  
> clientRect, fbOverrideRect, vrrParams);

I have also unziped the `PsychtoolboxKernelDriverUpTodDate_Unsigned.kext.zip` driver i.e. `sudo unzip /PathToPsychtoolbox/Psychtoolbox/PsychHardware/PsychtoolboxKernelDriverUpTodDate_Unsigned.kext.zip`

How can I solve this?

---

<div class="post-metadata">

**Author:** ![dcnieho](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@dcnieho](https://psychtoolbox.discourse.group/u/dcnieho)\
**Post date:** [July 29, 2021, 9:52am UTC](https://psychtoolbox.discourse.group/t/trouble-running-ptb-on-my-macbook-pro-2019-16-inch/3939/2 "2021-07-29T09:52:58Z")

</div>

Did you read and do everything suggested in help SyncTrouble?

Also, search the forum

---

<div class="post-metadata">

**Author:** ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)\
**Post date:** [July 29, 2021, 1:56pm UTC](https://psychtoolbox.discourse.group/t/trouble-running-ptb-on-my-macbook-pro-2019-16-inch/3939/3 "2021-07-29T13:56:51Z")

</div>

You got a bit more lucky than the last person trying to get the 16" MBP 2019 working. On Catalina it failed completely. See here:

> <https://github.com/Psychtoolbox-3/Psychtoolbox-3/issues/644>
>
> Hello,
> 
> I meet exactly the same message as the one you described in your code …: 
> 
> PTB-ERROR \[Low-Level setup of window failed\]:The specified gpu + display + gfx-driver combo may not support some requested feature.
> 
> when I try to initialize the screen on a macOS Catalina.
> 
> Here is the code to initialize : 
> 
> \`function \[w, r\] = initializeScreen
> 
> screenNumber = 0; % 0 = main display
> 
> %PsychDebugWindowConfiguration(0, 0.5)
> \[w,r\] = Screen('OpenWindow',screenNumber, 127); % open the window
> 
> % Set fonts
> %Screen('TextFont',Window,'Times');
> Screen('TextSize',w,48);
> Screen('FillRect', w, 0); % 0 = black background
> 
> HideCursor; % Remember to type ShowCursor later
> \`
> 
> 
> and here are the error messages : 
> 
> \`PTB-INFO: Retina display. Enabling panel fitter for scaled Retina compatibility mode.
> 
> 
> PTB-INFO: This is Psychtoolbox-3 for Apple OS X, under Matlab 64-Bit (Version 3.0.16 - Build date: Dec 16 2019).
> PTB-INFO: OS support status: OSX version 10.15 is not officially supported or tested at all for this 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-ERROR\[CGLSetFullScreenOnDisplay failed: invalid drawable\]. Main Screen() context
> 
> 
> PTB-ERROR\[Low-Level setup of window failed\]:The specified gpu + display + gfx-driver combo may not support some requested feature.
> 
> Error using Screen
> See error message printed above.
> 
> Error in initializeScreen (line 6)
> \[w,r\] = Screen('OpenWindow',screenNumber, 127); % open the window
> 
> Error in FoodHealth (line 24)\`
> 
> What do you suggest ?
> 
> Thanks a lot

Apparently they fixed Big Sur at least to the point where you can make it to an onscreen window and then sync failure – so the machine is not utterly useless for all tasks and could run at least trivial tasks.

This machine uses the new AMD Navi graphics chips with DCN display engines. These are not supported at all by our PsychtoolboxKernelDriver, and most likely never will be, which means that all high precision visual timing and most of PTB’s diagnostics and workarounds for operating system bugs are dead. This makes the machine very untrustworthy for precise timing. You are essentially on your own here.

So you don’t need to bother with the PsychtoolboxKernelDriver, it won’t help.  
Seems we can rule out Retina display trouble as well, given you seem to run on an external display with 1920x1080@60Hz here.

What you observe could be really bad operating system timing, or more likely desktop compositor interference, no way to distinguish without use of external timing measurement equipment like photodiodes, VPixx devices or similar

As the text says already, if this happens on repeated runs, you can add `Screen(‘Preference’, ‘SkipSyncTests’, 2);` to disable sync tests and use the machine for tasks which do not require any trustworthy or accurate timing at all.

Or if this is a machine mostly used for serious data collection you could sell the machine and replace it by a much more suitable Linux laptop for less than half of the purchase price.

You could also consider trying all the things mentioned in this discussion thread, to contribute some data-point that may help fixing your machine sometime in the future. You can skip everything related to the PsychtoolboxKernelDriver ofc.:

> [@macOS PTB users: Petition Apple at WWDC?](https://psychtoolbox.discourse.group/t/macos-ptb-users-petition-apple-at-wwdc/3882/10):
>
> What anybody with access to macOS 11 or macOS 12 could do is to do a quick test / a rough assessment, if the problems persist on those OS’es with different hardware. Get and install the latest MoltenVK/Vulkan runtime: [https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.dmg](https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.dmg) This one now contains the bug fixes and improvements i contributed to this macOS Vulkan driver. On an IntelMac install the PsychtoolboxKernelDriver, and make sure it is actually working and used by PTB – The beamposi…

Good luck,  
-mario
