Home / Guides / How to check your graphics card on Linux

How to check your graphics card on Linux

A few terminal commands cover almost every Linux system. Each one is short and none of them change anything.

In a hurry? The checker on the home page answers in one click.

lspci

lspci | grep -i -E "vga|3d|display"

Each line is a graphics device. A laptop with two shows two lines. If the command is not found, install the pciutils package.

Which driver is in use

lspci -k | grep -A 3 -i -E "vga|3d"

The line starting Kernel driver in use tells you whether you are on an open driver, such as amdgpu, i915 or nouveau, or on the maker's own, such as nvidia.

What OpenGL sees

glxinfo -B

The package is mesa-utils on Debian and Ubuntu and mesa-demos on Fedora. Look at the OpenGL renderer string and the Video memory line.

NVIDIA cards

nvidia-smi

Shows the card, the driver version and how much memory is in use. It only works when the NVIDIA driver is installed.

Laptops with two graphics chips

Programs run on the built-in chip unless you ask otherwise. To check the other one with open drivers:

DRI_PRIME=1 glxinfo -B | grep "OpenGL renderer"

NVIDIA's own driver uses different settings for the same idea:

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo -B | grep "OpenGL renderer"

Without the terminal

Most desktops show it under Settings, then About. GNOME lists it as Graphics, and KDE as Graphics Processor.

Questions

The checker says llvmpipe. What does that mean?

llvmpipe is software drawing from Mesa. It appears when no graphics driver is loaded, inside some virtual machines, or in a very minimal install. Install the driver for your card and it should change.

Does the browser show the same thing as glxinfo?

Usually it matches. Chrome adds some extra wording around the name, and the checker on the home page tidies that up.

Is lspci safe to run?

Yes. It only reads the list of hardware. It does not change anything and does not need administrator rights for this use.

Related