How to Benchmark your GPU on Linux
Linux is not famous for its gaming abilities and possibilities, and it is only natural that there aren't many GPU benchmarking tools available with which users can test their graphics hardware. There are however some benchmarking suites that can help you determine the various aspects of your GPU performance with precision. These are very important for the drawing of solid conclusions, technical and numerical comparison, or for the satisfaction of a plain interest on how (well) things work. Technically speaking, all of the available GPU benchmarking tools in Linux only test under the OpenGL renderer of course. While your GPU may be compatible with some versions of Direct3D, it is not possible to test this renderer under Linux.
GLX gears is a popular OpenGL test that is part of the “mesa-utils” package. Install the package on Ubuntu with this command:
sudo apt install mesa-utils
You can invoke it by typing “glxgears” on a terminal.
This will open up a window with an OpenGL rendering of a simple arrangement of three rotating gears. The frame rate is measured and printed out on the terminal every five seconds. This tool is very old, very basic and only tests a small portion of today's OpenGL capabilities. Back in the old days, it was used to determine if the proprietary driver was installed and running properly as open-source drivers were performing awfully enough to be perfectly noticeable during this test. Nowadays, you won't notice any difference between the two (in glxgears).
GL Mark 2
GL mark is a much richer benchmarking tool developed by the kind people behind the Linaro distribution. Contrary to glxgears, glmark offers a rich set of tests that concern different aspects of your graphics unit performance (buffering, building, lighting, texturing etc), allowing for a much more comprehensive and meaningful test. Each test is conducted for 10 seconds and the frame rate is counted individually. In the end, users get a performance score based on all previous tests. I like this tool for its simplicity and flawless operation. You can find it as a pre-built package in most distributions under the name “glmark2”. Install it with:
sudo apt-get install glmark2
After installing it, you may run it by typing “glmark2” on a terminal.
Unigine Benchmark Products
Finally, for users that seek something more advanced than the previous two tools, there are four benchmark tools that use the Unigine 3D engine. These are the Valley, Heaven, Tropics, and Sanctuary which offer free versions that can be downloaded from the Unigine website. These benchmarking tools boast real-time ambient occlusion, interplaying lights from different sources, HDR renderings, realistic water, and a dynamic sky with atmospheric light scattering. Users may also set the anti-aliasing levels, texture quality and filtering, anisotropy, and shader quality. Besides hitting that “benchmark” button that will test your hardware in 10 steps, you may also wander around freely, change the time of day (which changes the lighting of the world) and accurately determine the conditions that “bend” your hardware the most.