Frame Dropping causing timing issues on a 2019 MacBook Pro using Catalina

OS (e.g. Win10): MacOS 10.15.7 (Catalina) with 16GB memory an AMD Radeon Pro 5300 4 GB and an Intel UHD Graphics 630 1536MB graphics cards.

PsychoPy version (e.g. 1.84.x): 2021.1.4 and 2020.2.5
Standard Standalone? (y/n) If not then what?: Unsure
What are you trying to achieve?:
I am new to using PsychoPy, so please bear with me!

I have 2, identical 2019 Macbook Pros with the same issue. When I try to run my lab’s fMRI paradigm on these computers, we get a significant lag before the initial instructions are supposed to show up, which is supposed to be immediately. Otherwise, the program runs fine. When we hook it up to our scanner (3T Siemens) the lag gets longer (a few seconds goes up to minutes) and we get lag in other parts of the program, such that it occasionally can’t grab the scanner trigger, and is generally unusable.

The program has no issue at all when run on our lab 2021 and 2019 IMacs which are also running the same version of Catalina, have 8GB of memory, have the same AMD graphics card (but not an Intel one), and are running the 2021.1.4 version of PsychoPy. Similarly, one of the other lab members has a personal 2019 MacBook Air running 10.15.6 (still Catalina), but an Intel UHD Graphics 617 1536MB and version 3.2.4 of PsychoPy. She also has zero issues, regardless of the presence of the scanner connector hardware.

I made a test that is identical to our opening instruction sequence in Builder mode (The initial fMRI code was made partially in Builder and partially through coding) and I get the same issue, except the initial frame dropping error time gets halved. I also tried the stroop demo PsychoPy offers – same issue. However, the lag is the same length as my test. The fMRI program is consistently worse.

Here is a picture of the builder for the test, set to my initial instruction tab.

What did you try to make it work?:
I tried running both the full fMRI code and the test code in both 2020.2.5 (the original version on the laptop) and then updated to 2021.1.4 and tried again. I get the same errors about lag both times. However, when I run the fMRI code in 2021.1.4 I also get a new error at the bottom which I put in bolded text. (The PsychoPy2 application name is just telling you I used version 2021.1.4 to run this btw, Finder made me name it something else when I downloaded it bc I still have 2020.2.5 on the computer as well.)

I had read some other posts on here (and other websites about frame dropping in general) and tried some of these past suggestions, none of which helped:
Forcing the MacBook Pro to use only the AMD Radeon Pro 5300 4GB graphics card as opposed to switching between that and its integrated Intel UHD card as it pleases.
Turning off the true tone and brightness auto-adjusters.
Stopping all auto software updates & trying to turn off as much background applications as possible.
Turning off the “put hard disks to sleep when possible” feature.

Weirdly, I tried running more things in the background to see if I could make the error worse and narrow things down (a video on Chrome and opened up an Adobe program) and my initial error about lag time went from around 2000ms to 30ms. I do not know why that happened.

That 2000ms lag is also somewhat variable in both its own length and when it turns up. I get a range about about 12-20 for the number before the WARNING text.

I think this could be a hardware issue but any advice is much appreciated!

What specifically went wrong when you tried that?: Both of these error logs are from a test in 2021.1.4
==== FMRI code output ====

Running: /Users/ohlabbrown/Documents/COBRE_study/Task_Scripts/final_versions/fMRI-tasks-final/fMRI_visual_checkerboard/fMRI_visual_checkerboard_fj.py

0.2256 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
14.8992 WARNING User requested fullscreen with size [1024 768], but screen is actually [1792, 1120]. Using actual size
17.0765 WARNING Couldn’t measure a consistent frame rate.

  • Is your graphics card set to sync to vertical blank?
  • Are you running other processes on your computer?

18.9081 WARNING Couldn’t measure a consistent frame rate.

  • Is your graphics card set to sync to vertical blank?
  • Are you running other processes on your computer?

20.9667 WARNING t of last frame was 2058.84ms (=1/0)
21.6778 WARNING t of last frame was 20.00ms (=1/49)
37.3779 WARNING t of last frame was 20.01ms (=1/49)
42.3336 WARNING t of last frame was 75.13ms (=1/13)
42.3558 WARNING Multiple dropped frames have occurred - I’ll stop bothering you about them!
2021-06-17 12:51:44.403 python[3372:70900] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)
**/Applications/PsychoPy 2.app/Contents/Resources/lib/python3.6/psychopy/data/utils.py:258: SettingWithCopyWarning: **
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: Indexing and selecting data — pandas 1.3.0 documentation
** trialsArr[col][row] = float(tryVal)**
##### Experiment ended. #####

====== This is the test script with only the instructions, a page that waits for the scanner trigger, and then the initial focus cross portion of our paradigm ======

445.6468 INFO Loaded monitor calibration from [‘2021_03_17 12:09’]
Alert 4052:Experiment was built in a past version of PsychoPy (2020.2.5), saving it in this version may add parameters which cannot be parsed.
For further info see https://psychopy.org/alerts/4052.html
Alert 4052:Experiment was built in a past version of PsychoPy (2020.2.5), saving it in this version may add parameters which cannot be parsed.
For further info see https://psychopy.org/alerts/4052.html
Generating PsychoPy script…

########### Running: /Users/ohlabbrown/Desktop/TestingLag_lastrun.py ###########
449.7906 INFO Loaded monitor calibration from [‘2021_03_17 12:09’]
Alert 4052:Experiment was built in a past version of PsychoPy (2020.2.5), saving it in this version may add parameters which cannot be parsed.
For further info see https://psychopy.org/alerts/4052.html
Alert 4052:Experiment was built in a past version of PsychoPy (2020.2.5), saving it in this version may add parameters which cannot be parsed.
For further info see https://psychopy.org/alerts/4052.html
0.2263 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
7.5222 WARNING User requested fullscreen with size [1024 768], but screen is actually [1792, 1120]. Using actual size
9.6842 WARNING Couldn’t measure a consistent frame rate.

  • Is your graphics card set to sync to vertical blank?
  • Are you running other processes on your computer?

11.5158 WARNING Couldn’t measure a consistent frame rate.

  • Is your graphics card set to sync to vertical blank?
  • Are you running other processes on your computer?

12.7570 WARNING t of last frame was 1241.39ms (=1/0)
12.7792 WARNING t of last frame was 22.23ms (=1/44)
12.8009 WARNING t of last frame was 21.68ms (=1/46)
2021-06-17 12:57:21.992 python[3471:73820] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)

Experiment ended.