Do you want to identify the graphics processing unit (GPU) in a Linux computer? Here you can see how you can identify the graphics card from the command line and in GNOME.
The first step
You have probably been there. You are set up to provide support to a non-technical family member or colleague, and something tells you that this will not be painless. But still, you throw in! You quickly determine that the problem is probably a problem with the display driver. Hey, this isn't so bad! But then your short glimmer of hope is swept away when you ask, "What kind of graphics card do you have?"
The expression of the deer headlights that you receive in response speaks volumes. To support something, you need to know what it is. So how do you identify the graphics card in a Linux computer?
Let's assume the worst scenario is and say that the & # 39; s drivers for the graphics card were never installed, so you can't even look at it to get an idea. It does not matter! You can solve this problem from the command line or via the graphical user interface (GUI).
lspci and the PCI ID database
The Peripheral Component Interconnect (PCI) standard is a common protocol with which you can talk internal peripherals, such as graphics cards. The PCI ID Repository maintains a database of all known ID & # 39; s for PCI devices. This means that if you know any information about the device, you can look it up.
You can use the command
lspci to display the PCI devices installed on a Linux computer, as well as some information about them
Wouldn't it be great if we had the PCI database and could link the command
lspci to each other? Well, actually that is exactly what happens when you execute the command
lspci . It checks a local copy of the PCI database to identify the PCI devices it detects. Before we start, it is wise to update the local copy of the PCI database.
Type the command
update-pciids to do exactly that:
The newest database version has been retrieved for us and we can now download the command
use lspci . There will be a lot of output, so we will implement it less in
-v (extended) tells
lscpi to give us as much information as possible. We use
sudo to ensure that the information is as detailed as possible.
We type our assignment as follows:
sudo lspci -v | less
The results appear in
less . If you press the slash (
/ ), you activate the search function
Type "VGA" in all capital letters and press Enter.
less searches for the string & # 39; VGA & # 39; and shows you the first results found. From that moment you can scroll or scroll forward to see how many graphics cards
lspci have found.
For this article we have investigated various Linux distributions that are being run on VirtualBox virtual machines. Virtual machines naturally have virtual graphic cards.
So you can see an example of real results, here is the output from the host (physical) 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: busmaster, fast devsel, latency 0, IRQ 97 Memory on f6000000 (32-bit, non-retrievable) [size=16M] Memory on e0000000 (64-bit, retrievable in advance) [size=256M] Memory on f0000000 (64-bit, retrievable in advance) [size=32M] I / O ports on e000 [size=128] Expansion ROM at 000c0000 [disabled] [size=128K] Possibilities:  Power Management version 3 Options:  MSI: Enable + Count = 1/1 Maskable - 64bit + Options:  Express Legacy Endpoint, MSI 00 Options:  Virtual channel Options:  Latency Tolerance Reporting Options:  Power Budgeting > Options:  Advanced error reporting Options:  Supplier-specific information: ID = 0001 Rev = 1 Len = 024 > Options:  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 the NVIDIA technology page for that device. The text "[VGA controller]" at the end of the first line indicates that this is the "operational" graphics card. This is useful information if more than one card is installed on a computer.
The lshw command
You can also use the
lshw command to display the hardware installed on a Linux computer. It also reports a number of types – not just PCI hardware.
To have it report on the graphic cards it finds, we use the option
-C (class) and we give the option & # 39; display & # 39; modifier. The
-numeric option forces
lshw to specify the numeric IDs of the devices, as well as their names.
Type the following:
sudo lshw -numeric -C display
This is what that command found on the physical computer:
* display Description: VGA compatible controller product: GP108 [GeForce GT 1030] [10DE:1D01] Seller: NVIDIA Corporation [10DE] physical id: 0 bus info: pci @ 0000: 26: 00.0 version: a1 width: 64 bits clock: 33 MHz options: pm msi pciexpress vga_controller bus_master cap_list rom configuration: driver = nouveau latency = 0 sources: irq: 97 memory: f6000000-f6ffffff memory: e0000000-efffffff memory: f0000000-f1ffffff ioport: e000 (size = 128) memory: c0000-dffff
Encouragingly both found the same card!
The [10DE:1D01] IDs represent the manufacturer (10DE) and the model (1D01). To find the make and model immediately, you can type "graphic card 10th: 1d01" into a search engine.
The glxinfo command
glxinfo is another method that you can use. It gives you information from the OpenGL extension for the X Windows system. You can then search through some of that information to find out what kind of graphics card is installed on a machine.
glxinfo is already present on Manjaro and Fedora, but you have to install it on Ubuntu. To do this, type the following command:
sudo apt-get install mesa-utils
To forward the output of
-B (print ID & # 39; s), type the following:
glxinfo -B | less
The graphic card is described in the "Device" line.
This is the output of the physical computer:
display name :: 1 display :: 1 screen: 0 direct display: yes Extensive renderer information (GLX_MESA_query_renderer): Seller: nouveau (0x10de) Device: NV138 (0x1d01) Version: 19.3.2 Accelerated: yes Video memory: 1987MB Uniform memory: no Desired profile: core (0x1) Max Core profile version: 4.3 Max compat profile version: 4.3 Max GLES1 profile version: 1.1 Max GLES  profile version: 3.2 OpenGL supplier series: nouveau OpenGL renderer string: NV138 OpenGL core profile version series: 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 series: 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 series: OpenGL ES GLSL ES 3.20
When you type "NV138" into a search engine, the NVIDIA graphics card is immediately identified.
Using 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 probably a graphical way to identify the graphical card. That option is probably located somewhere in your Linux desktop settings tools.
On a GNOME desktop, open the "Settings" dialog box and then click "Details" in the side bar. In the "About" pane, search for an "Graphics" item. This tells you what kind of graphics card is in the computer, or, more specifically, the graphics card that is currently in use. Your machine may have more than one GPU.
On the "About" tab of GNOME settings we get the same "NV138" card ID that we saw earlier. Again, we can put that info in a search engine to find the card type.
Graphics cards on laptops
Many laptops have two graphics cards: one from the manufacturer of the central processing unit (CPU), and one from a regular GPU provider .
Let's type the same
lspci command from earlier, but this time we'll execute it on a laptop:  sudo lspci -v | less
As expected, we get a description of the graphics cards in the machine:
00: 02.0 VGA-compatible controller: Intel Corporation 3rd generation Core processor graphics controller (rev 09) (prog-if 00 [VGA controller] ) Subsystem: ASUSTeK Computer Inc. 3rd Gen Core processor graphic controller Flags: busmaster, fast devsel, latency 0, IRQ 33 Memory on f7400000 (64-bit, non-retrievable) [size=4M] Memory on d0000000 (64-bit, retrievable in advance) [size=256M] I / O ports on f000 [size=64] [virtual] Expansion ROM on 000c0000 [disabled] [size=128K] Possibilities:  MSI: Enable + Quantity = 1/1 Maskable- 64bit- Options: [d0] Power Management version 2 Options: [a4] PCI advanced functions 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: busmaster, fast devsel, latency 0, IRQ 34 Memory on f6000000 (32-bit, non-retrievable) [size=16M] Memory on e0000000 (64-bit, retrievable in advance) [size=128M] Memory on e8000000 (64-bit, retrievable in advance) [size=32M] I / O ports on e000 [size=128] Expansion ROM on f7000000 [disabled] [size=512K] Possibilities:  Power Management version 3 Options:  MSI: Enable + Count = 1/1 Maskable - 64bit + Options:  Express Endpoint, MSI 00 Options: [b4] Supplier-specific information: Len = 14 > Options:  Virtual channel Options:  Power Budgeting > Options:  Seller-specific information: ID = 0001 Rev = 1 Len = 024 > Kernel driver in use: nouveau Kernel modules: nouveau
This laptop has both an Intel Core GPU and an NVIDIA GeForce 610M. Both cards, however, have the series "[VGA controller]", which usually indicates which GPU is in use.
They cannot both be used, so first try to get the card from the regular GPU provider. That is the one that the laptop manufacturer regards as the standard and that is included in the hardware specifications for the machine.
One of the techniques we have discussed here will certainly work for you! After you know what type of graphic card a computer or laptop has, you can select the correct graphic driver.