Linux Find Out Graphics Card Installed In My System

Tutorial details Difficulty Easy (rss) Root privileges Yes Requirements None Time 5m

ADVERTISEMENTS



lspci command lshw command grep command update-pciids command GUI tools such as hardinfo and gnome-system-information command.

Linux Find Out Graphics Card Information

I am a new Linux system user and Ubuntu Linux. I do not want to open up the computer hardware to just see the make and model of the graphics card in a system. How do I find out which graphics card installed in my Linux desktop or laptop system?You do not have to open the hardware, desktop, laptop computer powered by Linux to see the make and model of the graphics card in a system. There is a direct method provided by using lspci and other commands on Linux to get hardware information. You need to use the following commands to find out graphics cards in Linux using the CLI and GUI methods:

First you need to update the PCI ID database.

Download the latest version of the PCI ID list

Grab the current version of the pci.ids file from the Internet:

$ sudo update-pciids

OR

# update-pciids

Sample outputs:

[sudo] password for vivek: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 259k 100 259k 0 0 54946 0 0:00:04 0:00:04 --:--:-- 55497 Done.

How to check graphics card on Linux

Type the following lspci command. It will usually tell you the vendor and model of your card. Open the Terminal/xterminal or shell prompt and type the command:

$ lspci

$ lspci -v

$ lspci -v | less



Sample outputs:

00:01.0 PCI bridge: Broadcom BCM5785 [HT1000] PCI/PCI-X Bridge 00:02.0 Host bridge: Broadcom BCM5785 [HT1000] Legacy South Bridge 00:02.1 IDE interface: Broadcom BCM5785 [HT1000] IDE 00:02.2 ISA bridge: Broadcom BCM5785 [HT1000] LPC 00:03.0 USB Controller: Broadcom BCM5785 [HT1000] USB (rev 01) 00:03.1 USB Controller: Broadcom BCM5785 [HT1000] USB (rev 01) 00:03.2 USB Controller: Broadcom BCM5785 [HT1000] USB (rev 01) 00:05.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27) 00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration 00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map 00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller 00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control 01:0d.0 PCI bridge: Broadcom BCM5785 [HT1000] PCI/PCI-X Bridge (rev b2) 01:0e.0 RAID bus controller: Broadcom BCM5785 [HT1000] SATA (Native SATA Mode) 02:03.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 10) 02:03.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 10)

Look for video controller / vga / 3D keywords in above output listing. Please note that if you do not see your card, try updating pci database. It is a good idea to run update-pciids command to fetches the current version of the pci.ids file from the primary distribution site and installs it. You must run update-pciids command as root user:

$ sudo update-pciids

OR

# update-pciids

Example: Find out the model of my graphics card on my Laptop powered by Linux

Type the following lspci command along with grep command or egrep command:

$ lspci | grep -i --color 'vga\|3d\|2d'

## using egrep ##

$ lspci -v | egrep -i --color 'vga|3d|2d'

Sample outputs:

01:00.0 VGA compatible controller: NVIDIA Corporation GK104GLM [ Quadro K5000M ] (rev a1)

Please note the device ID # 01:00.0. Now, to get detailed information, enter:

$ sudo lspci -v -s 01:00.0

Sample outputs:

How to get the GPU info on Linux using GUI tools

Need to identify the Graphics Processing Unit (GPU) in a Linux system using GUI tools? Try the following commands.

Hardware information GUI tool

Under Ubuntu or any other Linux distribution, open hardware information GUI tool by clicking on:

System > Preferences > Hardware information

Sample outputs:

On Gnome 3 based distro open settings and click on the details and choose About:



hardinfo – System Information GUI tool

You can install hardinfo with yum command or apt-get command:

$ sudo apt-get install hardinfo

Run it as follows:

$ hardinfo

Sample outputs:

lshw command

The lshw command provides detailed information on the hardware configuration of the machine. You can install it with yum or apt-get command:

# lshw -short

# lshw -short | grep -i --color display

Sample outputs:

/0/100/1/0 display GK104GLM [Quadro K5000M]

OR get detailed information:

# lshw -class display

Sample outputs:

*-display description: VGA compatible controller product: GK104GLM [Quadro K5000M] vendor: NVIDIA Corporation physical id: 0 bus info: pci@0000:01:00.0 version: a1 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress vga_controller bus_master cap_list rom configuration: driver=nvidia latency=0 resources: irq:16 memory:f5000000-f5ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f6000000-f607ffff

A note about Nvidia GPU users with Nvidia binary drivers

Just type the following command to get detailed information about NVIDIA GPU card:

$ nvidia-smi

Sample outputs:

Mon Jan 13 04:08:34 2014 +------------------------------------------------------+ | NVIDIA-SMI 5.319.32 Driver Version: 319.32 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Quadro K5000M Off | 0000:01:00.0 On | N/A | | N/A 41C P8 N/A / N/A | 64MB / 4095MB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Compute processes: GPU Memory | | GPU PID Process name Usage | |=============================================================================| | No running compute processes found | +-----------------------------------------------------------------------------+

We can use GUI tool called nvidia-settings. It is a tool for configuring the NVIDIA graphics driver and give informaion. It operates by communicating with the NVIDIA X driver, querying and updating state as appropriate. This communiction is done via the X extensions. For example, open the terminal app and then type:

$ nvidia-settings



Linux Find Out GPU Information Using the glxinfo

Run the following glxinfo command on Linux to find GPU name, vendor, video card RAM size and more:

$ glxinfo -B



Finding graphics cards on Linux Laptops

Many laptops have two GPUs like integrated Intel and dedicated Nvidia/AMD card. In any case you need to use the lspci command as follows:

sudo lspci -v | more

sudo lspci -v | most

sudo lspci -v | grep -i vga

00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile) (rev 02) (prog-if 00 [VGA controller]) 01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1) (prog-if 00 [VGA controller]) Bus: primary=05, secondary=2d, subordinate=51, sec-latency=0

So I have Hybrid-graphics. It is nothing but two graphics cards on same computer. Typically Laptop comes with two graphic cards with different power consumptions on a single system. In this case I have both Intel and Nvidia GPUs. In such case I can select card using the prime-select command:

prime-select intel

prime-select nvidia

prime-select on-demand

prime-select query

See lspci command man page here for more info and read NVIDIA Optimus and Bumblebee for details about NVidia using hybrid graphics with NVidia’s proprietary driver here.

Conclusion

This page listed various Linux commands to find out graphics card (GPU) using the command line options. Once you know about GPUa desktop or laptop computer has, you can install the correct driver on Linux.