Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more.

License

NotificationsYou must be signed in to change notification settings

flightlessmango/MangoHud

Repository files navigation

A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more.

Example gif showing a standard performance readout with frametimes


Installation - Build From Source


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.gitcd MangoHud

Usingmeson to install "manually":

meson buildninja -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 appendmangohud to libdir if desired (e.g. /usr/local/lib/mangohud).

To install 32-bit build on 64-bit distro, specify properlibdir: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 changePKG_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 lib32ninja -C build32 install

Dependencies

Install necessary development packages.

  • gcc, g++
  • or gcc-multilib, g++-multilib for 32-bit support
  • meson >=0.54
  • ninja (ninja-build)
  • glslang
  • libGL/libEGL (libglvnd, mesa-common-dev, mesa-libGL-devel etc)
  • X11 (libx11-dev)
  • XNVCtrl (libxnvctrl-dev), optional, use-Dwith_xnvctrl=disabled option withmeson to disable
  • D-Bus (libdbus-1-dev), optional, use-Dwith_dbus=disabled option withmeson to disable
  • wayland-client
  • xkbcommon

Python 3 libraries:

  • Mako (python3-mako or install withpip)

If distro's packagedmeson is too old and gives build errors, install newer version withpip (python3-pip).

Meson options

OptionDefaultDescription
with_nvmlenabledRequired for NVIDIA GPU metrics on wayland
with_xnvctrlenabledRequired for NVIDIA GPU metrics on older GPUs
with_x11enabledRequired for keybinds on x11
with_waylandenabledRequired for keybinds on wayland
with_dbusenabledRequired for using the media features
mangoappfalseIncludes mangoapp
mangohudctlfalseInclude mangohudctl
testsautoIncludes tests
mangoplottrueIncludes mangoplot

Building with build script

You can also usebuild.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, althoughpackage should also callbuild 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 thebuild folder, execute:

./build.sh clean

Currently it just doesrm -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!

Installation - Pre-packaged Binaries


GitHub releases

If you do not wish to compile anything, simply download the file underReleases, extract it, and from within the extracted folder in terminal, execute:

./mangohud-setup.sh install

Arch-based distributions

If you are using an Arch-based distribution, installmangohud andlib32-mangohud from theextra/multilib repository.mangohud-git andlib32-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

Debian, Ubuntu

If you are using Debian 11 (Bullseye) or later, Ubuntu 21.10 (Impish) or later, or distro derived from them, to install theMangoHud 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.

Fedora

If you are using Fedora, to install theMangoHud package, execute:

sudo dnf install mangohud

Solus

If you are using Solus, to installMangoHud simply execute:

sudo eopkg it mangohud

openSUSE

If you run openSUSE Leap or Tumbleweed you can get Mangohud from the official repositories.There are two packages,mangohud for 64bit andmangohud-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.reposudo zypper install mangohud

Leap 15.3

sudo zypper addrepo -f https://download.opensuse.org/repositories/games:tools/openSUSE_Leap_15.3/games:tools.reposudo zypper install mangohud

Flatpak

If you are using Flatpaks, you will have to add theFlathub 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

Normal usage


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 theCommand prefix setting:

mangohud

For Steam games, you can add this as a launch option:

mangohud %command%

Or alternatively, addMANGOHUD=1 to your shell profile (Vulkan only).

OpenGL

OpenGL games may also needdlsym hooking, which is now enabled by default. Set theMANGOHUD_DLSYM env to0 to disable likeMANGOHUD_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 scriptLD_PRELOAD=/path/to/mangohud/lib/

gamescope

To enable mangohud with gamescope you need to install mangoapp.gamescope --mangoapp -- %command%

Using normal mangohud with gamescope is not supported.

Hud configuration

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 orget a copy from here.

The priorities of different config files are:

  1. /path/to/application/dir/MangoHud.conf
  2. Per-application configuration in ~/.config/MangoHud:
    1. ~/.config/MangoHud/<application_name>.conf for native applications, where<application_name> is the case sensitive name of the executable
    2. ~/.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
  3. ~/.config/MangoHud/MangoHud.conf

