In Operation
We can cap the FPS of a game by using the strangle command. For example:
$ strangle 60 /path/to/game
If you’re running on a laptop, you can also define a different framerate cap when running on battery power with the STRANGLE_FPS_BATTERY
environment variable.
With Steam, we can limit the FPS in a few simple steps. Right click a game in your library. Select Properties. From Shortcut, add the entry strangle %command%
in the Launch Options field.
Here’s an image showing that we’ve set a game to use 100 FPS.
You can use libstrangle with other platforms. For example, in Lutris you can set the FPS limit field.
libstrangle lets you control Vertical sync with the STRANGLE_VSYNC env var.
Summary
libstrangle offers a convenient way to limit a game’s FPS. It works well but you may have to define the limit for each game.
It would be far better if we could set a global limit for all games regardless of game launcher, as it’s possible to do in Windows with the NVIDIA Control Panel. Sadly, NVIDIA Settings in Linux doesn’t offer this functionality.
Website: gitlab.com/torkel104/libstrangle
Support:
Developer: Björn Spindel
License: GNU General Public License v3.0
libstrangle is written in C. Learn C with our recommended free books and free tutorials.
Pages in this article:
Page 1 – Introduction and Installation
Page 2 – In Operation and Summary
All tools in this series:
Awesome Linux Game Tools | |
---|---|
Heroic Games Launcher | Games launcher for Epic Games and GOG |
Steam | Large digital library of PC games |
libstrangle | Utility to cap the frames per second of games |
gpu-screen-recorder-gtk | GTK frontend to GPU Screen Recorder |
MangoHud | Vulkan and OpenGL overlay to help you monitor FPS and more |
NoiseTorch-ng | Suppresses noise perfect for gamers live streaming/recording |
ProtonUp-Qt | GUI for easy installation of custom builds of Proton and more |
GOverlay | GUI to manage MangoHud, vkBasalt and ReplaySorcery |
noise-suppression-for-voice | Noise suppression plugin based on RNNoise |