53

How can I verify whether hardware acceleration is available and whether it is enabled for my video card.

Braiam
  • 35,380
  • 25
  • 108
  • 167
Noah Goodrich
  • 685
  • 2
  • 7
  • 9

1 Answers1

76

If you don't already have it, install glxinfo; in APT it's part of mesa-utils:

apt-get install mesa-utils

Run glxinfo and look for a line about direct rendering (another term for hardware acceleration):

> glxinfo | grep "direct rendering"
direct rendering: Yes

If it says "Yes", hardware acceleration is enabled

Michael Mrozek
  • 91,316
  • 38
  • 238
  • 232
  • 1
    In the spirit of teaching a man to fish, could you post some information on what the mesa-utils package and what the glxinfo command does? – Noah Goodrich Aug 21 '10 at 16:50
  • 5
    @Noah I don't actually use Ubuntu, so I know little about its packages, but [Ubuntu's package description](http://packages.ubuntu.com/hardy/mesa-utils) says it "provides several basic GL utilities built by Mesa, including glxinfo and glxgears". [GLX](http://en.wikipedia.org/wiki/GLX) is the X extension for OpenGL; `glxinfo` displays information about that extension, including the current direct rendering state – Michael Mrozek Aug 21 '10 at 16:56
  • 9
    "mesa-utils"? Sounds like something Jar Jar would say :) – Tom Zych Nov 07 '15 at 09:40
  • In FreeBSD, glxinfo is available in the "mesa-demos" package. – LaloLoop Nov 10 '16 at 08:31
  • 1
    Technically "direct rendering" only tells you whether your program is communicating directly with the graphics card driver. "indirect rendering" means you are communicating all 3D to the X server which then communicates with the graphics card. I think at some point it wasn't possible to have hardware acceleration without direct rendering, but now days indirect rendering can also be accelerated. By extension, it could also be possible to directly communicate with a driver that fakes hardware acceleration in the CPU, but i don't know of any instance of this. – M Conrad Jul 03 '17 at 18:04
  • 3
    @MConrad is correct, `llvmpipe` is CPU rendering, but shows as direct rendering (`glxinfo | grep "renderer"`), Either you know that the used renderer is GPU based or running `glxgears` and monitoring GPU usage with a tool like `radeontop` (for AMD) will be a better test – untore Apr 29 '21 at 14:51