- How to Find Which Graphics Card do You Have in Linux?
- Check graphics card details in Linux command line
- Use lspci command to find graphics card
- Get detailed graphics card information with lshw command in Linux
- Bonus Tip: Check graphics card details graphically
- How to get information about graphics card (GPU) on Linux
- Graphics processing units — GPU
- Hardware details
- Integrated chipsets vs dedicated gpus
- Check hardware acceleration
- 25 thoughts on “ How to get information about graphics card (GPU) on Linux ”
- Linux Find Out Graphics Card Installed In My System
- Linux Find Out Graphics Card Information
- Download the latest version of the PCI ID list
- How to check graphics card on Linux
- Example: Find out the model of my graphics card on my Laptop powered by Linux
- How to get the GPU info on Linux using GUI tools
- Hardware information GUI tool
- hardinfo – System Information GUI tool
- lshw command
- A note about Nvidia GPU users with Nvidia binary drivers
- Linux Find Out GPU Information Using the glxinfo
- Finding graphics cards on Linux Laptops
- Conclusion
How to Find Which Graphics Card do You Have in Linux?
Last updated April 18, 2020 By Abhishek Prakash 19 Comments
Be it Nvidia or Radeon or Intel, they all may have some issues with Linux. When you are on your way to troubleshoot the graphics problem, the first thing you want to know is which graphics card do you have in your system.
Linux has several commands to check hardware information. You can use them to check what graphics card (also refer to as video card) do you have. Let me show you a couple of commands to get GPU information in Linux.
Check graphics card details in Linux command line
Use lspci command to find graphics card
The lspci command displays the information about devices connected through PCI (peripheral Component Interconnect) buses. Basically, this command gives you the detail about all the peripheral devices to your system from keyboard and mouse to sound, network and graphics cards.
By default, you’ll have a huge list of such peripheral devices. This is why you need to filter the output for graphics card with grep command in this manner:
This should show a one line information about your graphics card:
As you can see, my system has Intel HD 620 video card.
Get detailed graphics card information with lshw command in Linux
The lspci command is good enough to see what graphics card you have but it doesn’t tell you a lot. You can use lshw command to get more information on it.
You may have to install lshw on Fedora, Manjaro and a few non-Ubuntu distributions.
This command requires you to have root access. You need to specify that you are looking for video card (graphics card) information in this fashion:
And as you can see in the output below, this command gives more information on the graphics card such as clock rate, width, driver etc.
Bonus Tip: Check graphics card details graphically
It’s not that you must use the command line to find graphics card details in Linux. Most Linux distributions (or should I say desktop environments) provide essential details in the settings application.
For example, if you are using GNOME desktop environment, you can check the details by going to About section of Settings. Here’s what it looks like in Ubuntu 20.04:
I hope you find this quick tip helpful. You can also use the same commands to find your network adapter and CPU information in Linux.
If you have questions or suggestions, don’t hesitate to write a comment.
Like what you read? Please share it with others.
Источник
How to get information about graphics card (GPU) on Linux
Graphics processing units — GPU
You need to find out the correct model and vendor of the graphics card on your system, to be able to install the appropriate drivers and get the hardware to function properly. Most modern linux distros can detect variety of graphics card, but do not always have the best driver for it.
So if you have an external graphics card like Nvidia or Ati, then you need to find the model name/number and then lookup further details online. Ofcourse, its easier if you have the hardware manual that came along when you purchased the computer. But here we shall be using commands to find out the same information.
Hardware details
The are only a few commands to learn. First one is lscpi and here is a quick example showing how to fetch details about graphics unit (also called vga card or video card).
The first line has the nae of the vendor, the model name/series and the pci id.
Note the numbers in the bracket — 8086:2982. Such a number is present for almost all graphics card. The first part (8086) indicates the vendor id (which is Intel here) and the second number (2982) indicates the pci id, which indicates the model of the graphics unit.
Now you can search google for more details using the Vendor name and the pci id.
The lshw command can also be used to get the above information.
The pci details is indicated in the same way. The active device driver is also listed in the «configuration» line.
Here is a sample output from a system having an nvidia geforce 210 graphics card.
Integrated chipsets vs dedicated gpus
For dedicated units like nvidia or ati, you can easily search online for the model number or pci id. The specifications and other details would be available on the vendor’s website.
However for integrated graphics chipsets like Intel GMA, you may not get sufficient details by just searching the series name (82G35 over here) or pci id. The series covers many similar models, while the pci id might not be documented on the website.
In that case, lookup the motherboard model and find its specifications. Vendors publish product specification documents for every motherboard model they manufacture. These contain technical details about the hardware.
To find your motherboard model, use dmidecode or inxi command.
The above output shows that its a «Intel DG35EC» motherboard. Google up for that model to find the product specifiation document, and look for Video/Graphics information in it.
Check hardware acceleration
With hardware based 3d acceleration, applications that need to draw 3d graphics can use the hardware directly to process and generate the graphics, speeding up 3d rendering significantly. For this, the graphics card must support hardware acceleration and the correct drivers must be installed on the system to use this feature.
The 3d processing functions provided by the hardware adhere to the OpenGL specifications, and with the right hardware, applications can access them through the opengl api. OpenGL just defines the functions and the implementation is done inside the hardware which makes it very fast.
However there are libraries like MESA that implement the opengl functions entirely inside software. So it is possible to render graphics using opengl without actually having an opengl compatible gpu. So by checking the opengl rendering library, we can find out if hardware acceleration is present or not.
Check the glxinfo command output for OpenGL details
The «OpenGL renderer string» points to MESA libraries which means that 3d rendering is being handled entirely inside software. This is going to be slow and games would not work well.
The output on a machine with dedicated nvidia geforce 200 graphics card looks like this
So the OpenGL renderer is GeForce, which is the nvidia proprietory driver. This indicates the hardware based 3d acceleration is available. So graphics performance would be good.
A Tech Enthusiast, Blogger, Linux Fan and a Software Developer. Writes about Computer hardware, Linux and Open Source software and coding in Python, Php and Javascript. He can be reached at [email protected] .
25 thoughts on “ How to get information about graphics card (GPU) on Linux ”
How do I make my amd graphics card as default? As in I should see it as the default graphics card in settings -> about. (I’m using Ubuntu 18.04)
So there is no easy one step way any more to grep out card info, you have to look at the entire lspci or other info output, then find the ones that are at busid .0, which is what sgfxi and inxi now do.
How did you Installed Radeon on ArchLinux ? I have RX 5700 XT and I think I didn’t installed it well
Thank you
Good info. Lucky me I recently found your site by chance (stumbleupon). I’ve saved it for later!
Okay, Finally I got some good step by step guide on it. Thanks
bash: lshw: command not found
but other command workings, thank u very much
I am using Ubuntu, is these same commands can work on my Ubuntu system too?
The actual performance of a GPU both depends on the internal architecture and the way the displaying purpose is done. A GPU normally has multiple cores, each doted with L1 and sometimes L2 cache. A GPU chip is capable of both integer and floating point execution.
If you are a windows user then you will just install an additional softeare like nvedia and get all info. Also you can see all information in your task manager.
Linixu os is difficult for me. I am a windows user, I just download software to check GPU information and it shows me all details about GPU.
Bruh! Can you please make a guide for windows? How can we get the info about Installed GPU on windows?
Thanks in Advance
The dedicated graphics card is not showing the details, I am only able to get the details of the integrated card, can anyone guide me how can I get the details of dedicated card as well?
Nice information to find out if the card is using acceleration or not, but what when it doesn’t? My Intel GPU does not, so what do I do now? I was hoping to find help in this article but obviously I was wrong.
Great Article!
Thanks
I tried command glxinfo | grep OpenGL and it is case sensitive. It doesn’t work when you write opengl in lowercase. I’m using linux mint 19.1.
There are two types of drivers you can install to get your graphics cards working, namely proprietary drivers or open source. While there are good and bad aspects to both, they differ if you’re using a Nvidia or AMD graphics card.
I’m not able to get information about my dedicated graphics card. It’s only showing information about my integrated card. Does this mean that the dedicated card is not inserted properly?
Does it work with all linux variants or flavors?
Good info also inxiDev lspci does display more details about the manufacturer though like the OP showed:
1a:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/580] [1002:67df] (rev e7) (prog-if 00 [VGA controller])
Subsystem: Gigabyte Technology Co., Ltd Device [1458:22f1]
Yеs! Ϝinally somеtһing aƅoսt update vidmate.
Hi there, how i can determine which is the Total MB of the GPU .
Because with lspci, the maximum says is 256M, not matter if the GPU using have 2GB or more.
bash: lshw: command not found
apt-get install lshw
You have to install lshw first
The graphic card id method you are showing is legacy, as I discovered recently with inxi and sgfxi, they started failing to report cards because they were relying on the VGA detection method, but in fact, there are now 3 different syntaxes being used to identify cards, and you cannot simply grep for them because the syntaxes are used either as a second feature of the card, like 3D controller, or Display Controller, OR those are being used to identify a real card. The only way to determine which it is is to also then check the pci bus id, and if it ends in .0, it’s a real graphic card. sgfxi had dual card detection which was failing because of this issue, it took a few user data sets to figure out and debug the issue. VGA always works, but will only return cards using the VGA id method, and it will miss all cards, often things like intel onboard cards.
inxi -Gxx
Graphics: Card: NVIDIA GT218 [GeForce 210] bus-ID: 02:00.0 chip-ID: 10de:0a65
Display Server: X.Org 1.14.4 driver: nvidia Resolution: 1280× [email protected] , 1280× [email protected]
GLX Renderer: GeForce 210/PCIe/SSE2/3DNOW! GLX Version: 3.3.0 NVIDIA 337.12 Direct Rendering: Yes
The last item, Direct Rendering, generally shows if the video driver is working, by the way. I don’t remember which release of inxi fixed this bug, but it’s certainly fixed now, in 2.1.20. I didn’t personally have a system that used alternate syntax for primary card id, but by good fortune I did have systems that showed the problem with the busID, for example, you can have a busid of 02.01.1 which is NOT a card, but just the 3D controller identifier for a VGA id’ed card at 02.01.0 . I have no idea who or what made this change, all I know is it happened sometime in the past 2 or 3 years. Obviously as well, VGA is a legacy term in the first place, which is I think why they moved to other terms. So there is no easy one step way any more to grep out card info, you have to look at the entire lspci or other info output, then find the ones that are at busid .0, which is what sgfxi and inxi now do.
Your inxi review recently was good by the way, I liked it, thanks.
Источник
Linux Find Out Graphics Card Installed In My System
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:
Tutorial details | |
---|---|
Difficulty level | Easy |
Root privileges | Yes |
Requirements | Linux |
Est. reading time | 6 mintues |
- 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
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:
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:
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:
Please note the device ID # 01:00.0. Now, to get detailed information, enter:
$ sudo lspci -v -s 01:00.0
Sample outputs:
Fig.01: lspci in action – displaying my Dell laptop Nvidia graphics card info
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.
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
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:
Fig.02 Linux Hardware Information GUI Tool
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:
Fig.03 Check graphics card on Linux with hardinfo command
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:
OR get detailed information:
# lshw -class display
Sample outputs:
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:
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
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.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Источник