Example: For Overwatch, this would bewine-Overwatch.conf (even though the executable you run from Lutris isBattle.net.exe, the actual game executable name isOverwatch.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 is a GUI application that can be used to manage the config


Environment Variables

You can also customize the hud by using theMANGOHUD_CONFIG environment variable while separating different options with a comma. This takes priority over any config file.

You can also specify configuration file withMANGOHUD_CONFIGFILE=/path/to/config for applications whose names are hard to guess (java, python etc).

You can also specify presets file withMANGOHUD_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 usingMANGOHUD_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) arefps,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).

VariableDescription
afAnisotropic filtering level. Improves sharpness of textures viewed at an angle0-16
alphaSet the opacity of all text and frametime graph0.0-1.0
archShow if the application is 32- or 64-bit
autostart_log=Starts the log after X seconds from mangohud init
background_alphaSet the opacity of the background0.0-1.0
battery_colorChange the battery text color
battery_iconDisplay battery icon instead of percent
battery_wattDisplay wattage for the battery option
battery_timeDisplay remaining time for battery option
batteryDisplay current battery percent and energy consumption
benchmark_percentilesConfigure which framerate percentiles are shown in the logging summary. Default is97,AVG,1,0.1
bicubicForce bicubic filtering
blacklistAdd a program to the blacklist. e.gblacklist=vkcube,WatchDogs2.exe
cellpadding_ySet the vertical cellpadding, default is-0.085
control=Sets up a unix socket with a specific name that can be connected to with mangohud-control.
I.e.control=mangohud orcontrol=mangohud-%p (%p will be replaced by process id)
core_load_changeChange the colors of cpu core loads, uses the same data fromcpu_load_value andcpu_load_change
core_loadDisplay load & frequency per core
core_typeDisplay CPU core type per core. For Intel, it shows which cores are performance and efficient cores, for ARM it shows core codenames like A52, A53, A76, etc...
core_barsChange the display ofcore_load from numbers to vertical bars
cpu_load_changeChange the color of the CPU load depending on load
cpu_load_colorSet the colors for the gpu load change low, medium and high. e.gcpu_load_color=0000FF,00FFFF,FF00FF
cpu_load_valueSet the values for medium and high load e.gcpu_load_value=50,90
cpu_mhzShow the CPUs current MHz
cpu_power
gpu_power
Display CPU/GPU draw in watts
cpu_temp
gpu_temp
gpu_junction_temp
gpu_mem_temp
Display current CPU/GPU temperature
cpu_custom_temp_sensorUse custom hwmon sensor for cpu temperature. e.gcpu_custom_temp_sensor=cpuss0_2,temp3_input.
cpu_text
gpu_text
Override CPU and GPU text.gpu_text is a list in case of multiple GPUs
cpu_efficiencyDisplay CPU efficiency in frames per joule
custom_text_centerDisplay a custom text centered useful for a header e.gcustom_text_center=FlightLessMango Benchmarks
custom_textDisplay a custom text e.gcustom_text=Fsync enabled
debugShows the graph of gamescope app frametimes and latency (only on gamescope obviously)
device_battery_iconDisplay wirless device battery icon.
device_batteryDisplay wireless device battery percent. Currently supported argumentsgamepad andmouse e.gdevice_battery=gamepad,mouse
display_serverDisplay the current display session (e.g. X11 or wayland)
dynamic_frame_timingThis changes frame_timing y-axis to correspond with the current maximum and minimum frametime instead of being a static 0-50
engine_short_namesDisplay a short version of the used engine (e.g.OGL instead ofOpenGL)
engine_versionDisplay OpenGL or vulkan and vulkan-based render engine's version
execDisplay output of bash command in next column, e.g.custom_text=/home ,exec=df -h /home | tail -n 1. Only works withlegacy_layout=0
exec_nameDisplay current exec name
fanShows the Steam Deck fan rpm
fcatEnables frame capture analysis
fcat_overlay_width=Sets the width of fcat. Default is24
fcat_screen_edge=Decides the edge fcat is displayed on. A value between1 and4
font_file_textChange text font. Otherwisefont_file is used
font_fileChange default font (set location to .TTF/.OTF file)
font_glyph_rangesSpecify extra font glyph ranges, comma separated:korean,chinese,chinese_simplified,japanese,cyrillic,thai,vietnamese,latin_ext_a,latin_ext_b. If you experience crashes or text is just squares, reduce font size or glyph ranges
font_scale=Set global font scale. Default is1.0
font_scale_media_playerChange size of media player text relative tofont_size
font_size=Customizable font size. Default is24
font_size_secondary=Customizable font size for secondary metrics. Default is0.55 * font_size, except ifno_small_font is set, in which case the default value isfont_size
font_size_text=Customizable font size for other text like media metadata. Default is24
fps_color_changeChange the FPS text color depepending on the FPS value
fps_color=Choose the colors that the fps changes to whenfps_color_change is enabled. Corresponds with fps_value. Default isb22222,fdfd09,39f900
fps_limit_methodIf FPS limiter should wait before or after presenting a frame. Chooselate (default) for the lowest latency orearly for the smoothest frametimes
fps_limitLimit the apps framerate. Comma-separated list of one or more FPS values.0 means unlimited
fps_onlyShow FPS only.Not meant to be used with other display params
fps_sampling_period=Time interval between two sampling points for gathering the FPS in milliseconds. Default is500
fps_valueChoose the break points wherefps_color_change changes colors between. E.g60,144, default is30,60
fps_metricsTakes a list of decimal values or the value avg, e.gavg,0.001
reset_fps_metricsReset fps metrics keybind, default isShift_R+F9
fps_textDisplay custom text for engine name in front of FPS
frame_countDisplay frame count
frametimeDisplay frametime next to FPS text
frame_timing_detailedDisplay frame timing in a more detailed chart
fsrDisplay the status of FSR (only works in gamescope)
hdrDisplay the status of HDR (only works in gamescope)
refresh_rateDisplay the current refresh rate (only works in gamescope)
fullEnable most of the toggleable parameters (currently excludeshistogram)
gamemodeShow if GameMode is on
gpu_color
cpu_color
vram_color
ram_color
io_color
engine_color
frametime_color
background_color
text_color
media_player_color
network_color
Change default colors:gpu_color=RRGGBB
gpu_core_clock
gpu_mem_clock
Display GPU core/memory frequency
gpu_fanGPU fan in RPM, except NVIDIA where it is a percentage
gpu_load_changeChange the color of the GPU load depending on load
gpu_load_colorSet the colors for the gpu load change low,medium and high. e.ggpu_load_color=0000FF,00FFFF,FF00FF
gpu_load_valueSet the values for medium and high load e.ggpu_load_value=50,90
gpu_nameDisplay GPU name from pci.ids
gpu_voltageDisplay GPU voltage
gpu_listList GPUs to displaygpu_list=0,1
gpu_efficiencyDisplay GPU efficiency in frames per joule
gpu_power_limitDisplay GPU power limit
hide_fsr_sharpnessHides the sharpness info for thefsr option (only available in gamescope)
histogramChange FPS graph to histogram
horizontalDisplay Mangohud in a horizontal position
horizontal_separator_colorSet the colors for the horizontal separators (horizontal layout only)
horizontal_stretchStretches the background to the screens width inhorizontal mode
hud_compactDisplay compact version of MangoHud
hud_no_marginRemove margins around MangoHud
io_read
io_write
Show non-cached IO read/write, in MiB/s
log_durationSet amount of time the logging will run for (in seconds)
log_intervalChange the default log interval in milliseconds. Default is0
log_versioningAdds more headers and information such as versioning to the log. This format is not supported on flightlessmango.com (yet)
media_player_formatFormat media player metadata. Add extra text etc. Semi-colon breaks to new line. Defaults to{title};{artist};{album}
media_player_nameForce media player DBus service name without theorg.mpris.MediaPlayer2 part, likespotify,vlc,audacious orcantata. If none is set, MangoHud tries to switch between currently playing players
media_playerShow media player metadata
no_displayHide the HUD by default
no_small_fontUse primary font size for smaller text like units
offset_xoffset_yHUD position offsets
output_fileSet location and name of the log file
output_folderSet location of the output files (Required for logging)
pci_devSelect GPU device in multi-gpu setups
permit_uploadAllow uploading of logs to Flightlessmango.com
picmipMip-map LoD bias. Negative values will increase texture sharpness (and aliasing). Positive values will increase texture blurriness-16-16
position=Location of the HUD:top-left (default),top-right,middle-left,middle-right,bottom-left,bottom-right,top-center,bottom-center
preset=Comma separated list of one or more presets. Default is-1,0,1,2,3,4. Available presets:
0 (No Hud)
1 (FPS Only)
2 (Horizontal)
3 (Extended)
4 (Detailed)
User defined presets can be created by using apresets.conf file in~/.config/MangoHud/.
procmem
procmem_shared,procmem_virt
Displays process' memory usage: resident, shared and/or virtual.procmem (resident) also toggles others off if disabled
proc_vramDisplay process' VRAM usage
ram
vram
Display system RAM/VRAM usage
ram_tempDisplay RAM temperature (only supports DDR5 withspd5118 driver)
read_cfgAdd to MANGOHUD_CONFIG as first parameter to also load config file. Otherwise onlyMANGOHUD_CONFIG parameters are used
reload_cfg=Change keybind for reloading the config. Default =Shift_L+F4
resolutionDisplay the current resolution
retroDisable linear texture filtering. Makes textures look blocky
round_cornersChange the amount of roundness of the corners have e.ground_corners=10.0
show_fps_limitDisplay the current FPS limit
swapDisplay swap space usage next to system RAM usage
table_columnsSet the number of table columns for ImGui, defaults to 3
temp_fahrenheitShow temperature in Fahrenheit
text_outlineDraw an outline around text for better readability. Enabled by default.
text_outline_color=Set the color oftext_outline. Default =000000
text_outline_thickness=Set the thickness oftext_outline. Default =1.5
throttling_statusShow if GPU is throttling based on Power, current, temp or "other" (Only shows if throttling is currently happening). Currently disabled by default for Nvidia as it causes lag on 3000 series
throttling_status_graphSame asthrottling_status but displays throttling in the frametime graph and only power and temp throttling
time
time_format=%T
Display local time. Seestd::put_time for formatting help. NOTE: Sometimes apps may setTZ (timezone) environment variable to UTC/GMT
time_no_labelRemove the label before time
toggle_fps_limitCycle between FPS limits (needs at least two values set withfps_limit). Defaults toShift_L+F1
toggle_presetCycle between Presets. Defaults toShift_R+F10
toggle_hud=
toggle_logging=
Modifiable toggle hotkeys. Default areShift_R+F12 andShift_L+F2, respectively
toggle_hud_positionToggle MangoHud position. Default isR_Shift+F11
trilinearForce trilinear filtering
upload_logChange keybind for uploading log
upload_logsEnables automatic uploads of logs to flightlessmango.com
versionShow current MangoHud version
vkbasaltShow if vkBasalt is on
vsync
gl_vsync
Set Vsync for OpenGL or Vulkan
vulkan_driverDisplay used Vulkan driver (radv/amdgpu-pro/amdvlk)
width=
height=
Customizable HUD dimensions (in pixels)
wine_colorChange color of the wine/proton text
wineShow current Wine or Proton version in use
winesyncShow wine sync method in use
present_modeShows current vulkanpresent mode or vsync status in opengl
networkShow network interfaces tx and rx kb/s. You can specify interface withnetwork=eth0
fex_statsShow FEX-Emu statistics. Default =status+apptype+hotthreads+jitload+sigbus+smc+softfloat
ftraceDisplay information about trace events reported through ftrace
flip_efficiencyFlips CPU and GPU efficiency to joules per frame

