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

by on August 23, 2009 · 7 comments· LAST UPDATED August 24, 2009

in , ,

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
glxinfo | less
glxinfo | grep something
glxinfo | grep rende

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
 
TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 7 comments… read them below or add one }

1 Ashutosh August 23, 2009 at 5:50 pm

hi,
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

thanks,
ashutosh

Reply

2 nixCraft August 23, 2009 at 6:08 pm

/etc/X11/xorg.conf

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Reply

3 tuantub August 23, 2009 at 10:20 pm

a correction:
glxinfo | less
instead of
glxinfo | lsss

Reply

4 nixCraft August 24, 2009 at 7:36 am

@tuantub

Thanks for the heads-up!

Reply

5 neeraj sinha August 24, 2009 at 1:35 pm

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
neeraj@nee-pc:~$

Is it fine??

Reply

6 nixCraft August 24, 2009 at 1:41 pm

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

Yes.

Reply

7 cbemerine October 25, 2010 at 6:26 pm

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!

Reply

Leave a Comment

Tagged as: , , , , , , , , , , ,

Previous Faq:

Next Faq: