Apple - Force external display refresh rate
cscreen
You can use the freely available Terminal app cscreen
to force display settings. The app is pretty self explanatory.
brew cask install cscreen
cscreen -h
Usage: cscreen [-d <depth>] [-x <width>] [-y <height>] [-r <refresh>] [-s <display>] [-v] [-m] [-f] [-l] [-h]
[-d <depth>] : specifies the bit depth (bits per pixel)
[-x <width>] : specifies the width in pixels
[-y <height>] : specifies the height in pixels
[-r <refresh>] : specifies the refresh rate in Hz
[-s <display>] : specifies which display to use (defaults to main display)
use a as the option to -s to specify the action on all displays
[-i <displayID>]: picks a display based on CGDirectDisplayID (permanent per display)
continue to use '-s a' for "all displays"
[-v] : display valid modes (use -s to specify display or nothing for the default)
[-m] : require an exact match
[-f] : forces settings (ignores safety mechanisms; USE AT YOUR OWN RISK)
[-l] : lists the current displays and modes
[-p] : sets the requested display to have the menu bar
[-h] : displays the usage
Note: Using -p will change the display index so you will likely want to use -l again to show the current
displays if you wish to use -p a second time.
When you're on the new Macbook Pro (post 2017), and you connected your external display to the right side of your macbook, the refresh rate settings dropdown may be disabled. That is due to the limitations of the macbook: https://www.macrumors.com/2016/10/28/macbook-pro-tb3-reduced-pci-express-bandwidth/
The two ports on the right side of the machine have Thunderbolt 3 functionality but with reduced PCI Express bandwidth. For that reason, Apple recommends plugging higher-performance devices into the left-hand ports on that machine.
After you connect your external display from the left side of your Macbook you will see the refresh rates dropdown after you hold down options
and click on scaled
.
I came here searching for the answer myself because I've done it before but I installed an update and lost the settings. csreen and switchresx can both set the resolution for you, but there's a limit in OSX that needs to be bypassed in order to accomplish this. Additionally with the latest versions of OSX there's some sort of "system file protection" that prevents you from patching the relevant file. First, you have to disable that file protection (which I think gets turned on after each update) and then you have to patch the relevant file in OSX. If I find the answer for the latest version then I'll come back here and update the answer but you should google something to the effect to osx (your version) pixel clock unlock patch. Once you patched the relevant files you should be able to use utilities like switchresx (which is what I use) to set custom resolutions. I've found a patch for one version of osx here: https://github.com/Floris497/mac-pixel-clock-patch good luck!