Example:MANGOHUD_CONFIG=cpu_temp,gpu_temp,position=top-right,height=500,font_size=32Because comma is also used as option delimiter and needs to be escaped for values with a backslash, you can use+ likeMANGOHUD_CONFIG=fps_limit=60+30+0 instead.

Note: Width and Height are set automatically based on the font_size, but can be overridden.

Note: RAPL is currently used for Intel and AMD Zen CPUs to show power draw withcpu_power which may be unreadable for non-root users due tovulnerability. The correspondingenergy_uj file has to be readable by corresponding user, e.g. by runningchmod o+r /sys/class/powercap/intel-rapl\:0/energy_uj as root, else the power shown will be0 W, though having the file readable may potentially be a security vulnerability persisting until system reboots.

Note: Thezenpower3 orzenergy kernel driver must be installed to show the power draw of Ryzen CPUs.

Vsync

OpenGL Vsync

  • -1 = Adaptive sync
  • 0 = Off
  • 1 = On
  • n = Sync to refresh rate / n.

Vulkan Vsync

  • 0 = Adaptive VSync (FIFO_RELAXED_KHR)
  • 1 = Off (IMMEDIATE_KHR)
  • 2 = Mailbox (VSync with uncapped FPS) (MAILBOX_KHR)
  • 3 = On (FIFO_KHR)

