Linux: Test If My Graphics Card Has OpenGL Support Or Not

OpenGL (Open Graphics Library) is a standard specification defining a cross-language, cross-platform API for writing applications that produce 2D and 3D computer graphics. How can I test if my graphics card has OpenGL support under Linux?

You need to use the glxinfo commmand to get information about the OpenGL and GLX implementations running on a given X display. The information includes details about the server and client side GLX implementation, the OpenGL and GLU implementations as well as a list of available GLX visuals. Open a shell prompt (terminal) and type the following command:


glxinfo | less
glxinfo | grep something
glxinfo | grep render

Sample Outputs:

direct rendering: Yes
OpenGL renderer string: Quadro FX 570/PCI/SSE2
    GL_NV_depth_buffer_float, GL_NV_conditional_render, GL_NV_depth_clamp, 
    GL_NV_vertex_program3, GL_NVX_conditional_render, GL_SGIS_generate_mipmap,

You can also specify the X display to interrogate, enter:

glxinfo -display :X.Y | grep render
glxinfo -display :0.0 |  grep render

🥺 Was this helpful? Please add a comment to show your appreciation or feedback.

nixCrat Tux Pixel Penguin
Hi! 🤠
I'm Vivek Gite, and I write about Linux, macOS, Unix, IT, programming, infosec, and open source. Subscribe to my RSS feed or email newsletter for updates.

7 comments… add one
  • Ashutosh Aug 23, 2009 @ 17:50

    mistakenly i have installed some app or made some changes unknowingly which has disabled opengl on my card/ubuntu. graphical games/apps which ran earlier fine no longer run now. is there any way to re-enable opengl now on ubuntu


  • 🛡️ Vivek Gite (Author and Admin) nixCraft Aug 23, 2009 @ 18:08


    Section "Module"
        Load           "dbe"
        Load           "extmod"
        Load           "type1"
        Load           "freetype"
        Load           "glx"
  • tuantub Aug 23, 2009 @ 22:20

    a correction:
    glxinfo | less
    instead of
    glxinfo | lsss

  • 🛡️ Vivek Gite (Author and Admin) nixCraft Aug 24, 2009 @ 7:36


    Thanks for the heads-up!

  • neeraj sinha Aug 24, 2009 @ 13:35

    This was the output in my Ubuntubox:

    neeraj@nee-pc:~$ glxinfo |grep rende
    get fences failed: -1
    param: 6, val: 0
    direct rendering: Yes
    OpenGL renderer string: Mesa DRI Intel(R) 945G GEM 20090326 2009Q1 RC2 x86/MMX/SSE2

    Is it fine??

  • 🛡️ Vivek Gite (Author and Admin) nixCraft Aug 24, 2009 @ 13:41

    direct rendering: Yes
    OpenGL renderer string: Mesa DRI Intel(R) 945G GEM 20090326 2009Q1 RC2


  • cbemerine Oct 25, 2010 @ 18:26

    I love ZaReason! Here in the US, those that do not want to learn the internals of hardware that will run Linux out of the box can simply use a Linux vendor that knows Linux hardware. Two of the best are ZaReason and System 76. Often the lower price of the box offsets the shipping cost, at least in the continental United States. I do not know about overseas.

    Linux hardware vendors know what hardware does and does not work with Linux now. Everything works with Linux eventually, that is the reason Linux has more device drivers than any other operating system in the history of computers. Its sad that some proprietary vendors hamper their product offerings to only work with one operating system and not all. We all hate waiting for proprietary companies to wait a month or more in releasing their proprietary drivers.

    Even more important, even if you like Windows, not my preference, if your hardware runs Linux out of the box on day 1, it will run Windows. The converse is often not true as many hardware vendors have been sued or are currently fending off lawsuits because they modified their BIOS, chips on their hardware or device drivers to run only/better with Windows. All these headaches can be avoided if you purchase from a Linux vendor. Having met the owners of ZaReason, they are very active in the Linux community, and are usually attending Linux Conferences across the country, especially on the West Coast and in California specifically, I can recommend them very highly. You can meet them at SCaLE in Los Angeles every year.

    I have a ZaReason ION Breeze, Quad Core, with an Nvidia GPU card and am currently running Ubuntu 10.10 (will be running other distros soon in virtual slices), here is the result of the glxinfo, greping for rende…. in case it helps someone.

    :~$ glxinfo | grep rende
    direct rendering: Yes
    OpenGL renderer string: ION/PCI/SSE2
    GL_NV_conditional_render, GL_NV_copy_depth_to_color, GL_NV_copy_image,
    GL_NVX_conditional_render, GL_NVX_gpu_memory_info,

    Thank you, posting the command to help others quickly determine if their hardware will support OpenGL or not is a big help!

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Your comment will appear only after approval by the site admin.