How to Test Your Linux 3D Graphics Hardware, ’90s Style


Key Takeaways

  • glxgears is a Linux demo for testing video hardware performance.
  • To install glxgears on Debian/Ubuntu, use the “mesa-utils” package.
  • Running glxgears displays spinning gears and framerate info, and you can tweak it with command-line options.

Modern 3D graphics on Linux usually work out of the box, but how can you ensure your drivers and hardware are working before your next gaming session? glxgears is a graphics demo that can help you test your graphics adapter.

What Is glxgears?

glxgears is a graphics demo that dates back to the ’90s. It features three interlocking gears, hence the name. The “glx” part comes from the fact that is was developed as part of the GLX library to support OpenGL on X11.

glxgears demo running in Debian on the Xfce desktop.

The demo’s spinning gears have become a de facto hardware test. The frame rate and the motion of the gears tell you if your Linux 3D graphics hardware is set up correctly, especially if you’re going to play a lot of 3D games on Linux. The main reason the demo has stuck around despite 3D graphics becoming much more sophisticated is that it looks really cool. It’s become a graphics meme similar to the Utah teapot.

Installing glxgears

glxgears is popular enough to be included in the package managers of most major distros, but you may have to do some digging to find out which package is in.

On Debian and Ubuntu-based distros, it’s in the mesa-utils. Mesa is an OpenGL driver for Linux. On Debian/Ubuntu, glxgears is one of the supporting utilities in this package.

To install it, type:

        
sudo apt install mesa-utils

How to Run glxgears

Now that you’ve installed glxgears, all you have to do is run it. You can launch glxgears from the command line:

        
glxgears
glxgears demo running on Xfce desktop in Debian with a terminal window showing frame rate updates.

    

You’ll see a window open up with the famous spinning gears demo. Periodically, glxgears will print the frame rate in the terminal you launched it from. This is useful for gauging your graphics hardware’s performance and bragging rights. To stop glxgears, either close the glxgears window or press Ctrl+C. When you close the window, you’ll get a message about a broken connection to the display. Don’t worry, that’s normal.

There are also some command-line arguments you can use on glxgears.

To show the demo in fullscreen mode, use the -fullscreen option. To exit the demo, press the Esc (Escape) key.

        
glxgears -fullscreen

The -info switch will display a bunch of information about your video hardware on the screen before the demo runs, but its really only of interest to developers.

        
glxgears -info

The -stereo switch will display the demo in a mode for stereoscopic goggles. If you have a pair, you might be a time-traveling CAD user from the ’90s. I was unable to test this option since I don’t have these goggles.

        
glxgears -stereo

The -display option will let you specify which display to run glxgears on. The format is the $DISPLAY environment variable. X11 considers a display to consist of at least one monitor, a keyboard, and a pointing device like a mouse, trackball, or touchpad. So multiple monitors connected to one machine controlled by the same keyboard and mouse are a single display. The format for a display in X11 is :[display].[screen]. So the first monitor on your machine is :0.0, and a second monitor on the same display is :0.1.

To show glxgears on a second monitor on the same display:

        
glxgears -display :0.1

glxgears is a quick and fun way to test your graphics hardware on Linux. If you’re gaming, check out how to monitor your GPU stats with an overlay.



Source link

Previous articleUS vs. China: Trump's Aide Predicts New Bitcoin Space Race – Bitcoin.com News
Next articleBitcoin is in a bubble phase; the bubble will burst – Twin Cities