It's in the cards

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
3,259
Reaction score
3,014
Credits
28,912
I'm trying something a little different today.

This article is 100% gluten free, 100% hormone free, and 100% Ai free.

But this article is about finding out about your video or graphics card. All computers
have something that outputs video to your screen. Some use the embedded graphics in their CPU,
but other use discrete video cards like Nvidia GeForce or AMD Radeon. Our newest PCs have Intel ARC
video cards in them.

You can use inxi and lshw to find out about your video card, but the simplest and easiest way without
having to install any software packages is...

Code:
lspci | grep VGA

On this computer, the output looks like this.
Code:
ray@LianLi:~$ lspci | grep VGA
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 32 [Radeon RX 7700 XT / 7800 XT] (rev c8)
18:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raphael (rev cb)
ray@LianLi:~$

For those who don't know me that well yet. My friends call me "Ray", but my enemies also call me that also. (and a few other names as well) The computer case I'm using for this computer is a LianLi case. I often name my home computers based on what case they are in. It's easier for me to tell which computer I'm logged into that way. You might be wondering why I have two lines in my lspci output. I have a discrete video card in one of my PCI slots, but I also have an embedded video card in my CPU.

If you've installed the AMD or Nvidia video driver, you also get a couple a new commands.

Code:
glxinfo

Unfortunately, this outputs a lot of lines about gpu cores and registers. In my case, for this GPU card it's over 1200 lines long.
So to narrow down the part I care about, I use...

Code:
glxinfo | grep OpenGL

(Remember this is case sensitive)
This outputs...

Code:
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 7800 XT (radeonsi, navi32, LLVM 19.1.5, DRM 3.59, 6.12.8-200.fc41.x86_64)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.3.2
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.3.2
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.3.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

As you can see, I have an AMD Radeon card in this computer, but I already knew that from the lspci command above.
But what this does tell me, is which version of OpenGL shaders I have installed, and which version of Mesa is installed.

In this case, it's OpenGL 4.60 and Mesa 24.3.2. glxinfo info does not show me the driver version for Radeon cards.
But I know in this case it's 23.0.0-6. The Mesa version and driver version don't always match exactly.

On one of my other computer, the output of lspci looks like this.

Code:
ray@absTower:~# lspci | grep VGA
2e:00.0 VGA compatible controller: NVIDIA Corporation TU104 [GeForce RTX 2080 SUPER] (rev a1)

Yep, this case is a Corsair ABS case. But it's isn't a Radeon video card, it's a Nvidia GeForce.
Also lspci only outputs one line of output, because I only have one video card in this computer.
If we use the same glxinfo command we used above, the output looks like this.

Code:
ray@absTower:~# glxinfo | grep OpenGL

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 565.77
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 565.77
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 565.77
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

Again, I see the OpenGL shader version is 4.60 same as for the Radeon card.
The driver version is 565.77.
 
Last edited:


Of course if you're running an Xwindows GUI, and you have the Nvidia card drivers installed, you get something
called xsettings. The name varies slightly depending on which distro you use.

It looks like this.
1736861721095.png


Unfortunately, there is not a similar tool for Radeon cards.
However you can run the following command and it works on both nvidia and radeon cards.

Code:
glxgears

That will bring up a window that looks like this.

1736862023588.png


You will see the little 3-d gears running around in circles. This will also output your current screen refresh rate
to your console. It's not really a comprehensive benchmarking tooll by any means, but it will tell you if your video
card is keeping up with your monitors capabilities.
 
While radeon cards may not have the xsetting GUI panel. They do have this.

1736862386495.png


This is like top for your video card. You usually have to install it separately from your video drivers.
In most distro's it's called radeontop. Just for kicks, I tried it with my Nvidia card, and it didn't like it.
In the example above my video card isn't doing much, (I'm just writing this article). But depending on
how many video's you are watching or which video games you are playing in Linux, this can jump up
to 70 or 80% sometimes.
 
If you have an nvidia card, another handy command is...

Code:
ray@absTower:~$ nvidia-smi

