I am using Matlab 2021a with Psychtoolbox Version 3.0.19 and, unfortunately, a MacBook Pro running on Sequoia 15.11 (Graphics: AMD Radeon Pro 5300M 4 GB, Intel UHD Graphics 630 1536 MB). I have the Psychtoolbox kernel driver installed, and trying to run the OSXCompositorIdiocyTest() gives me (among lots of other warnings and errors) this message:
“PTB-WARNING: On this Apple macOS system you probably don’t need to even bother asking anybody for help.”
Now, I see that this is pretty self-explanatory, but I thought I am gonna shoot my shot here: does anyone know if there is a way to get Psychtoolbox running on my Mac in a way that allows me to perform experiment that need high temporal stimulus resolution? Or am I completely screwed and should just go and get Linux?
Hi Leon, you’re not going to get guaranteed perfect timing, but when I am running PTB on my Mac for testing purposes (we use Linux for the actual stimulus presentation), I see “pretty good” timing. I suggest trying it out, and keeping a log of the timing of every video frame presented with something like frame_log(iframe) = Screen(‘Flip’, w). Then you can use diff(frame_log) to look at the timing of the frames. VBLSyncTest will also give you a good idea of how useable your system is.
You may find that you can get by with the way it is, depending on exactly what sort of testing you’re doing. But if you need perfectly accurate frame syncing, like presenting dichoptic stimuli or something, you’ll need to use Linux for now.
On older Intel Macs with Intel graphics chips, NVidia gpu’s or AMD graphics up to the Polaris gpu family, but not Vega or Navi gpu’s, current PTB + PsychtoolboxKernelDriver has generally pretty reliable timing on most models in many (most?) configurations and use cases, although there are some corner cases that still fail.
You are unlucky though, as your machine has a Radeon Pro 5000 series gpu from the Navi gpu family, where things look more dire.
The AMD Radeon Pro 5300M is not supported by the PsychtoolboxKernelDriver as its Navi gpu has a next generation DCN display engine which would be very difficult to support. Your Intel iGPU is supported though. That doesn’t help you here though, as on a dual-gpu MacBookPro like yours, macOS will always use the higher performance AMD, not the Intel, as soon as you launch Matlab iirc. Your specific combo of unsupported + supported gpu will additionally confuse the Psychtoolbox gpu selection logic, as far as I can see from the code: PTB will mistakenly think that this is a single-gpu laptop with Intel graphics only, and then query the unused Intel gpu instead of the used but unsupported AMD gpu.
Net result: The specific message you posted will be a false positive, preceeded by “PTB-WARNING: Visual presentation timing is broken on your system and all followup tests and workarounds will likely fail.” and “Pageflipping wasn’t used …”
If you restart Matlab, then execute setenv('PSYCH_DISALLOW_DANGEROUS', '1'), and rerun your script, that false warning message related to “pageflipping not being used …” should disappear. Effectively this will disable the kernel driver.
However, without kernel driver, presentation timing and timestamping will be much less accurate, and various timing correctness checks will be less effective, so PTB may not easily detect if your visual timing is broken, making this setup very untrustworthy for precisely timed visual stimulation. I wouldn’t trust it if millisecond accurate timestamps or even frame accurate timestamps or timing is required - Errors in the up to 50 msecs range would be possible.
Options:
Uninstall the useless kernel driver, accept the not at all trustworthy and less accurate timing: If you get sync failures then it is hopeless. If you don’t get any failures or warnings then the timing may or may not be correct. Use stuff like photo-diodes to verify and make sure you really know what you’re doing.
Use hacks to try to force macOS to only use the Intel gpu: Then the kernel driver should probably work and diagnostics and timing could be trustworthy and accurate, or at least PTB may warn you properly if it is broken. There used to be the tool gfxCardStatus for this, but I don’t know if it has been fixed to work on recent macOS. There’s also this as a more manual hack which may or may not work - I haven’t tested it, so use at your own risk: Reddit - Dive into anything Problem here is that on the Intel you will only get a fraction of the performance, and afaik it external displays do not work with the Intel gpu, only the internal MBP Retina panel.
Switch to a Linux dual-boot on that machine. Should give perfect timing. Downside: Intel MacBookPro 2018 and later - I think you have a MBP 2019 - is not perfectly supported without some limitations, and setup is not quite plug & play. See https://t2linux.org for Linux on Intel MBP 2018 and later…
Use a different computer, preferrably on Linux.
“need high temporal stimulus resolution” probably only leaves you with Linux, the options where the kernel driver actually works - only Laptop internal Retina display no external display + special hacks to enforce Intel gpu only, or a different more suitable machine.
Note: Keith techniques will only work in a trustworthy way on macOS if the PsychtoolboxKernelDriver works properly with your gpu on older IntelMacs.
Unfortunately this error message (as read in isolation here; I do not see the full output) seems a little silly and not helpful. You have not shared the rest of the output, I do not see it in context obviously, so may be mistaken. However, my guess is as follows…
My assumption would be that this relates failures via “sync tests”. If so…
What is not clear is that it depends totally on the timing fidelity which you require for your experiment. My lab uses Windows computers. I have assessed these meet my requirements for my experiments. I only use macOS for development due to it being the most fragile system. You would need to check if your system meets your needs. If it does, then thats fine. There are scripts you could modify in PTB which would allow you to set a criterion needed in your experiment for the timing tests and see if it is met.
There are two main ways (or probably more) which could trigger the warning r.e. timing. I would guess two of the most common are (1) the timing tests provide contradictory information, (2) the timing tests are very variable falling outside of the criterion for “good” set in PTB.
(1) is obviously problematic. (2) would depend if the variability is within what is acceptable for your experiment. Be aware that a failure via (2) will be relative to a criterion(s) set in PTB, which will by definition be different to what you might need.
Despite the impression you might get on this forum, Psychtoolbox is still one, if not the top, platform for vision science on all platforms. Not just Linux.
The warnings, however they are phrased, are there for caution we should all take as scientists.
“… you probably don’t need to even bother asking anybody for help …” is less than helpful and underplays there excellence of Psychtoolbox. Psychtoolbox shoots itself in the foot if this is the message.