Creates a virtual 240Hz display and mirrors your main screen to it. Useful for unlocking higher refresh rates on displays that support it through software.
Uses macOS's private CGVirtualDisplay API to create a virtual monitor at your main screen's resolution with a 240Hz refresh rate, then configures the system to mirror your physical display to it via CGConfigureDisplayMirrorOfDisplay.
Requires Xcode Command Line Tools.
makeThe binary is output to .build/virtualdisplay. To install system-wide:
make install # copies to /usr/local/bin/virtualdisplayvirtualdisplay # start with menu bar icon
virtualdisplay --no-menu # start headless, stop with Ctrl-C or SIGTERM
virtualdisplay --helpWhen running, a display icon appears in the menu bar. Click it and select Stop to disable mirroring and remove the virtual display. The original display resolution is restored on exit.
By default the binary is ad-hoc signed. If the virtual display fails to initialize, sign with a Developer ID instead:
make SIGN="Developer ID Application: Your Name (TEAMID)"