3D hardware acceleration on Linux allows the GPU to execute OpenGL workloads instead of relying on the CPU, improving responsiveness in window managers, compositors, and games by raising frame rates and smoothing animations.
Desktop environments typically sit on top of the Mesa driver stack (or proprietary vendor drivers) together with an X11 or Wayland display server, and expose diagnostic tools such as glxinfo and glxgears that report how rendering is handled.
Results vary across physical hosts, NVIDIA or AMD drivers, and virtualized environments like QEMU, KVM, and VirtualBox, so checking the current renderer and direct rendering state helps distinguish configuration problems from hardware or virtualization limitations.
Steps to verify and test 3D hardware acceleration in Linux:
- Open a terminal on the Linux system.
- Install the mesa-utils package on Ubuntu and other Debian derivatives.
$ sudo apt update && sudo apt install --assume-yes mesa-utils
On Fedora and other RHEL derivatives, install mesa-demos with sudo dnf install mesa-demos; on openSUSE install Mesa-demo-x with sudo zypper install --no-confirm Mesa-demo-x.
- Run the glxinfo tool to check whether direct rendering is enabled.
$ glxinfo | grep "direct rendering" direct rendering: Yes
The value Yes indicates that direct rendering is active, but confirm the renderer string because software renderers like llvmpipe can still report Yes.
- Inspect the renderer string to confirm which GPU and driver are in use.
$ glxinfo | grep "renderer string" OpenGL renderer string: llvmpipe (LLVM 20.1.2, 128 bits)
The renderer string typically shows the active GPU and driver, such as Mesa on integrated graphics or proprietary NVIDIA drivers.
- Launch glxgears to perform a simple OpenGL frame rate test.
$ glxgears Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate. 7125 frames in 5.0 seconds = 1424.994 FPS
Vertical synchronization limits the frame rate to the monitor refresh rate; disabling it with vblank_mode=0 glxgears (or setting __GL_SYNC_TO_VBLANK=0 for proprietary NVIDIA drivers) may cause inflated FPS numbers and higher CPU usage during testing.
- Optionally run glxgears with vertical synchronization disabled to observe the maximum frame rate.
$ vblank_mode=0 glxgears
Running without vertical sync can stress the GPU and CPU and does not reflect real-world performance in applications that respect refresh limits.
- Confirm that the system feels responsive in everyday use and that applications or games relying on OpenGL no longer exhibit sluggish animations or unusually low frame rates.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
