How to check graphics card on Linux

The increasing popularity of Linux and Linux-native gaming platforms such as Steam is bringing mainstream gaming to Linux. If you are a hardcore gamer, you will probably pay great attention to the performance of the graphics card on your system. Many of you may be willing to shell out a couple of hundred dollars for high-end video cards to enjoy maximum gaming experience.

In this tutorial, I will describe how to find information about a video card and video driver used in Linux system.

Method One

The first method to determine what graphics card you have is by using lspci which a command-line tool for showing all PCI devices.

Before using lspci, it's a good idea to update PCI ID list with the latest version as follows.

$ sudo update-pciids

Then use the following command to show the vendor/model names of your video card.

$ lspci | grep -E "VGA|3D"
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)

Once the PCI domain of your card is identified (e.g., 00:02.0 in the above example), you can get more detailed information about your card by using the following command. The example output shows that the video card has 256MB video RAM.

$ sudo lspci -v -s 00:02.0
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
	Subsystem: Dell Device 0569
	Flags: bus master, fast devsel, latency 0, IRQ 45
	Memory at b0000000 (64-bit, prefetchable) [size=256M]
	Memory at c0000000 (64-bit, non-prefetchable) [size=4M]
	I/O ports at 3000 [size=64]
	Expansion ROM at  [disabled]
	Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [d0] Power Management version 2
	Capabilities: [a4] PCI Advanced Features
	Kernel driver in use: i915
	Kernel modules: i915

Method Two

Another way to detect a video card on Linux is via lshw command.

$ sudo lshw -c video
       description: VGA compatible controller
       product: 3rd Gen Core processor Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 09
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:45 memory:c0000000-c03fffff memory:b0000000-bfffffff ioport:3000(size=64)

Method Three

You can also get information about a graphics card via a GUI program called hardinfo.

To install hardinfo on Debian, Ubuntu or Linux Mint:

$ sudo apt-get install hardinfo

To install hardinfo on RedHat-based systems, use yum command. Note that on CentOS or RedHat, you first need to enable Repoforge repository before running yum.

$ sudo yum install hardinfo

Once hardinfo is installed, launch it as follows.

$ hardinfo

Then navigate to "Devices" -> "PCI Devices" -> "VGA compatible controller" to view video card information.

Find What Video Driver is Used on Linux

To identify the name of video driver used, you can use lshw command described above.

$ sudo lshw -c video | grep configuration
       configuration: driver=i915 latency=0

The name of video driver is shown in "driver=<XXXX>". Then you can check the detail of the video driver as follows.

$ modinfo i915
filename:       /lib/modules/3.5.0-18-generic/kernel/drivers/gpu/drm/i915/i915.ko
license:        GPL and additional rights
description:    Intel Graphics
author:         Tungsten Graphics, Inc.
license:        GPL and additional rights
. . . . .

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

The following two tabs change content below.
Dan Nanni is the founder and also a regular contributor of He is a Linux/FOSS enthusiast who loves to get his hands dirty with his Linux box. He likes to procrastinate when he is supposed to be busy and productive. When he is otherwise free, he likes to watch movies and shop for the coolest gadgets.

12 thoughts on “How to check graphics card on Linux

  1. I would also include the instruction lspci | grep 3D because some hybrid setups identify only the integrated card with lspci | grep VGA

  2. On systems with AMD/ATI cards, "lshw -c video | grep" configuration outputs: "configuration: driver=fglrx_pci latency=0". You can't type: "modinfo fglrx_pci" as it gives "ERROR: modinfo: could not find module fglrx_pci".

    Both the Open Source and Proprietary driver requires you to type: "modinfo radeon" which gives the expected output. I imagine Nvidia is the same.

  3. lspci | grep "VGA|3D|Display"
    00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
    01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Mars [Radeon HD 8670A/8750M]

  4. Yo great article, even though I already knew more than I expected. It reinforced what I was already doing and covered more than I expected. Now on to figuring out if Cinnamon is using GPU accelaration or not.

    Also, another thing might being worth grepping for along with VGA and 3D is Graphic

  5. Oh and one more thing is using the prgoram "inxi". I think it comes preinstalled on most systems. I dont know but I was in IRC once and someone told me to type it in to my IRC screen and it posted everything about my graphics right into the IRC session. Which is why I assume it comes preinstalled

  6. The amount of memory in the PCI output are *not* for the whole VRAM. This is only the part that is directly accessible to the CPU. The GPU can access the whole VRAM, but that is not in the PCI info.

Leave a comment

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