Add An Overlay With GPU / CPU Usage And Temperature (And More) To Any Vulkan Game With MangoHud

MangoHud is a modification of the Mesa Vulkan overlay that includes GUI improvements, temperature (GPU and CPU) reporting, and optional logging, which aims to replicate the look and feel of the MSI Afterburner OSD. It works and is consistent across any Vulkan application or game, no matter if the game is using DXVK/VKD3D, Feral3D or Native Vulkan.

MangoHud

By default, MangoHud shows the DXVK version (if used), the GPU and CPU load, the current framerate (FPS), and a frame timeline plot (graph). Optionally you can also enable the display of the CPU and GPU temperature, current CPU load and frequency per core, and display system (RAM) and GPU memory usage. Hide or show the MangoHud overlay while in a game by using the F12 key.

You may also customize the position on the screen (top left / right and bottom left / right), and the font size.

It's worth noting that the GPU features have been tested on Nvidia and AMD graphics, but not on Intel.

Mesa has a Vulkan overlay, and DXVK can also display a HUD with some information supported by MangoHud. But both of these don't support showing the CPU and GPU temperature, the CPU load per core, CPU frequency per core, or logging of the data shown by the overlay, and this is why (as well as some GUI improvements) MangoHud was created.

The logs captured by MangoHud can easily be uploaded on Flightlessmango.com to create graphs automatically, and share the results, useful for benchmarking. To enable / disable logging press F2.

How to install and use MangoHud


The easiest way to install MangoHud is to download the precompiled binary from its GitHub releases tab, then run the install.sh script, e.g. in the directory where you extracted ManoHud, run:

./install.sh

This installs 2 .so files in ~/.local/share/MangoHud, and 2 .json files in ~/.local/share/vulkan/implicit_layer.d. In case you want to uninstall it you'll need to manually remove the files from those locations.

You can also build MangoHud from source if you wish.

Using MangoHud on a per-game basis:

  • To enable MangoHud for a game, run it with MANGOHUD=1, e.g.: MANGOHUD=1 /path/to/vulkan_game
  • If you use Lutris, you can enable MangoHud for individual games by right clicking a game, selecting Configure, then on the System options tab scroll down to Environment variables and add MANGOHUD with 1 as its value.
  • If you use Steam, go to a game's properties, click Set Launch Options, and enter MANGOHUD=1 %command%

You can customize what MangoHud displays, so besides the default FPS, CPU and GPU load, you can enable many other options, as well as customize the font and overlay position on the screen, by exporting MANGOHUD_CONFIG=your_options_here in the same way you've added MANGOHUD=1, replacing your_options_here with the options you want to enable. All available MANGOHUD_CONFIG options can be found here.

For example, to enable the CPU and GPU temperature and decrease the font size to 15 (default is 24), use MANGOHUD_CONFIG=cpu_temp,gpu_temp,font_size=15

You may also enable MangoHud system-wide, by placing export MANGOHUD=1 (and export MANGOHUD_CONFIG=your_options_here for custom MangoHud options) in your ~/.profile file (requires a logout/login). However, I do not recommend this as it may cause issues. For example on my Linux computer using Nvidia graphics, Lutris failed to start when enabling this system wide.

via Reddit