Is there a way to check the size of the video memory? Specifically, is there one that works accurately for both integrated GPU's as well as PCI/AGP graphics cards?
Many integrated GPU's have dynamically allocated memory, so the solution would hopefully return either the maximum available video memory or the currently allocated amount. For stand-alone NVidia or ATI cards it would obviously return the total amount of physical GPU RAM.
lspci -v
does output memory figures, but I do not believe it is the video memory. I suspect the figure reported is some system memory allocation or block or channel size, but I don't know for sure. You can see in these test results that lspci was wrong in 5 of the 6 tests:
** ASUS EN210 PCIe - 1024 Mb ***
01:00.0 VGA compatible controller: nVidia Corporation GT218 [GeForce 210] (rev a2)
Subsystem: ASUSTeK Computer Inc. Device 8354
Memory at e3000000 (32-bit, non-prefetchable) [size=16M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
Memory at e0000000 (64-bit, prefetchable) [size=32M]
*** Galaxy 8400GS PCIe - 512 Mb ***
01:00.0 VGA compatible controller: nVidia Corporation G98 [GeForce 8400 GS] (rev a1)
Subsystem: nVidia Corporation Device 05cc
Region 0: Memory at e4000000 (32-bit, non-prefetchable) [size=16M]
Region 1: Memory at d0000000 (64-bit, prefetchable) [size=256M]
Region 3: Memory at e2000000 (64-bit, non-prefetchable) [size=32M]
*** VirtualBox VM - 10 Mb (headless server) ***
00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter
Memory at e0000000 (32-bit, prefetchable) [size=16M]
*** VirtualBox VM - 128 Mb ***
00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter (prog-if 00 [VGA Controller])
Memory at e0000000 (32-bit, prefetchable) [size=128M]
*** S3 Savage 4 AGP - unknown Mb (old lspci log), but I don't think they made these cards with 128Mb memory! ***
00:01.0 VGA compatible controller: S3 Inc. Savage 4 (rev 06) (prog-if 00 [VGA controller])
Subsystem: IBM Unknown device 01c5
Region 0: Memory at feb80000 (32-bit, non-prefetchable) [size=512K]
Region 1: Memory at f0000000 (32-bit, prefetchable) [size=128M]
*** NVIDIA Quadro FX 1800 integrated - 1024 Mb ***
01:00.0 VGA compatible controller: nVidia Corporation GT215 [Quadro FX 1800M] (rev a2) (prog-if 00 [VGA controller])
Subsystem: Dell Device 040c
Memory at e2000000 (32-bit, non-prefetchable) [size=16M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
Memory at e0000000 (64-bit, prefetchable) [size=32M]
This is the o/p of dmesg with a ATI 6370HD discrete 1G graphics card. "Detected VRAM RAM=1024M, BAR=256M", check for this line.
The following worked for me:
My system outputs
Which means it has 256 MB of memory dedicated to the integrated video card.
Update: however, beware if you use one of the Intel HD Graphics cards. Its memory is usually shared with the main RAM of the system and it is dynamic, which means it increases and decreases on demand. In my system, I later discovered that it can grow up to 1.7 GB, and this value seems to be standard if you have a system with 4.0 GB of RAM (my case).
If you use a graphics card like this, the above output won't be of much help.
nvidia-settings does this for cards using the proprietary
nvidia
driver. It may be inaccurate but it is correct for my particular card. I don't know of any other userspace tool that specifically queries the video driver.You can also try
sudo lshw -class display
but I can't guarantee that it will be any more accurate than lspci. Also it reports memory ranges, not amounts, so you'd have to do some math.I find that
grep -i memory /var/log/Xorg.0.log
correctly reports the VRAM on my system's card. It does not work for my laptop using driverradeon
with integrated Radeon Mobility device.You can try this:
or this if the above command fails:
Nothing new - just looked at other posts and added pattern matching for a better formatted output.
There is a program called hardinfo, available in the Software Center, which will list out each video card (under the Devices drop-down, in the PCI Devices category) and the specs for each card, including the memory and vendor/model.