一个用于监控 FPS、温度、CPU/GPU 加载率等的 Vulkan 和 OpenGL 叠加工具。
A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more.
If you wish to compile MangoHud to keep up to date with any changes - first clone this repository and cd into it:
git clone --recurse-submodules https://github.com/flightlessmango/MangoHud.git
cd MangoHud
Using meson to install "manually":
meson build
ninja -C build install
By default, meson should install MangoHud to /usr/local. Specify install prefix with --prefix=/usr if desired.
Add -Dappend_libdir_mangohud=false option to meson to not append mangohud to libdir if desired (e.g. /usr/local/lib/mangohud).
To install 32-bit build on 64-bit distro, specify proper libdir: lib32 for Arch, lib/i386-linux-gnu on Debian-based distros. RPM-based distros usually install 32-bit libraries to /usr/lib and 64-bit to /usr/lib64.
You may have to change PKG_CONFIG_PATH to point to correct folders for your distro.
CC="gcc -m32" \
CXX="g++ -m32" \
PKG_CONFIG_PATH="/usr/lib32/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib/pkgconfig" \
meson build32 --libdir lib32
ninja -C build32 install
Install necessary development packages.
-Dwith_xnvctrl=disabled option with meson to disable-Dwith_dbus=disabled option with meson to disablePython 3 libraries:
pip)If distro's packaged meson is too old and gives build errors, install newer version with pip (python3-pip).
You can also use build.sh script to do some things automatically like install dependencies, if distro is supported but it usually assumes you are running on x86_64 architecture.
To just build it, execute:
./build.sh build
You can also pass arguments to meson:
./build.sh build -Dwith_xnvctrl=disabled
Resulting files will be install to ./build/release folder.
If you have compiled MangoHud from source, to install it, execute:
./build.sh install
You can then subsequently uninstall MangoHud via the following command
./build.sh uninstall
To tar up the resulting binaries into a package and create a release tar with installer script, execute:
./build.sh package release
or combine the commands, although package should also call build if it doesn't find the built libs:
./build.sh build package release
If you have built MangoHud before and suddenly it fails, you can try cleaning the build folder, execute:
./build.sh clean
Currently it just does rm -fr build and clears subprojects.
NOTE: If you are running an Ubuntu-based, Arch-based, Fedora-based, or openSUSE-based distro, the build script will automatically detect and prompt you to install missing build dependencies. If you run into any issues with this please report them!
If you do not wish to compile anything, simply download the file under Releases, extract it, and from within the extracted folder in terminal, execute:
./mangohud-setup.sh install
If you are using an Arch-based distribution, install mangohud and lib32-mangohud from the extra/multilib repository. mangohud-git and lib32-mangohud-git are available on the AUR to be installed via your favourite AUR helper. These can help fix issues with the hud not activating when using stable releases from pacman!
If you are building it by yourself, you need to enable multilib repository, by editing pacman config:
sudo nano /etc/pacman.conf
and uncomment:
#[multilib]
#Include = /etc/pacman.d/mirrorlist
then save the file and execute:
sudo pacman -Syy
If you are using Debian 11 (Bullseye) or later, Ubuntu 21.10 (Impish) or later, or distro derived from them, to install the MangoHud package, execute:
sudo apt install mangohud
Optionally, if you also need MangoHud for 32-bit applications, on Debian you can execute:
sudo apt install mangohud:i386
The 32-bit package is not available on Ubuntu.
If you are using Fedora, to install the MangoHud package, execute:
sudo dnf install mangohud
If you are using Solus, to install MangoHud simply execute:
sudo eopkg it mangohud
If you run openSUSE Leap or Tumbleweed you can get Mangohud from the official repositories. There are two packages, mangohud for 64bit and mangohud-32bit for 32bit application support. To have Mangohud working for both 32bit and 64bit applications you need to install both packages even on a 64bit operating system.
sudo zypper in mangohud mangohud-32bit
Leap doesn't seem to have the 32bit package.
Leap 15.2
sudo zypper addrepo -f https://download.opensuse.org/repositories/games:tools/openSUSE_Leap_15.2/games:tools.repo
sudo zypper install mangohud
Leap 15.3
sudo zypper addrepo -f https://download.opensuse.org/repositories/games:tools/openSUSE_Leap_15.3/games:tools.repo
sudo zypper install mangohud
If you are using Flatpaks, you will have to add the Flathub repository for your specific distribution, and then, to install it, execute:
For flatpak:
flatpak install org.freedesktop.Platform.VulkanLayer.MangoHud
To enable MangoHud for all Steam games:
flatpak override --user --env=MANGOHUD=1 com.valvesoftware.Steam
To enable the MangoHud overlay layer for Vulkan and OpenGL, run :
mangohud /path/to/app
For Lutris games, go to the System options in Lutris (make sure that advanced options are enabled) and add this to the Command prefix setting:
mangohud
For Steam games, you can add this as a launch option:
mangohud %command%
Or alternatively, add MANGOHUD=1 to your shell profile (Vulkan only).
OpenGL games may also need dlsym hooking, which is now enabled by default. Set the MANGOHUD_DLSYM env to 0 to disable like MANGOHUD_DLSYM=0 %command% for Steam.
Some Linux native OpenGL games overrides LD_PRELOAD and stops MangoHud from working. You can sometimes fix this by editing LD_PRELOAD in the start script
LD_PRELOAD=/path/to/mangohud/lib/
To enable mangohud with gamescope you need to install mangoapp.
gamescope --mangoapp -- %command%
Using normal mangohud with gamescope is not supported.
MangoHud comes with a config file which can be used to set configuration options globally or per application. Usually it is installed as /usr/share/doc/mangohud/MangoHud.conf.example or get a copy from here.
The priorities of different config files are:
/path/to/application/dir/MangoHud.conf~/.config/MangoHud/<application_name>.conf for native applications, where <application_name> is the case sensitive name of the executable~/.config/MangoHud/wine-<application_name>.conf for wine/proton apps, where <application_name> is the case sensitive name of the executable without the .exe ending~/.config/MangoHud/MangoHud.confExample: For Overwatch, this would be wine-Overwatch.conf (even though the executable you run from Lutris is Battle.net.exe, the actual game executable name is Overwatch.exe).
If you start the game from the terminal with MangoHud enabled (for example by starting Lutris from the terminal), MangoHud will print the config file names it is looking for.
You can find an example config in /usr/share/doc/mangohud
GOverlay Qt GUI for configuring MangoHud.
MangoJuice GTK GUI for configuring MangoHud.
You can also customize the hud by using the MANGOHUD_CONFIG environment variable while separating different options with a comma. This takes priority over any config file.
You can also specify configuration file with MANGOHUD_CONFIGFILE=/path/to/config for applications whose names are hard to guess (java, python etc).
You can also specify presets file with MANGOHUD_PRESETSFILE=/path/to/config. This is especially useful when running mangohud in a sandbox such as flatpak.
You can also specify custom hud libraries for OpenGL using MANGOHUD_OPENGL_LIBS=/path/to/libMangoHud_opengl.so. This is useful for testing MangoHud without modifying the installation on your system.
A partial list of parameters are below. See the config file for a complete list.
Parameters that are enabled by default have to be explicitly disabled. These (currently) are fps, frame_timing, cpu_stats (cpu load), gpu_stats (gpu load), and each can be disabled by setting the corresponding variable to 0 (e.g., fps=0).
暂无开放 Issues,或尚未同步最近议题。