Tue Jan 14 08:14:22 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.77                 Driver Version: 565.77         CUDA Version: 12.7     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 2080 ...    Off |   00000000:2E:00.0  On |                  N/A |
|  0%   34C    P8              3W /  250W |     736MiB /   8192MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      2618      G   /usr/bin/kwalletd6                              2MiB |
|    0   N/A  N/A      2894      G   /usr/bin/kwin_wayland                          24MiB |
|    0   N/A  N/A      2979      G   /usr/bin/maliit-keyboard                      313MiB |
|    0   N/A  N/A      2990      G   /usr/bin/Xwayland                               3MiB |
|    0   N/A  N/A      3040      G   /usr/bin/ksmserver                              2MiB |
|    0   N/A  N/A      3043      G   /usr/bin/kded6                                  2MiB |
|    0   N/A  N/A      3062      G   /usr/bin/plasmashell                          194MiB |
|    0   N/A  N/A      3114      G   /usr/libexec/kactivitymanagerd                  2MiB |
|    0   N/A  N/A      3119      G   /usr/bin/gmenudbusmenuproxy                     2MiB |
|    0   N/A  N/A      3120      G   /usr/bin/kaccess                                2MiB |
|    0   N/A  N/A      3121      G   ...6/polkit-kde-authentication-agent-1          2MiB |
|    0   N/A  N/A      3122      G   /usr/libexec/org_kde_powerdevil                 2MiB |
|    0   N/A  N/A      3123      G   /usr/libexec/xdg-desktop-portal-kde             2MiB |
|    0   N/A  N/A      3124      G   /usr/bin/xembedsniproxy                         2MiB |
|    0   N/A  N/A      3304      G   /usr/bin/kdeconnectd                            2MiB |
|    0   N/A  N/A      3403      G   /usr/bin/xwaylandvideobridge                    2MiB |
|    0   N/A  N/A      3427      G   /usr/libexec/DiscoverNotifier                   2MiB |
|    0   N/A  N/A      3429      G   /usr/bin/kalendarac                             2MiB |
|    0   N/A  N/A      3610      G   /usr/bin/akonadi_control                        2MiB |
|    0   N/A  N/A      3654      G   /usr/bin/akonadi_archivemail_agent              2MiB |
|    0   N/A  N/A      3655      G   /usr/bin/akonadi_birthdays_resource             2MiB |
|    0   N/A  N/A      3656      G   /usr/bin/akonadi_contacts_resource              2MiB |
|    0   N/A  N/A      3657      G   .../bin/akonadi_followupreminder_agent          2MiB |
|    0   N/A  N/A      3658      G   /usr/bin/akonadi_ical_resource                  2MiB |
|    0   N/A  N/A      3659      G   /usr/bin/akonadi_indexing_agent                 2MiB |
|    0   N/A  N/A      3660      G   /usr/bin/akonadi_maildir_resource               2MiB |
|    0   N/A  N/A      3661      G   /usr/bin/akonadi_maildispatcher_agent           2MiB |
|    0   N/A  N/A      3662      G   /usr/bin/akonadi_mailfilter_agent               2MiB |
|    0   N/A  N/A      3663      G   /usr/bin/akonadi_mailmerge_agent                2MiB |
|    0   N/A  N/A      3664      G   /usr/bin/akonadi_migration_agent                2MiB |
|    0   N/A  N/A      3665      G   /usr/bin/akonadi_newmailnotifier_agent          2MiB |
|    0   N/A  N/A      3666      G   /usr/bin/akonadi_sendlater_agent                2MiB |
|    0   N/A  N/A      3667      G   /usr/bin/akonadi_unifiedmailbox_agent           2MiB |
|    0   N/A  N/A      4847      G   /usr/libexec/baloorunner                        2MiB |
|    0   N/A  N/A      4956      G   /usr/bin/dolphin                                2MiB |
|    0   N/A  N/A      9087      G   /usr/bin/konsole                                2MiB |
+-----------------------------------------------------------------------------------------+

I don't know if this is true for all distro's, but on my distro ( fedora ) I had to install the nvidia-cuda package in
order to get the smi command above.
 

Staff online


Top