How to check which GPU is installed on Linux

Do you need to identify the graphics processing unit (GPU) in a Linux computer? This is how you can identify the graphics card from the command line and in GNOME.

The first step

You’ve probably already been there. You are being drafted to serve a relative or work colleague who is not a technician and something is telling you it won’t be painless. Still you take it! You quickly realize that there is likely a problem with the display driver. Hey, maybe that’s not that bad after all! But then your short-lived glimmer of hope is stifled when you ask: “What kind of graphics card do you have?”

The deer-in-headlamp phrase you get in response speaks volumes. In order to support something, you need to know what it is. How do you recognize the graphics card in a Linux computer?

Let’s take the worst-case scenario and say the drivers for the graphics card were never installed so you can’t even look at them for a clue. It does not matter! You can start this puzzle either from the command line or from the Graphical user interface (GUI).

lspci and the PCI ID database

the Connection of peripheral components The (PCI) standard is a common protocol that you can use to communicate with internal peripherals such as graphics cards. the PCI ID repository maintains a database of all known IDs for PCI devices. That said, if you know some information about the device, there is a lot you can do to look it up.


You can use the … lspci Command to list the PCI devices installed on a Linux computer, as well as some information about it.

Wouldn’t it be great if we could have the PCI database and the lspci Command together? Well, actually, that’s exactly what happens when you do that lspci Command. It checks a local copy of the PCI database to identify the discovered PCI devices. Before we begin, it is advisable to update the local copy of the PCI database.

Write the update-pciids command to do just that:

sudo update-pciids

The latest version of the database is fetched for us and we can now use the lspci Command. There will be a lot of output so let’s channel it into less. the -v (detailed) option says lscpi to give us as much information as possible. We use sudo to make sure the information is as detailed as possible.

We enter our command like this:

sudo lspci -v | less

The results appear in less. If you use the forward slash (/), you activate the less Search function.

Enter “VGA” in uppercase letters and press Enter.

Enter

less searches for the string “VGA” and shows you the first matches it finds. From this point on, you can scroll or page forward to see how many graphics cards are lspci found.

For this article, we did our research on a variety of Linux distributions that were included in the VirtualBox virtual machines. Virtual machines naturally have virtual graphics cards.


So you can see example of the real-world results, here is the output from the (physical) host computer:

26:00.0 VGA compatible controller: NVIDIA Corporation GP108 [GeForce GT 1030] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Gigabyte Technology Co., Ltd GP108 [GeForce GT 1030]
Flags: bus master, fast devsel, latency 0, IRQ 97
Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
Memory at e0000000 (64-bit, prefetchable) [size=256M]
Memory at f0000000 (64-bit, prefetchable) [size=32M]
I/O ports at e000 [size=128]
Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Legacy Endpoint, MSI 00
Capabilities: [100] Virtual Channel
Capabilities: [250] Latency Tolerance Reporting
Capabilities: [128] Power Budgeting <?>
Capabilities: [420] Advanced Error Reporting
Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
Capabilities: [900] Secondary PCI Express <?>
Kernel driver in use: nouveau
Kernel modules: nouveau

It immediately gave us a lot of good information!

The card is an NVIDIA Corporation GP108 [GeForce GT 1030], and after a few seconds with a search engine we found it NVIDIA tech page for this device. The “[VGA controller]”At the end of the first line indicates that the graphics card is” ready for operation “. This is useful information when you have more than one card installed on a computer.

The lshw command

You can also use the lshw Command to list the hardware installed on a Linux computer. It also reports a wide variety of types – not just PCI hardware.

To instruct it to report the graphics cards found, we use the -C (class) and pass the modifier “display”. the -numeric Option forces lshw to provide the numeric IDs of the devices and their names.

Enter the following:

sudo lshw -numeric -C display

Here is what this command found on the physical machine:

 *-display 
   description: VGA compatible controller
   product: GP108 [GeForce GT 1030] [10DE:1D01]
   vendor: NVIDIA Corporation [10DE]
   physical id: 0
   bus info: [email protected]:26:00.0
   version: a1
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
   configuration: driver=nouveau latency=0
   resources: irq:97 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:c0000-dffff

Fortunately, both found the same card!

the [10DE:1D01] Identifiers represent the manufacturer (10DE) and the model (1D01). To find the brand and model immediately, you can enter “graphics card 10de: 1d01” in a search engine.

The glxinfo command

the glxinfo Command is another method you can use. It gives you information from the OpenGL extension for the X Windows system. You can then browse some of this information to find out what type of graphics card is installed on a computer.


the glxinfo Command already exists on Manjaro and Fedora, but you need to install it on Ubuntu. To do this, enter the following command:

