Sometimes you need to check whether you Linux 3D acceleration is really working (besides the glxinfo
output). This can be quickly done by the glxgears
tool. However, the FPS are often limited to the displays vertical refresh rate (i.e. 60 fps). So the tool becomes more or less useless since even a software render can produce 60FPS glxgears easily on modern CPUs.
I found it rather hard to get a quick and easy solution for this, I answer my own question. Hopefully it saves your time.
The vblank_mode
environment variable does the trick. You should then get several hundreds FPS on modern hardware. And you are now able to compare the results with others.
$> vblank_mode=0 glxgears
If you're using the NVIDIA closed-source drivers you can vary the vertical sync mode on the fly using the __GL_SYNC_TO_VBLANK
environment variable:
~$ __GL_SYNC_TO_VBLANK=1 glxgears Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate. 299 frames in 5.0 seconds = 59.631 FPS ~$ __GL_SYNC_TO_VBLANK=0 glxgears 123259 frames in 5.0 seconds = 24651.678 FPS
This works for me on Ubuntu 14.04 using the 346.46 NVIDIA drivers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With