Skip to content

MangoHud

Eamonn Rea edited this page Nov 26, 2023 · 14 revisions

(Project Page: MangoHud)

MangoHud is a tool that lets you view various pieces of information about a game while its running, such as CPU/GPU temperature, rendering backend and more. Steam Tinker Launch exposes various options for using MangoHud with Vulkan, OpenGL and Proton games.

The Steam Deck uses MangoHud for its HUD. As such, MangoHud with Steam Tinker Launch can be used in combination with other Steam Tinker Launch offerings, such as GameMode and Gamescope.

For specifics on installing MangoHud on your distribution, as well as how and why some features may be used, refer to the MangoHud README.

Enabling MangoHud

(in Game Menu and Game Config, under Tool Options)

To use MangoHud, USEMANGOHUD must be enabled. If the option for the MangoHud variable (MAHUVAR) is also enabled, then the MangoHud variable is used. By default, the regular MangoHud invocation is used by appending the path to the MangoHud binary to the game launch options. SteamTinkerLaunch automatically detects the binary path, but you can override this by setting MAHUBIN either per-game or on the Default game configuration.

In some cases, you may need to use the MangoHud environment variable for some games. To use this, USEMANGOHUD must still be enabled, but if the option for the MangoHud variable (MAHUVAR) is also enabled, then the MangoHud variable is used in place of the MangoHud binary path (since the environment variable is then responsible for locating the binary).

MangoHud

This uses the installed MangoHud binary on your system, pointing directly to it. Steam Tinker Launch lets you choose a custom location for the binary (MAHUBIN), if you have a preferred location. This method supports OpenGL and Vulkan games.

MangoHud Variable

This sets an environment variable to use MangoHud. It only supports Vulkan games. It will usually use the path to the installed MangoHud binary path, meaning if you have a preferred binary, the variable will likely ignore it. Please note that this option does not work for OpenGL games, MangoHud requires you to use the binary in this instance and this is not a Steam Tinker Launch limitation.

Note: You must still have USEMANGOHUD enabled to use this option, but the environment variable will take the place of the MangoHud binary in the game launch command. It is the equivalent of launching a Steam game with MANGOHUD=1 %command%.

Usage

Steam Tinker Launch offers configuration for pretty much all of MangoHud's functionality.

MangoHud Binary

You can set a custom path for MangoHud's binary using a file picker to browse to the location. Steam Tinker Launch will use this to launch your game. Assuming your path is /usr/bin/mangohud, it is the equivalent of adding /usr/bin/mangohud %command% to a game's launch option.

MangoHud Arguments

There are a huge number of arguments you can pass to MangoHud. Steam Tinker Launch offers one preset: --dlsym, which is needed for some OpenGL games. There hasn't been an observed instance where --dlsym has broken Steam games, but it has been noted that this can happen. It is the equivalent of adding the launch option mangohud --dlsym %command% to your games manually.

You can also pass MANGOHUD_CONFIG parameters here. The MangoHud README has a list of configuration arguments. However, you can also pass them via a Steam Tinker Launch configuration file, on a per-game and global basis.

One example of a game that needs --dlsym is the non-Steam game "SuperTuxKart".

MangoHud Preload

Like with --dlsym, some games require this option to work. Some native Linux OpenGL games override the LD_PRELOAD variable and stop MangoHud from being loaded. Enabling this forces games to load MangoHud correctly. It may be needed on its own or in combination with --dlsym to get native Linux OpenGL games to display MangoHud.

MangoHud Config

This tells Steam Tinker Launch to use the internal configuration file for MangoHud (USEMANGOHUDSTLCFG) on a per-game basis. If no configuration file is found for the game (based on its AppID), it creates one based on a template file (MAHUTMPL). If Steam Tinker Launch is unable to find the per-game config file and template config file, it uses the upstream example configuration file to generate one.

The paths for the MangoHud configuration files that Steam Tinker Launch looks for:

  • Per-Game config for AppID 638970: ~/.config/steamtinkerlaunch/mangohud/id/638970.conf
  • Template file: ~/.config/steamtinkerlaunch/mangohud/mangohud-steamtinkerlaunch-template.conf
  • Upstream config file: /usr/share/doc/mangohud/MangoHud.conf.example

If a per-game config file is found at the correct path, Steam Tinker Launch also creates a symlink to this file at ~/.config/steamtinkerlaunch/mangohud/title/$GAMENAME.conf for convenience.

Steam Tinker Launch generates a Per-Game MangoHud Log based on the game's AppId, for example ~/.config/steamtinkerlaunch/logs/mangohud/id/638970.log. When a template file is generated for MangoHud, it is stored at ~/.config/steamtinkerlaunch/logs/mangohud/id/XXX. Like with the MangoHud Per-Game configuration file, a symlink for the MangoHud Per-Game log file is created based on the game name at the path ~/.config/steamtinkerlaunch/logs/mangohud/title/Yakuza 0.log.

Both enabling USEMANGOHUD and USEMANGOHUDSTLCFG is also possible by simply dragging the game into the corresponding Steam Collection.

MangoApp

MangoApp is an extra tool that has to be explicitly built with MangoHud. It may not be included by default in your distribution's MangoHud package. It is possible to build MangoHud from source and specify these flags, but this can be a technical process and is not recommended unless you know what you are doing.

To enable MangoApp when building MangoHud from source, you will need to specify the -Dmangoapp=true and -Dmangoapp_layer=true flags to Meson. See the AUR PKGBUILD file for reference on how the package is built on Arch Linux. There is also a lib32-mangoapp package on the AUR which you may want to refer to if you need 32bit support.

MangoApp is intended for use with GameScope. If you are trying to run a game with MangoApp without enabling GameScope as well, you may experience issues. Also note that MangoApp is designed for use with X11/XWayland and does not support native Wayland applications. See this comment on the AUR package.

Useful links:

Clone this wiki locally