Add emphasis about using git- AUR installs

Cleaned up lots of markdown best practices, organized some and updated the table of contents
pull/936/head
RPINerd 1 year ago committed by flightlessmango
parent 7b255a8cbd
commit ac1c83ac7c

@ -2,15 +2,15 @@
A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more.
#### Example:
![](assets/overlay_example.gif)
![Example gif showing a standard performance readout with frametimes](assets/overlay_example.gif)
# Navigation
- [Installation](#installation)
- [Build](#build)
---
- [MangoHud](#mangohud)
- [Installation - Build From Source](#installation---build-from-source)
- [Dependencies](#dependencies)
- [Building with build script](#building-with-build-script)
- [Pre-packaged binaries](#pre-packaged-binaries)
- [Installation - Pre-packaged Binaries](#installation---pre-packaged-binaries)
- [GitHub releases](#github-releases)
- [Arch-based distributions](#arch-based-distributions)
- [Debian, Ubuntu](#debian-ubuntu)
@ -18,28 +18,33 @@ A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and m
- [Solus](#solus)
- [openSUSE](#opensuse)
- [Flatpak](#flatpak)
- [Normal usage](#normal-usage)
- [Normal usage](#normal-usage)
- [OpenGL](#opengl)
- [Hud configuration](#hud-configuration)
- [Environment Variables: **`MANGOHUD_CONFIG`** and **`MANGOHUD_CONFIGFILE`**](#environment-variables-mangohud_config-and-mangohud_configfile)
- [Vsync](#vsync)
- [OpenGL Vsync](#opengl-vsync)
- [Vulkan Vsync](#vulkan-vsync)
- [Keybindings](#keybindings)
- [Workarounds](#workarounds)
- [MangoHud FPS logging](#mangohud-fps-logging)
- [Multiple log files](#multiple-log-files)
- [Log uploading walkthrough](#log-uploading-walkthrough)
# Installation
## Installation - Build From Source
## Build
---
If you wish to compile MangoHud to keep up to date with any changes - first clone this repository and cd into it:
```
```bash
git clone --recurse-submodules https://github.com/flightlessmango/MangoHud.git
cd MangoHud
```
Using `meson` to install "manually":
```
```bash
meson build
ninja -C build install
```
@ -50,7 +55,7 @@ Add `-Dappend_libdir_mangohud=false` option to meson to not append `mangohud` to
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.
```
```bash
CC="gcc -m32" \
CXX="g++ -m32" \
PKG_CONFIG_PATH="/usr/lib32/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib/pkgconfig" \
@ -77,7 +82,6 @@ Python 3 libraries:
- Mako (python3-mako or install with `pip`)
If distro's packaged `meson` is too old and gives build errors, install newer version with `pip` (`python3-pip`).
### Building with build script
@ -86,13 +90,13 @@ You can also use `build.sh` script to do some things automatically like install
To just build it, execute:
```
```bash
./build.sh build
```
You can also pass arguments to meson:
```
```bash
./build.sh build -Dwith_xnvctrl=disabled
```
@ -100,108 +104,110 @@ Resulting files will be install to `./build/release` folder.
If you have compiled MangoHud from source, to install it, execute:
```
```bash
./build.sh install
```
You can then subsequently uninstall MangoHud via the following command
```
```bash
./build.sh uninstall
```
To tar up the resulting binaries into a package and create a release tar with installer script, execute:
```
```bash
./build.sh package release
```
or combine the commands, although `package` should also call `build` if it doesn't find the built libs:
```
```bash
./build.sh build package release
```
If you have built MangoHud before and suddenly it fails, you can try cleaning the `build` folder, execute:
```
```bash
./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!**
__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
### Pre-packaged binaries
---
#### GitHub releases
### GitHub releases
If you do not wish to compile anything, simply download the file under [Releases](https://github.com/flightlessmango/MangoHud/releases), extract it, and from within the extracted folder in terminal, execute:
```
```bash
./mangohud-setup.sh install
```
#### Arch-based distributions
### Arch-based distributions
If you are using an Arch-based distribution, install [`mangohud`](https://aur.archlinux.org/packages/mangohud/) and [`lib32-mangohud`](https://aur.archlinux.org/packages/lib32-mangohud/) with your favourite AUR helper. [`mangohud-git`](https://aur.archlinux.org/packages/mangohud-git/) and [`lib32-mangohud-git`](https://aur.archlinux.org/packages/lib32-mangohud-git/) are also available on the AUR if you want the up-to-date version of MangoHud.
If you are using an Arch-based distribution, install [`mangohud`](https://aur.archlinux.org/packages/mangohud/) and [`lib32-mangohud`](https://aur.archlinux.org/packages/lib32-mangohud/) with your favourite AUR helper. [`mangohud-git`](https://aur.archlinux.org/packages/mangohud-git/) and [`lib32-mangohud-git`](https://aur.archlinux.org/packages/lib32-mangohud-git/) are also available on the AUR if you want the up-to-date version of MangoHud. These can help fix issues with the hud not activating when using older releases from pacman!
If you are building it by yourself, you need to enable multilib repository, by editing pacman config:
```
```bash
sudo nano /etc/pacman.conf
```
and uncomment:
```
```txt
#[multilib]
#Include = /etc/pacman.d/mirrorlist
```
then save the file and execute:
```
```bash
sudo pacman -Syy
```
#### Debian, Ubuntu
### Debian, Ubuntu
If you are using Debian 11 (Bullseye) or later, Ubuntu 21.10 (Impish) or later, or distro derived from them, to install the [MangoHud](https://tracker.debian.org/pkg/mangohud) package, execute:
```
```bash
sudo apt install mangohud
```
Optionally, if you also need MangoHud for 32-bit applications, execute:
```
```bash
sudo apt install mangohud:i386
```
#### Fedora
### Fedora
If you are using Fedora, to install the [MangoHud](https://src.fedoraproject.org/rpms/mangohud) package, execute:
```
```bash
sudo dnf install mangohud
```
#### Solus
### Solus
If you are using Solus, to install [MangoHud](https://dev.getsol.us/source/mangohud/) simply execute:
```
```bash
sudo eopkg it mangohud
```
#### openSUSE
### openSUSE
If you run openSUSE Leap or Tumbleweed you can get Mangohud from the official repositories.
There are two packages, [mangohud](https://software.opensuse.org/package/mangohud) for 64bit and [mangohud-32bit](https://software.opensuse.org/package/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.
```
```bash
sudo zypper in mangohud mangohud-32bit
```
@ -209,32 +215,37 @@ Leap doesn't seem to have the 32bit package.
Leap 15.2
```
```bash
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
```
```bash
sudo zypper addrepo -f https://download.opensuse.org/repositories/games:tools/openSUSE_Leap_15.3/games:tools.repo
sudo zypper install mangohud
```
#### Flatpak
### Flatpak
If you are using Flatpaks, you will have to add the [Flathub repository](https://flatpak.org/setup/) for your specific distribution, and then, to install it, execute:
##### For flatpak
```
For flatpak:
```bash
flatpak install org.freedesktop.Platform.VulkanLayer.MangoHud
```
To enable MangoHud for all Steam games:
```
```bash
flatpak override --user --env=MANGOHUD=1 com.valvesoftware.Steam
```
# Normal usage
## Normal usage
---
To enable the MangoHud overlay layer for Vulkan and OpenGL, run :
@ -279,7 +290,7 @@ You can find an example config in /usr/share/doc/mangohud
---
### `MANGOHUD_CONFIG` and `MANGOHUD_CONFIGFILE` environment variables
### Environment Variables: **`MANGOHUD_CONFIG`** and **`MANGOHUD_CONFIGFILE`**
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.
@ -304,13 +315,13 @@ Parameters that are enabled by default have to be explicitly disabled. These (cu
| `font_file_text` | Change text font. Otherwise `font_file` is used |
| `font_glyph_ranges` | Specify 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. |
| `no_small_font` | Use primary font size for smaller text like units |
| `width=`<br>`height=` | Customizeable hud dimensions (in pixels) |
| `position=` | Location of the hud: `top-left` (default), `top-right`, `middle-left`, `middle-right`, `bottom-left`, `bottom-right`, `top-center` |
| `offset_x` `offset_y` | Hud position offsets |
| `no_display` | Hide the hud by default |
| `toggle_hud=`<br>`toggle_logging=` | Modifiable toggle hotkeys. Default are `Shift_R+F12` and `Shift_L+F2`, respectively. |
| `width=`<br>`height=` | Customizeable HUD dimensions (in pixels) |
| `position=` | Location of the HUD: `top-left` (default), `top-right`, `middle-left`, `middle-right`, `bottom-left`, `bottom-right`, `top-center` |
| `offset_x` `offset_y` | HUD position offsets |
| `no_display` | Hide the HUD by default |
| `toggle_hud=`<br>`toggle_logging=` | Modifiable toggle hotkeys. Default are `Shift_R+F12` and `Shift_L+F2`, respectively. |
| `reload_cfg=` | Change keybind for reloading the config. Default = `Shift_L+F4` |
| `time`<br>`time_format=%T` | Displays local time. See [std::put_time](https://en.cppreference.com/w/cpp/io/manip/put_time) for formatting help. NOTE: Sometimes apps (or AMDVLK (should be fixed in latest)) may set `TZ` (timezone) environment variable to UTC/GMT |
| `time`<br>`time_format=%T` | Displays local time. See [std::put_time](https://en.cppreference.com/w/cpp/io/manip/put_time) for formatting help. NOTE: Sometimes apps may set `TZ` (timezone) environment variable to UTC/GMT |
| `gpu_color`<br>`cpu_color`<br>`vram_color`<br>`ram_color`<br>`io_color`<br>`engine_color`<br>`frametime_color`<br>`background_color`<br>`text_color`<br>`media_player_color` | Change default colors: `gpu_color=RRGGBB`|
| `alpha` | Set the opacity of all text and frametime graph `0.0-1.0` |
| `background_alpha` | Set the opacity of the background `0.0-1.0` |
@ -324,38 +335,38 @@ Parameters that are enabled by default have to be explicitly disabled. These (cu
| `font_scale_media_player` | Change size of media player text relative to font_size |
| `io_read`<br> `io_write` | Show non-cached IO read/write, in MiB/s |
| `pci_dev` | Select GPU device in multi-gpu setups |
| `version` | Shows current mangohud version |
| `version` | Shows current MangoHud version |
| `fps_limit` | Limit the apps framerate. Comma-separated list of one or more FPS values. `0` means unlimited. |
| `toggle_fps_limit` | Cycle between FPS limits. Defaults to `Shift_L+F1`. |
| `arch` | Show if the application is 32 or 64 bit |
| `histogram` | Change fps graph to histogram |
| `arch` | Show if the application is 32- or 64-bit |
| `histogram` | Change FPS graph to histogram |
| `cpu_text`<br>`gpu_text` | Override CPU and GPU text |
| `log_interval` | Change the default log interval, `100` is default |
| `vulkan_driver` | Displays used vulkan driver, radv/amdgpu-pro/amdvlk |
| `vulkan_driver` | Displays used vulkan driver (radv/amdgpu-pro/amdvlk) |
| `gpu_name` | Displays GPU name from pci.ids |
| `cpu_power`<br>`gpu_power` | Display CPU/GPU draw in watts |
| `cpu_power`<br>`gpu_power` | Display CPU/GPU draw in watts |
| `engine_version` | Display OpenGL or vulkan and vulkan-based render engine's version |
| `permit_upload` | Allow uploading of logs to Flightlessmango.com |
| `upload_log` | Change keybind for uploading log |
| `benchmark_percentiles` | Configure which framerate percentiles are shown in the logging summary. Default is `97,AVG,1,0.1` |
| `benchmark_percentiles` | Configure which framerate percentiles are shown in the logging summary. Default is `97,AVG,1,0.1` |
| `wine` | Shows current Wine or Proton version in use |
| `wine_color` | Change color of the wine/proton text |
| `cpu_mhz` | Shows the CPUs current MHz |
| `gpu_load_change` | Changes the color of the GPU load depending on load |
| `gpu_load_color` | Set the colors for the gpu load change low,medium and high. e.g `gpu_load_color=0000FF,00FFFF,FF00FF` |
| `gpu_load_color` | Set the colors for the gpu load change low,medium and high. e.g `gpu_load_color=0000FF,00FFFF,FF00FF` |
| `gpu_load_value` | Set the values for medium and high load e.g `gpu_load_value=50,90` |
| `cpu_load_change` | Changes the color of the CPU load depending on load |
| `cpu_load_color` | Set the colors for the gpu load change low,medium and high. e.g `cpu_load_color=0000FF,00FFFF,FF00FF` |
| `cpu_load_color` | Set the colors for the gpu load change low, medium and high. e.g `cpu_load_color=0000FF,00FFFF,FF00FF` |
| `cpu_load_value` | Set the values for medium and high load e.g `cpu_load_value=50,90` |
| `core_load_change` | Changes the colors of cpu core loads, uses the same data from `cpu_load_value` and `cpu_load_change` |
| `core_load_change` | Changes the colors of cpu core loads, uses the same data from `cpu_load_value` and `cpu_load_change` |
| `cellpadding_y` | Set the vertical cellpadding, default is `-0.085` |
| `frametime` | Display frametime next to fps text |
| `frametime` | Display frametime next to FPS text |
| `frame_count` | Display frame count |
| `table_columns` | Set the number of table columns for ImGui, defaults to 3 |
| `blacklist` | Add a program to the blacklist. e.g `blacklist=vkcube,WatchDogs2.exe` |
| `resolution` | Display the current resolution |
| `show_fps_limit` | Display the current fps limit |
| `custom_text_center` | Display a custom text centered useful for a header e.g `custom_text_center=FlightLessMango Benchmarks` |
| `show_fps_limit` | Display the current FPS limit |
| `custom_text_center` | Display a custom text centered useful for a header e.g `custom_text_center=FlightLessMango Benchmarks` |
| `custom_text` | Display a custom text e.g `custom_text=Fsync enabled` |
| `exec` | Display output of bash command in next column, e.g `custom_text=/home` , `exec=df -h /home \| tail -n 1`. Only works with legacy_layout=false |
| `round_corners` | Change the amount of roundness of the corners have e.g `round_corners=10.0` |
@ -363,36 +374,41 @@ Parameters that are enabled by default have to be explicitly disabled. These (cu
| `gamemode` | Shows if gamemode is on |
| `battery` | Display current battery percent and energy consumption |
| `battery_icon` | Display battery icon instead of percent |
| `battery_color` | Change the BATT text color |
| `battery_color` | Change the battery text color |
| `fps_only` | Show FPS only. ***Not meant to be used with other display params*** |
| `gamepad_battery` | Display battey of wireless gamepads (xone,xpadneo,ds4) |
| `gamepad_battery_icon` | Display gamepad battery percent with icon. *enabled by default |
| `gamepad_battery` | Display battey of wireless gamepads (xone/xpadneo/ds4) |
| `gamepad_battery_icon` | Display gamepad battery percent with icon. *Enabled by default* |
Example: `MANGOHUD_CONFIG=cpu_temp,gpu_temp,position=top-right,height=500,font_size=32`
Because comma is also used as option delimiter and needs to be escaped for values with a backslash, you can use `+` like `MANGOHUD_CONFIG=fps_limit=60+30+0` instead.
Note: Width and Height are set automatically based on the font_size, but can be overridden.
*Note: Width and Height are set automatically based on the font_size, but can be overridden.*
*Note: RAPL is currently used for Intel CPUs to show power draw with `cpu_power` which may be unreadable for non-root users due to [vulnerability](https://platypusattack.com/). The corresponding `energy_uj` file has to be readable by corresponding user, e.g. by running `chmod o+r /sys/class/powercap/intel-rapl\:0/energy_uj` as root, else the power shown will be **0 W**, though having the file readable may potentially be a security vulnerability persisting until system reboots.*
Note: RAPL is currently used for Intel CPUs to show power draw with `cpu_power` which may be unreadable for non-root users due to [vulnerability](https://platypusattack.com/). The corresponding `energy_uj` file has to be readable by corresponding user, e.g. by running `chmod o+r /sys/class/powercap/intel-rapl\:0/energy_uj` as root, else the power shown will be *0 W*, though having the file readable may potentially be a security vulnerability persisting until system reboots.
## 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)
All vulkan vsync options might not be supported on your device, you can check what your device supports here [vulkan.gpuinfo.org](https://vulkan.gpuinfo.org/listsurfacepresentmodes.php?platform=linux)
Not all vulkan vsync options may be supported on your device, you can check what your device supports here [vulkan.gpuinfo.org](https://vulkan.gpuinfo.org/listsurfacepresentmodes.php?platform=linux)
## Keybindings
- `Shift_L+F2` : Toggle Logging
- `Shift_L+F4` : Reload Config
- `Shift_R+F12`: Toggle Hud
- `Shift_R+F12` : Toggle Hud
## Workarounds
@ -412,11 +428,11 @@ Log files can be uploaded to [Flightlessmango.com](https://flightlessmango.com/g
You can share the created page with others, just link it.
#### Multiple log files
### Multiple log files
It's possible to upload multiple files when using [Flightlessmango.com](https://flightlessmango.com/games/user_benchmarks). You can rename them to your preferred names and upload them in a batch.
These filenames will be used as the legend in the graph.
#### Log uploading walkthrough
### Log uploading walkthrough
![](assets/log_upload_example.gif)
![Gif illustrating the log uploading process](assets/log_upload_example.gif)

Loading…
Cancel
Save