Awesome Linux Game Tools is a series that’s targeted at Linux gamers. The first article in the series showcased Heroic Games Launcher, a free and open source games launcher for Epic Games and GOG.
Making sure your graphics card’s frames per second (FPS) output matches the refresh rate of your monitor shouldn’t be an issue. But sometimes it can be. libstrangle is a Linux utility that lets you cap the FPS of a game. It’s free and open source software written in C.
Why would you want to limit the FPS? Here are a couple of examples.
- Screen tearing. When a graphics card and a monitor aren’t in sync, screen tearing can ruin the immersive gaming experience. It can occur when the GPU outputs a higher FPS than a monitor’s refresh rate. The monitor attempts to show more frames than it can, and sometimes displays two or more frames simultaneously. Screen tearing presents less of an issue these days. You can try setting the maximum FPS to your display’s refresh rate if you don’t have a G-Sync or FreeSync-enabled monitor with variable refresh rates. Many games also offer vertical synchronization and triple buffering. With triple buffering enabled, the game renders a frame in one back buffer. While it is waiting to flip, it can start rendering in the other back buffer. The result is that the frame rate is typically higher than double buffering (and Vsync enabled) without any tearing. But lots of monitors don’t have G-Sync or FreeSync, or a specific game doesn’t offer vertical synchronization/triple buffering.
- Save energy and reduce heat generation. For a specific game, your graphics card may generate FPS far exceeding the capabilities of the monitor. Having a game running with say 300 FPS on a monitor only capable of displaying 144 FPS is just wasting electricity. Given the current high price of electricity, this is hardly thrifty. And if you’re gaming on a laptop running on battery power, you’re also wasting battery life. You might be happy running a game with a lower FPS, and sometimes even lower than the monitor/screen can display to extend gameplay when away from a power outlet.
For our Manjaro systems, there’s a package in the Official Repositories (community), so installation is straightforward. Issue the command:
$ sudo pacman -S libstrangle
If your distro doesn’t have a convenient package, building the software is a few simple steps. Install the dependencies (see the project’s GitLab page). Next clone the project’s repository.
$ git clone https://gitlab.com/torkel104/libstrangle
Change into the newly created directory.
$ cd libstrangle
Build the software with the command:
Install with the command:
$ sudo make install