Wrong resolution on screen for macOS

I’m not sure if this is a bug. I am developing a stimulus program on a Mac Ventura 13.5 which we will eventually port to a Linux machine. When we try to initialize the screen at 1920 x 1080, it initializes the screen at 960 x 540. I have queried the monitor using Screen(‘Resolutions’) and know the resolution is supported.

The suspicious message is below. We were wondering if there is a simple workaround.

PTB-INFO: Psychtoolbox imaging pipeline starting up for window with requested imagingmode 33793 …
PTB-INFO: Will use 8 bits per color component framebuffer for stimulus drawing.
PTB-INFO: Enabling panel fitter. Providing virtual framebuffer of 960 x 540 pixels size.
PTB-INFO: Will use 8 bits per color component framebuffer for stimulus post-processing (if any).

Sounds like probably an interaction between Retina (HiDPI) display handling and the workarounds implemented to deal with various Apple macOS timing bugs on Intel Macs, and maybe you trying to set a custom resolution?

Setting a custom resolution nowadays is almost always the wrong thing to do on any OS. It usually triggers image processing inside the digital display panel (panel fitter / scaler), unless running on good ol’ analog VGA CRT monitors, with bad consequences for timing.

On macOS it is even worse, because our workarounds for the various macOS visual timing bugs will ignore your choice and always enforce a resolution that maximizes the chance of proper timing.

The proper way would be use of our builtin panelfitter to let PTB rescale and deal with this stuff in a more deterministic fashion → help PanelFitterDemo

For up to 30 minutes of my time for further questions or diagnosis, please post your paid support authentication token from help PsychPaidSupportAndServices. And the full output of PTB and description of your hardware and software setup.