CoreVideo + Rosetta still clamps at 60Hz (since macOS 12)

We set the CVDisplayLink on macOS to 0 or 120, and get the following. This then clamps maximum refresh to 60Hz on the 120Hz ProMotion display on a MBP M2 Max laptop. How is this not fixed in 4 macOS releases?

CoreVideo: currentVBLDelta returned 200000 for display 1 -- ignoring unreasonable value

CoreVideo: [0x7fe2fb816020] Bad CurrentVBLDelta for display 1 is zero. defaulting to 60Hz.

Answered by DTS Engineer in 869592022

Thanks for the insightful and interesting comments. In addition to your comments and to avoid any confusion about APIs for display synchronization, I'll leave this here ~

CADisplayLink is the recommended and supported way forward for general purpose synchronization of animated content with the display refresh cycle. CADisplayLink is supported on all Apple platforms including iOS, iPadOS, macOS, tvOS, and visionOS. Any new development should prefer using CADisplayLink over other mechanisms for display refresh synchronization.

CAMetalDisplayLink is a closely related specialized version of CADisplayLink for use with high performance Metal apps. CAMetalDisplayLink is also supported on all Apple platforms and it may be more appropriate to use than CADisplayLink in some cases (though it is not necessary to use CAMetalDisplayLink instead of CADisplayLink in Metal based apps).

There will be no Rosetta for normal apps in the next major release, so I guess it will be technically fixed then 🤷‍♂️

Hello,

Much of CVDisplayLink is deprecated and as mentioned (thanks @galad87) Rosetta is "... available for the next two major macOS releases – through macOS 27".

The original intent of Rosetta was: "Rosetta is meant to ease the transition to Apple silicon, giving you time to create a universal binary for your app. It is not a substitute for creating a native version of your app."

All that said, time is of the essence to move on from CVDisplayLink (AVFoundation being the most straightforward alternative to CoreVideo). Likewise, dependencies on Rosetta need to be addressed within the documented timeframe.

CVDisplayLink, which is already part of CoreVideo, is used by every macOS app. CADisplayLink is iOS. CAMetalDisplayLink is the compositor for Metal apps to avoid needing MTKView, but has a high iOS/macOS requirement. So I would assume CVDisplayLink isn't going away anytime soon unless Apple plans to break every app out there.

0 is a valid setting for the fps, and doesn't mean Apple computes 1/0 and gets some randomly large integer number, and then clamp the 120Hz display to 60Hz. 0 is meant to indicate "run at highest framerate of the monitor".

This only happens for apps compiled for x64 and run under Rosetta, and not if recompiled for arm64. macOS x64 runs the x64 app at 120Hz too. This has to also clamp any games using GPTK too.

Also macOS27 drops Intel and not Rosetta. Rosetta may be dropped in macOS28. So still have 2 years to run x64 code. And even after that Valve will have FEX and games still being emulated.

Thanks for the insightful and interesting comments. In addition to your comments and to avoid any confusion about APIs for display synchronization, I'll leave this here ~

CADisplayLink is the recommended and supported way forward for general purpose synchronization of animated content with the display refresh cycle. CADisplayLink is supported on all Apple platforms including iOS, iPadOS, macOS, tvOS, and visionOS. Any new development should prefer using CADisplayLink over other mechanisms for display refresh synchronization.

CAMetalDisplayLink is a closely related specialized version of CADisplayLink for use with high performance Metal apps. CAMetalDisplayLink is also supported on all Apple platforms and it may be more appropriate to use than CADisplayLink in some cases (though it is not necessary to use CAMetalDisplayLink instead of CADisplayLink in Metal based apps).

CoreVideo + Rosetta still clamps at 60Hz (since macOS 12)
 
 
Q