Why Build from Source?
The repository versions of MangoHud often lag behind the latest development and can have issues detecting Nvidia GPUs properly on Wayland sessions. Building from source ensures you get the latest fixes and features, particularly important for:
- Nvidia GPU support on Wayland
- Latest performance optimizations
- Bug fixes for multi-GPU systems
- Better sensor detection
Prerequisites
- Pop!_OS 24.04 (this guide should also work on Ubuntu 24.04)
- Nvidia GPU with proprietary drivers installed
- Terminal access
- Approximately 10-15 minutes
Step 1: Install Build Dependencies
Open a terminal and install the required packages:
sudo apt update
sudo apt install meson gcc g++ ninja-build cmake python3-pip \
libdbus-1-dev libx11-dev libxnvctrl-dev libvulkan-dev \
glslang-tools git
Step 2: Remove Any Existing MangoHud Installation
If you have MangoHud installed from the repositories, remove it first:
sudo apt remove mangohud
Verify it’s removed:
which mangohud
This should return nothing or “mangohud not found”.
Step 3: Clone the MangoHud Repository
cd ~/Downloads
git clone --recurse-submodules https://github.com/flightlessmango/MangoHud.git
cd MangoHud
The --recurse-submodules flag is important as MangoHud has dependencies that need to be cloned as well.
Step 4: Build MangoHud
./build.sh build
This will compile MangoHud. The process may take a few minutes depending on your system.
Step 5: Package and Install
./build.sh package
sudo ./build.sh install
Note: During installation, you may be prompted to install additional packages. Answer yes to these prompts.
Step 6: Verify Installation
Check that MangoHud installed correctly:
which mangohud
mangohud --version
You should see:
- Path:
/usr/bin/mangohudor/usr/local/bin/mangohud - Version: Something like
v0.8.1-xxx-xxxxxxx(much newer than the repo version)
Step 7: Configure MangoHud
Create the configuration directory:
mkdir -p ~/.config/MangoHud
Create your configuration file:
nano ~/.config/MangoHud/MangoHud.conf
Basic Configuration
Here’s a basic configuration to get started:
gpu_stats
gpu_temp
gpu_core_clock
gpu_mem_clock
gpu_power
vram
cpu_stats
cpu_temp
fps
frame_timing=1
vulkan_driver
Advanced Configuration (Nvidia Multi-GPU Systems)
If you have multiple GPUs (integrated + discrete), you need to specify which GPU to monitor. First, find your Nvidia GPU’s PCI address:
lspci | grep -i nvidia
You’ll see output like:
01:00.0 VGA compatible controller: NVIDIA Corporation ...
Take note of the PCI address (e.g., 01:00.0). Then use this enhanced configuration:
pci_dev=0000:01:00.0
legacy_layout=false
horizontal
background_alpha=0.0
round_corners=10
background_color=000000
font_size=24
text_color=C0C0C0
position=top-left
table_columns=3
gpu_text=GPU
gpu_stats
gpu_load_change
gpu_load_value=50,90
gpu_load_color=FFFFFF,FFAA7F,CC0000
gpu_core_clock
gpu_mem_clock
gpu_temp
gpu_color=75B800
cpu_text=CPU
cpu_stats
cpu_load_change
cpu_load_value=50,90
cpu_load_color=FFFFFF,FFAA7F,CC0000
cpu_mhz
cpu_temp
cpu_color=FA8000
ram
ram_color=C26693
fps
frame_timing
frametime_color=FA8000
fps_color_change
fps_color=B22222,FDFD09,39F900
fps_value=30,60
Important: Replace 0000:01:00.0 with your actual PCI device address from the lspci command.
Save and exit (Ctrl+X, then Y, then Enter).
Step 8: Test MangoHud
Test with a simple Vulkan demo:
mangohud vkcube
Or test with glxgears:
mangohud glxgears
You should see an overlay displaying:
- GPU name and stats
- GPU temperature
- GPU clocks
- VRAM usage
- CPU stats and temperature
- FPS counter
- Frame timing graph
Using MangoHud with Games
Steam Games
To enable MangoHud for a Steam game:
- Right-click the game in your Steam library
- Select Properties
- In the Launch Options field, add:
mangohud %command%
Native Games
Simply prefix the game command with mangohud:
mangohud ./your-game
Lutris Games
Lutris has built-in MangoHud support:
- Right-click the game
- Select Configure
- Go to System options
- Enable Show MangoHud overlay
Troubleshooting
MangoHud not showing GPU temperature
Make sure you’re using the Nvidia proprietary drivers and that nvidia-smi works:
nvidia-smi
If this shows your GPU temperature, MangoHud should work as well.
Wrong GPU being monitored
Make sure you’ve specified the correct pci_dev in your config file using the address from lspci | grep -i nvidia.
MangoHud not found after install
Clear your shell’s command cache:
For bash:
hash -r
For zsh:
rehash
Note About GOverlay
GOverlay Warning: If you want to use GOverlay (a GUI configuration tool for MangoHud), be aware that installing it via apt will pull in the repository version of MangoHud as a dependency, which will conflict with your source-built version.
If you need GOverlay, you have two options:
- Skip GOverlay entirely - Edit your MangoHud.conf file manually (it’s just a text file)
- Advanced: Create a dummy package to satisfy the dependency - This is beyond the scope of this guide
For most users, manually editing the config file is simpler and gives you full control.
Keeping MangoHud Updated
To update to the latest version:
cd ~/Downloads/MangoHud
git pull
git submodule update --init --recursive
./build.sh build
./build.sh package
sudo ./build.sh install
Conclusion
You now have the latest MangoHud built from source with full Nvidia GPU support on Pop!_OS 24.04. The source-built version provides better compatibility with modern systems, especially when using Wayland and Nvidia GPUs.
The configuration file at ~/.config/MangoHud/MangoHud.conf can be customized extensively. Check the official MangoHud documentation for all available options.