LinuxCommandLibrary

glxinfo

Report OpenGL information

SYNOPSIS

glxinfo [options]

Examples:
glxinfo
glxinfo -i
glxinfo -B -D -E -F
glxinfo --display :1.0

PARAMETERS

-i, --info
    Prints detailed GLX and OpenGL information. This is often the default behavior when no options are specified.

-v, --verbose
    Prints verbose information, including version details for GLX and OpenGL libraries.

-b
    Prints boolean capabilities of the GLX visual and OpenGL context.

-l
    Prints verbose GLX limits and capabilities.

-B
    Prints information about GLX Framebuffer Configurations (FBConfigs), including pixel format details.

-D
    Prints detailed GLX protocol information, useful for low-level debugging.

-E
    Prints a list and details of supported GLX extensions.

-F
    Prints a list and details of supported OpenGL extensions.

-I
    Prints information about the OpenGL implementation, such as vendor, renderer, and version strings.

-L
    Prints information about OpenGL limits, such as maximum texture sizes and viewport dimensions.

-M
    Prints information about OpenGL matrices and transformations.

-O
    Prints information about OpenGL objects (e.g., textures, shaders, buffers).

-P
    Prints information about OpenGL pixel formats.

-R
    Prints information about OpenGL rendering capabilities and modes.

-S
    Prints information about the current OpenGL state.

-V
    Prints information about OpenGL vertex arrays.

-W
    Prints information about OpenGL windows and visual configurations.

-X
    Prints information about OpenGL transforms.

-Z
    Prints information about OpenGL Z-buffer (depth buffer).

--display <display>
    Specifies the X server display to connect to, e.g., :0.0 or localhost:1.0.

DESCRIPTION

glxinfo is a command-line utility used to display comprehensive information about the GLX (OpenGL Extension to the X Window System) server extension, the installed OpenGL libraries, and the rendering capabilities of the graphics hardware. It provides crucial details such as whether direct rendering is enabled, the OpenGL vendor, renderer, version, and a full list of supported GLX and OpenGL extensions. This tool is indispensable for users and developers to diagnose graphics driver issues, verify hardware acceleration, and ensure that the correct OpenGL environment is configured for demanding applications. Its output helps identify bottlenecks or misconfigurations in the graphics stack, making it a primary diagnostic tool for X Window System OpenGL environments.

CAVEATS

glxinfo requires an X server to be running and correctly configured with GLX. Its output can be very extensive, sometimes hundreds of lines, making it challenging to parse manually. Key information like 'Direct rendering: Yes' is crucial for confirming hardware acceleration. If direct rendering is 'No', it indicates that software rendering is in use, often due to missing or misconfigured graphics drivers. The command's utility is limited by the availability of an X display and proper graphics stack setup.

INTERPRETING KEY OUTPUT

When running glxinfo, look for the following lines to quickly assess your graphics setup:

  • "Direct rendering: Yes": Confirms that hardware acceleration is active. If it says "No", your system is likely using software rendering.
  • "OpenGL vendor string": Identifies the GPU manufacturer (e.g., NVIDIA Corporation, Intel, AMD).
  • "OpenGL renderer string": Specifies the exact GPU model or driver in use (e.g., GeForce RTX 3080/PCIe/SSE2, Mesa Intel(R) HD Graphics 620).
  • "OpenGL version string": Shows the supported OpenGL API version (e.g., 4.6 (Core Profile) Mesa 23.1.9).
  • "GLX extensions" and "OpenGL extensions": Lists the various features and capabilities supported by your GLX and OpenGL implementation.

DEBUGGING GRAPHICS ISSUES

glxinfo is an invaluable first step in debugging graphics-related problems. If applications are slow, crashing, or failing to render correctly, running glxinfo can reveal if hardware acceleration is missing or if an outdated/incorrect driver is loaded. It helps verify that the system's OpenGL capabilities match the requirements of the application. For multi-GPU systems (e.g., NVIDIA Optimus or AMD switchable graphics), glxinfo can be used with environment variables like __GLX_VENDOR_LIBRARY_NAME or DRI_PRIME=1 to determine which GPU is active for rendering.

HISTORY

glxinfo is part of the mesa-demos or similar OpenGL utility packages, reflecting its role as a diagnostic tool for the Mesa 3D Graphics Library. GLX, the OpenGL Extension to the X Window System, was developed to integrate OpenGL's 3D rendering capabilities with the 2D X Window System, allowing OpenGL applications to render directly to X windows. glxinfo has been a fundamental tool since the early days of OpenGL on Linux/UNIX-like systems, evolving alongside OpenGL and GLX to provide insights into the graphics hardware and software stack, ensuring compatibility and optimal performance for graphics-intensive applications.

SEE ALSO

glxgears(1), xdpyinfo(1), xrandr(1), lspci(8)

Copied to clipboard