Not all vulkan vsync options may be supported on your device, you can check what your device supports herevulkan.gpuinfo.org

Keybindings

  • Shift_L+F2 : Toggle Logging
  • Shift_L+F4 : Reload Config
  • Shift_R+F12 : Toggle Hud
  • Shift_R+F9 : Reset FPS metrics

Workarounds

Options starting with "gl_*" are for OpenGL.

  • gl_size_query = viewport : Specify what to use for getting display size. Options are "viewport", "scissorbox" or disabled. Defaults to using glXQueryDrawable.
  • gl_bind_framebuffer = 0..N : (Re)bind given framebuffer before MangoHud gets drawn. Helps with Crusader Kings III.
  • gl_dont_flip = 1 : Don't swap origin if using GL_UPPER_LEFT. Helps with Ryujinx.

FPS logging

You must set a valid path foroutput_folder in your configuration to store logs in.

When you toggle logging (default keybind isShift_L+F2), a file is created with the game name plus a date & timestamp in youroutput_folder.

Log files can be visualized with two different tools: online and locally.

Online visualization: FlightlessMango.com

Log files can be (batch) uploaded toFlightlessMango.com, which will then take care of creating a frametime graph and a summary with 1% min / average framerate / 97th percentile in a table form and a horizontal bar chart form.

Notes:

  • Uploaded benchmarks are public: you can share them with anyone by simply giving them the link.
  • Benchmark filenames are used as legend in the produced tables and graphs, they can be renamed after the upload.

Gif illustrating the log uploading process

Local visualization:mangoplot

mangoplot is a plotting script that is shipped withMangoHud: on a given folder, it takes each log file, makes a 1D heatmap of its framerates, then stacks the heats maps vertically to form a 2D graph for easy visual comparison between benchmarks.

Example output:

Overwatch 2 windows 11 vs linux

Overwatch 2, 5950X + 5700XT, low graphics preset, FHD, 50% render scale

Metrics support by GPU vendor/driver

NvidiaAMDIntel DiscreteIntel IntegratedPanfrost/Panthor driver
i915xei915/xe
Usage%🟢🟢🟢🟢🟢🟢
Temperature🟢🟢🟢🟢🔴🟢
Junction Temperature🔴🟢🔴🔴🔴🔴
Memory Temperature🔴🟢🔴🟢🔴🔴
Process VRAM🟢🟢🟢🟢🟢🟢
System VRAM🟢🟢🔴🔴🔴🔴
Total VRAM🟢🟢🔴🔴🔴🔴
Memory Clock🟢🟢🔴🔴🔴🔴
Core Clock🟢🟢🟢🟢🟢🟢
Power Usage🟢🟢🟢🟢🔴🔴
Throttling Status🟢🟢🟢🟢🟢🔴
Fan Speed🟢🟢🟢🟢🔴🔴
Voltage🔴🟢🟢🟢🔴🔴

Intel notes

Panfrost and Panthor notes

  • GPU usage requiresecho N | sudo tee /sys/class/drm/renderD*/device/profiling
    • Where N is a number, 1 for panfrost and 3 for panthor.

About

A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2026 Movatter.jp