MacOS - Metal Performance HUD Overlay
Unlike most other operating systems, MacOS comes with a built-in game performance overlay.
Below is a screenshot of the Metal HUD active in the top-right corner while running 7 Days To Die (using the Metal renderer):
This is a pretty decent loadout of information.
From top to bottom, we’re presented with:
Row 1 (white): SoC & display resolution
Row 2 (white): Display scaling & mode (direct or composited), current refresh rate
Row 3 (white): Framerate: Current, Low and High
Row 4 (blue): Total frametime: Current, Low, and High
Row 5 (green): GPU-only frame time: Current, Low, and High
Row 6: Unified Memory usage (for the foreground app/game only): total shown in white, VRAM in green
Row 7: A dual frametime graph, showing spikes and dips in both total frametime and GPU processing time for each frame.
Low and High framerates/frametimes are based on recent data only - applying to approximately the last two seconds.
How to activate the Metal HUD
You might be surprised how simple the Metal HUD is to activate & deactivate.
It does, however, require a brief trip into the command line. The horror.
Note: Carry out the following steps before opening a game.
Firstly, open the Terminal app - you can do this instantly by hitting Command + Space and then typing “terminal” into the Spotlight search window and pressing Enter to launch the app:
When you’re presented with the Terminal window, simply copy & paste the following text in next to the “%” sign, then hit Enter:
/bin/launchctl setenv MTL_HUD_ENABLED 1
Note that the text to the left of the prompt will vary based on your username & whatever you named your computer.
A new prompt will appear but there’s no other feedback to let you know that the HUD is active.
Now, all you need to do is launch a game and you should see the HUD in the top right of the screen.
Deactivating the Metal HUD
When you’re ready to disable the HUD, just open Terminal again, and copy & paste the following to switch it back off:
/bin/launchctl setenv MTL_HUD_ENABLED 0