LinuxCommandLibrary

glxgears

Benchmark OpenGL performance; display rotating gears

SYNOPSIS

glxgears

DESCRIPTION

glxgears is a classic OpenGL demo program that displays three spinning gears in a window. It serves primarily as a basic visual test to confirm that a system's OpenGL and GLX (OpenGL Extension to the X Window System) rendering capabilities are functioning correctly. It's often used by Linux users to quickly verify that their graphics drivers are properly installed and that 3D acceleration is enabled.

While it provides a frames-per-second (FPS) counter, glxgears is not considered a reliable benchmark for modern GPU performance due to its simplicity and limited workload. Its main value lies in its role as a diagnostic tool for rudimentary 3D graphics setup. It is typically part of the mesa-demos or mesa-utils package.

CAVEATS

  • Not a true benchmark: The FPS reported by glxgears is often very high (thousands or tens of thousands) and does not reflect real-world gaming or demanding 3D application performance. It's a very simple scene with minimal computational load.
  • VSync influence: The reported FPS can be capped by your monitor's refresh rate (VSync), making it appear lower than the GPU's actual capability, or it might run unlocked and show artificially high numbers.
  • Limited diagnostic depth: It only confirms basic GLX/OpenGL functionality, not advanced features or specific driver optimizations.

PURPOSE BEYOND PERFORMANCE

While often misinterpreted as a performance benchmark, glxgears is fundamentally a diagnostic tool. Its primary purpose is to confirm that the OpenGL rendering pipeline, from the application through GLX to the underlying graphics driver and hardware, is operational. A smoothly spinning set of gears indicates that the necessary components for 3D acceleration are present and configured correctly.

INSTALLATION

On most Linux distributions, glxgears is included in a package typically named mesa-demos or mesa-utils. It can be installed using the system's package manager, e.g., sudo apt install mesa-utils on Debian/Ubuntu or sudo dnf install mesa-demos on Fedora.

HISTORY

glxgears originated as part of the GLX (OpenGL Extension to the X Window System) distribution, which was initially developed by Silicon Graphics, Inc. (SGI) to bring OpenGL 3D rendering to the X Window System environment. It has been a staple utility in Unix-like operating systems with X11 for decades, particularly as part of the Mesa 3D Graphics Library project. Its consistent presence makes it a well-recognized, albeit simple, indicator of basic 3D acceleration functionality.

SEE ALSO

glxinfo(1), xdpyinfo(1), xrandr(1)

Copied to clipboard