- Linux Find Out Video Card GPU Memory RAM Size Using Command Line
- lspci command example to find out video card (GPU) memory ram size on Linux
- Identify onboard Intel/AMD or Nvidia dedicated GPU on Linux
- Linux Find Out Video Card GPU Memory RAM Size Using Command Line
- Finding out video card GPU memory RAM size on Linux for NVIDIA card
- Xorg log file to get the GPU info on Linux
- Using nvidia-smi for monitoring and management capabilities
- How to find out AMD video card GPU memory RAM size on Linux
- Conclusion
- 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 Video Card GPU Memory RAM Size Using Command Line
- lspci command – It is a utility for displaying information about all PCI buses in the system and all devices connected to them.
- /var/log/Xorg.0.log – Xorg log file.
- lshw command – List CPU, CPU and other hardware on Linux.
- glxinfo command – See information about the GLX implementation on Linux on a given X display.
- nvidia-smi command – Display NVIDIA GPU info including installed RAM.
Tutorial details | |
---|---|
Difficulty level | Easy |
Root privileges | Yes |
Requirements | Linux |
Est. reading time | 5 minutes |
lspci command example to find out video card (GPU) memory ram size on Linux
You need to use string called devices in the specified domain – 00:02.0 VGA (highlighted in red color to display memory info):
$ lspci -v -s 00:02.0
Sample outputs:
This listing shows an Intel video card with 128 MB of video RAM. If you cannot find devices in the specified domain use following command and look for your display card name and memory field:
$ lspci -v | less
Identify onboard Intel/AMD or Nvidia dedicated GPU on Linux
Simply run the following lshw command. It is a small tool to extract detailed information on the hardware configuration of the Linux machine:
$ sudo lshw -C display
Linux Find Out Video Card GPU Memory RAM Size Using Command Line
Another option is to run the following command:
$ glxinfo | more
One can use the egrep command as follows to filter out info:
$ glxinfo | egrep -i ‘device|memory’
Finding out video card GPU memory RAM size on Linux for NVIDIA card
Here is another output displaying Nvidia GPU memory on Arch Linux:
$ glxinfo | egrep -i ‘device|memory|video’
The following indicate that I have dedicated GPU video memory 4096 MB (4GB):
To get summary i.e. brief info run:
$ glxinfo -B
Sample outputs:
- 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 ➔
Xorg log file to get the GPU info on Linux
Open a command-line terminal (select Applications > Accessories > Terminal), and then type:
$ grep -i —color memory /var/log/Xorg.0.log
Sample outputs:
The above output indicate that my Nvidia card has 1024MB ram. The following is taken from my Macbook, which has Intel GM965 Video card. It shares memory from main RAM:
$ grep -i memory /var/log/Xorg.0.log
Sample outputs:
Using nvidia-smi for monitoring and management capabilities
The nvidia-smi command also display used and total GPU memory:
$ nvidia-smi
How to find out AMD video card GPU memory RAM size on Linux
Open the Terminal app and then execute the following lspci command $ lspci | grep -i VGA
Note down AMD PCI GPU ID such as 00:01.0 and then run:
$ lspci -vs 00:01.0
$ lspci -vs 00:01.0 | grep -i -E ‘size|ram|memory|prefetchable’
# Another option #
$ grep -i memory /var/log/Xorg.0.log
$ glxinfo | egrep -i ‘device|memory’
Outputs for my AMD/ATI] Kabini [Radeon HD 8330] card obtianed using the lspci command and grep command/egrep command:
Conclusion
You must use combination of various Linux commands to find out video card (GPU) memory (RAM) size and make of card. I strongly suggest that you read the following man pages:
$ man glxinfo
$ man lspci
$ man lshw
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Category | List of Unix and Linux commands |
---|---|
Documentation | help • mandb • man • pinfo |
Disk space analyzers | df • duf • ncdu • pydf |
File Management | cat • cp • less • mkdir • more • tree |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Linux Desktop Apps | Skype • Spotify • VLC 3 |
Modern utilities | bat • exa |
Network Utilities | NetHogs • dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • glances • gtop • jobs • killall • kill • pidof • pstree • pwdx • time • vtop |
Searching | ag • grep • whereis • which |
Shell builtins | compgen • echo • printf |
Text processing | cut • rev |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Comments on this entry are closed.
How do I check the amount of video card memory being used?
Thx, that helped me, but waht means “access denied” after the “capabilities”? That means my vga card is not in use? (I think)
heheh ur a furry jeff Apr 26, 2017 @ 17:34
Thank you but can you clarify; how do you view video memory in use additionally?
When I follow the above instructions, I get a much lower amount of memory than I know what is on this particular video card. The need for this is when I don’t know how much memory; on a laptop for instance.
@Fox
I don’t know why exactly the capabilities require root privs but that seems to be the case. Try:
sudo lspci -v -s 00:02.0
what means “access denied” after the “capabilities”?
Do use superuser. #sudo lspci -v -s 00:02.0
how do i find how much memory my video card has?
You could also do:
To focus the -v option right to the VGA adapter
for this example the output of your video card is the same as the one ‘m using, and I cannot find the correct intel video driver (the one currently install keeps crashing every so often) which video driver did you install –for Intel Corporation 82845G/GL?
I’m using arch linux
Saludos desde Argentina!
how to run .exe files in linux?
You cannot run .exe files under UNIX/Linux operating systems. These .exe files are solely created for Windows Operating Systems. You have something else instead of .exe files under Linux and they are called .rpm files which are the executable formats, do not be confused with the definition of executable and .exe file.
No. RPM files are just archives (packages) of software, and they are meant to be used on Red Hat-based distros (such as Fedora and CentOS). Linux executable files do not have a specific extension, but are usually in the ELF format. You can also “execute” interpreted scripts, such as shell and Python scripts.
Well, when first i landed to the Unix world, i would assume that everything will be the same as is in Windows Operating Systems. Reluctantly I would try to install some proprietary graphics software coded for Windows Platform and I would receive some obscure and absurd response from my Linux machine. This is the case that a newbie assumes that he/she is able to do the same in both platforms. Albeit, I have to mention that if someone really wants to know the intricacy of operating systems then the best book to start with is “Modern Operating Systems” by venerable Andrews S. Tanenbaum.
if you have binary .exe then use wine
or if .net .exe use mono to run exe that my personal experience
This is what I’m using in one of my scripts. And as the comments say, it doesn’t always return the correct value.
As a matter of fact, you *can* open .EXE files in all major distros. Just make sure you install Wine.
Ubuntu & Debian: sudo apt-get install wine
hey hi, i just wanna know how and where do i run the .SH file format, am using FEDORA 14.
thanx.
Hi,
using the commands mentioned in this article, I found that my notebook has 256MB video memory (32-bit, prefetchable), (Intel 945GM) on Linux Ubuntu 11.10.
However when I try to change/select the video memoy in BIOS it gives only two options : 64MB or 128 MB. I have set it to 128MB, but Ubuntu is showing 256MB … How is it possible ??
My Xorg.0.log has a line like this:
46 :[ 7.319] (–) PCI:*(0:0:2:0) 8086:2a02:17aa:20b5 rev 12, Mem @ 0xf8100000/1048576, 0xe0000000/268435456, I/O @ 0x00001800/8
0xe0000000/268435456 is how many bytes of memory my video card has.
Really helpful article.
Googled “how to check video memory on ubuntu server”, you guys were at second.
Very helpful. I was trying to find out how much memory my integrated card had for a windows game using the PlayOnLinux frontend for Wine.
Linked here from ubuntuforums post from 3 years ago…
Thanks. Just what I was looking for
just dropping a comment to say thanks for your help 🙂
Found a lot of useful info!
I’m trying to find out the memory of my Graphics Card, but these commands arent working for me, what ‘terminal’ am i supposed to be using.
never mind, i figured it out.
I googled “arch find out how much memory video card has” and this site popped up first. Very helpful and thank you.
thanks very much.
So I was gifted this computer from a friend and still learning my way around Linux and poweruser stuff in general. When I followed the lspci route, it gave me three outputs:
Memory at ee000000 (32-bit, non-prefetchable) [size=16M]
Memory at e0000000 (64-bit, prefetchable) [size=128M]
Memory at e8000000 (64-bit, prefetchable) [size=32M]
So I don’t know what the difference is between prefetchable or not, but the article seemed to imply the “prefetchable” one was how much memory the graphics card had, but this one lists two. Does that mean the graphics card uses both somehow? Is my memory 128, 32, or the total of both in this case?
Источник
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.
Источник