Some tips on PTB on new Macbook Pro 16 / Catalina 10.15.2 (19C57) / R2019b

Posting in case this if of help to anyone. Just took delivery of a new Macbook Pro 16, which comes preinstalled with Catalina 10.15. I don’t know if it can be downgraded, but I suspect not because Apple usually don’t support newer hardware on older OS versions.

I’m also using R2019b, which is new to me as well (due to potential problems with earlier versions on Catalina). I realise PTB is not supported on this OS, but I use it for non-experimental (visualisation of data) work, so timing etc isn’t important.

At first
VBL timing (of course) doesn’t work, so I needed to disable sync tests. Upon opening a screen on either of my two external monitors, I could see graphical artefacts - red/black blocky squares at the edges of the white screen. SimpleMovieDemo played, but also had blocky artefacts.

Strangeley, when opening a fullscreen window on external monitor 1, external monitor 0 went to sleep, and sometimes wouldn’t wake up.

Kernel support driver
Despite this having a newer AMD GPU, the standard (signed) kext file loaded (albeit after a reboot a diversion via macOS system prefs / security to allow it to load). Once this was loaded, external monitor 0 no longer went to sleep when opening a window, but the graphical artefacts remained.

ConserveVRAM=8192
Screen(‘Preference’, ‘ConserveVRAM’, 8192) got rid of the block artefacts.

Now
Everything is basically working. I haven’t even looked at timing or anything, but as far as I can tell I can open windows, draw, play movies, etc. without any trouble.

@mariokleiner, if at any point you’d like me to test anything that might help you for future versions, do get in touch.

Luke

1 Like

Hi Luke,

let me just state publicly that this machine will not work in any meaningful way for visual stimulation if precise control over timing, or actual color/luminance output matters in any way.

The graphical artifacts are due to new graphics driver bugs in 10.15 Catalina, only fixable by Apple. But it is good to have confirmation from you that it isn’t only the older AMD gpu in my MacBookPro 2017, but also the latest generation of AMD gpu’s.

The way you got rid of the artifacts with ConserveVRAM setting 8192 disables all functionality needed for precise timing. So timing will be broken.

The kernel support driver may load, but it doesn’t support gpu’s of AMD’s Vega family, or of the brand-new Navi family at all. Vega enablement could probably be done with reasonable effort if somebody pays the bill. Navi has a totally new display engine and enabling the kernel driver for it would be a major amount of work, so not going to happen anytime soon.

So you can uninstall the kernel driver, it serves no function on that machine. And consider the machine unusable for anything that requires timing precision or any of the workarounds implemented in the kernel driver.

=> Do not get such a machine for visual stimulation.
=> Do not install Catalina if avoidable in any way.
=> Catalina may work with machines that have Intel integrated graphics only, but for trustworthy timing you’d need the kernel driver and the special PSYCH_ALLOW_DANGEROUS setting to enable use of the driver. The setting has the theoretical possibility of damaging your hardware, although this didn’t happen yet in practice to my knowledge.

Normally i’d just advise upgrading to Linux if one bought an Apple machine with Catalina or such, but i don’t know how well it would work on the MBP 2019. I have it working ok’ish for my needs on a MBP 2017 now, but it required 1-2 days of setup work to get it working in a usable way for me, because Apples hardware and firmware tries to resist along every turn. Certainly not beginner-level friendly yet on those machines.

-mario

Out of interest, do you have your MBP on Linux working on an external display (for stimulation) and the laptop screen (for the Matlab window)? When I tried this a couple of years ago I couldn’t get both working, although that may just have been my Linux ineptitude.

Yes. I tested the MBP 2017 successfully with Ubuntu 19.10 on Intel graphics with the internal Retina display (the Intel is not connected to external outputs, so only usable for the internal display), and with the AMD gpu (which is used by default as only gpu on a Linux standard install), with up to 3 displays (1 internal Retina + 2 connected via USB-C and HDMI and VGA adapters) with all combinations possible. Our XOrgConfCreator script should make it rather straightforward to get multi-display stuff working at max performance and timing precision under Linux.

That said, modern Apple machines are especially hostile to non-macOS operating systems, so setup on anything upwards of MBP 2015 can be challenging to beginners. The Linux community with Ubuntu 19.10 / Linux 5.3 just managed to get the internal keyboard and trackpad working. Wifi required trickery. Sound output requires compiling a prototype driver yourself - or plugging an external USB soundcard. The touchbar needs a working driver that needs to be manually installed. Sleep-Wakeup doesn’t work with the AMD gpu, only with Intel. It took years of reverse engineering to get the 2017 models finally working in late 2019, because Apple just frickin can’t play nice with others.

So for me the machine is useful under Linux wrt. Psychtoolbox, and apart from the soundcard issue, outperforms macOS already. E.g., i can squeeze out 12 bits per color channel precision out of the MBP Retina panel whereas macOS is barely able to get some fake 11 bits out of it while ruining timing. But for use as a normal laptop it is cumbersome without the ability to reliably put it to sleep and wake it up again. I would absolutely not recommend a “modern” Apple laptop to anybody who wants to do stimulation and data collection. But at least under 10.14.6 Mojave some basic stuff works ok’ish again since i found workarounds for Apples trainwreck OS.

Thanks, that’s really helpful.

I’ve been managing to run experiments on macOS 10.12 and 10.13 (with a photodiode for timing) but I think I’m coming to the end of the line with Apple. It doesn’t sound like running Linux on them is a good idea for a Linux noob like myself, so I think we’ll just start buying desktop PCs and run ubuntu on them.