MangoHud
MangoHud copied to clipboard
[Feature] Limit FPS when in background
Just like the "Background Application Max Frame Rate" option the NVIDIA control panel on Windows provides, this would set a custom FPS limit if a game is out of focus. It's one feature I greatly miss on Linux and would help with keeping the resource usage of games down when there's no reason to still run them at full speed.
I'd like to chime in on this request too, it would be super handy for multi-boxing.
there is actually the -o option in gamescope, but for me it is not working - https://github.com/ValveSoftware/gamescope#options
Here is a script to toggle for anyone else who would like it:
#!/bin/bash
CONFIG_FILE="$HOME/.config/MangoHud/MangoHud.conf"
FPS_HIGH=144
FPS_LOW=10
if grep -q "fps_limit=$FPS_HIGH" "$CONFIG_FILE"; then
sed -i "s/fps_limit=$FPS_HIGH/fps_limit=$FPS_LOW/" "$CONFIG_FILE"
notify-send -t 2000 "MangoHud" "FPS limit set to $FPS_LOW"
else
sed -i "s/fps_limit=$FPS_LOW/fps_limit=$FPS_HIGH/" "$CONFIG_FILE"
notify-send -t 2000 "MangoHud" "FPS limit set to $FPS_HIGH"
fi
Create .config/MangoHud/MangoHud.conf and write fps_limit=144 to MangoHud.conf and save. For ease of use create a panel and add a launcher for the script or assign it to a shortcut. Make sure to have mangohud %command%
as launch property in steam. This feature would be perfect for games where you want to always be online but afk/doing something else, and the game doesn't natively have it.
You don't need a script to toggle fps limits, this is already a feature in mangohud
its not working in wayland when i tried this last time
@flightlessmango how can i do this ? let me know please
@koloved
its not working in wayland when i tried this last time
We've recently added wayland keybinds, so that's probably why it didn't work