sudo apt-get install mesa-utils

To forward the output of glxinfo by lessand use the -B (Print IDs) enter the following:

glxinfo -B | less

The graphics card is described in the “Device” line.

This is the output from the physical computer:

name of display: :1
display: :1 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: nouveau (0x10de)
Device: NV138 (0x1d01)
Version: 19.3.2
Accelerated: yes
Video memory: 1987MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.3
Max compat profile version: 4.3
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
OpenGL vendor string: nouveau
OpenGL renderer string: NV138
OpenGL core profile version string: 4.3 (Core Profile) Mesa 19.3.2
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.3 (Compatibility Profile) Mesa 19.3.2
OpenGL shading language version string: 4.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.3.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

If you type “NV138” into a search engine, the NVIDIA graphics card is identified immediately.

Use the GUI to identify the graphics card

If the computer is a CLI-only server, you must use one of the techniques described above. However, if it has a (working) GUI, there is likely a graphical way of identifying the graphics card. In fact, this option is likely located somewhere in your Linux desktop settings tools.

On a GNOME desktop, open the Preferences dialog box, then click Details in the sidebar. In the “Info” area look for an entry “Graphic”. This tells you what type of graphics card is in the computer, or more specifically, which graphics card is currently in use. Your computer might have more than one GPU.

The About tab of the GNOME Settings on an Ubuntu virtual machine.


On the “About” tab of a physical host’s GNOME Settings, we get the same card ID “NV138” we saw earlier. Again, we can enter this information into a search engine to find the card type.

The About tab of the GNOME Settings for a physical host.

Graphics cards on laptops

Many laptops have two graphics cards: one from the manufacturer of the Central unit (CPU) and one from a mainstream GPU vendor.

Let’s input the same lspci Command from earlier, but this time we’re running it on a laptop:

sudo lspci -v | less

As expected, we get a description of the graphics cards in the computer:

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
Subsystem: ASUSTeK Computer Inc. 3rd Gen Core processor Graphics Controller
Flags: bus master, fast devsel, latency 0, IRQ 33
Memory at f7400000 (64-bit, non-prefetchable) [size=4M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
I/O ports at f000 [size=64]
[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
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

01:00.0 VGA compatible controller: NVIDIA Corporation GF119M [GeForce 610M] (rev a1) (prog-if 00 [VGA controller])
Subsystem: ASUSTeK Computer Inc. GF119M [GeForce 610M]
Flags: bus master, fast devsel, latency 0, IRQ 34
Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
Memory at e0000000 (64-bit, prefetchable) [size=128M]
Memory at e8000000 (64-bit, prefetchable) [size=32M]
I/O ports at e000 [size=128]
Expansion ROM at f7000000 [disabled] [size=512K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [b4] Vendor Specific Information: Len=14 <?>
Capabilities: [100] Virtual Channel
Capabilities: [128] Power Budgeting <?>
Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
Kernel driver in use: nouveau
Kernel modules: nouveau

This laptop has both a Intel Core GPU and an NVIDIA GeForce 610M. However, both cards have the “[VGA controller]”String, usually indicating which GPU is being used.


They can’t both be used, so try getting the card working from the mainstream GPU vendor first. This is what the laptop manufacturer considers the standard and includes in the hardware specifications for the machine.

One of the techniques we covered here is sure to work for you! Now that you know what type of graphics card a computer or laptop has, it’s time to choose the appropriate graphics driver.

Linux commands
Filestar · pv · cat · tac · chmod · grep · difference · sed · With · man · pushed · popd · fsck · Test disk · seq · fd · pandoc · CD · $ PATH · awk · join · jq · wrinkles · unique · journalctl · tail · stat · ls · fstab · echo · fewer · chgrp · chown · Rev · look · Strings · Type · rename · Postal code · unzip · assemble · ummount · To install · fdisk · mkfs · rm · rmdir · rsync · df · gpg · weather · Nano · mkdir · from · ln · Patch · Convert · rclon · Scraps · srm
Processesalias · screen · above · kind · renice · progress · strace · system · tmux · chsh · story · at · Batch · for free · which · dmesg · chfn · User mod · ps · chroot · xargs · tty · pinkie finger · lsof · vmstat · Time out · Wall · Yes sir · kill · sleep · sudo · it is · Time · groupadd · User mod · groups · lshw · switch off · start anew · Stop · switch off · passwd · lscpu · crontab · date · bg · fg
Networkingnetstat · Ring · Trace route · ip · ss · who is · fail2ban · bmon · she · finger · nmap · ftp · curl · wget · who · who am I · w · iptables · ssh-keygen · ufw

Best Linux Laptops for Developers and Enthusiasts

Related Posts