≡ Menu

Linux: Find Out Video Card Memory RAM Size Using Command Line Utility

I have a quick question for you, Vivek: I’m trying to find out my NVDIA display card memory size. I’m using Fedora Core Linux. How do I find out my VIDEO Card Memory size?

You need to use the following commands to find out graphics card memory.

  1. lspci command – It is a utility for displaying information about all PCI buses in the system and all devices connected to them.
  2. /var/log/Xorg.0.log – Xorg log file

lspci Command Example To Find Out Graphics Card Memory Size

Open a terminal and type the lspci command
$ lspci

00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface (rev 03)
00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 82)
00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 02)
01:00.0 Network controller: RaLink RT2561/RT61 rev B 802.11g
01:02.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
01:02.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
01:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

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:

00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 03) (prog-if 00 [VGA])
        Subsystem: Giga-byte Technology Unknown device 2562
        Flags: bus master, fast devsel, latency 0, IRQ 177
        Memory at d0000000 (32-bit, prefetchable) [size=128M]
        Memory at d8200000 (32-bit, non-prefetchable) [size=512K]

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

Xorg Log File

Open a command-line terminal (select Applications > Accessories > Terminal), and then type:
$ grep -i --color memory /var/log/Xorg.0.log
Sample outputs:

(--) Aug 02 12:16:20 NVIDIA(0): Memory: 1048576 kBytes
(II) Aug 02 12:16:21 NVIDIA: Using 768.00 MB of virtual memory for indirect memory access.
(==) NVIDIA(0): Disabling shared memory pixmaps

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:

[2318869.434] (II) intel(0): detected 15868 kB stolen memory.
[2318869.472] (II) intel(0): I830CheckAvailableMemory: 1966080 kB available
[2318869.486] (II) intel(0): Attempting memory allocation with tiled buffers.
[2318870.197] (II) intel(0): Fixed memory allocation layout:
[2318870.197] (II) intel(0): 0x00f7f000:            end of stolen memory
[2318870.197] (II) intel(0): 0x00f7f000-0x0fffffff: DRI memory manager (246276 kB)
[2318870.197] (II) intel(0): BO memory allocation layout:
[2318870.197] (II) intel(0): 0x00f7f000:            start of memory manager
[2318870.197] (II) intel(0): 0x10000000:            end of memory manager
Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:

{ 28 comments… add one }
  • winrid August 3, 2008, 4:50 pm

    How do I check the amount of video card memory being used?

  • Fox August 21, 2008, 8:26 pm

    Thx, that helped me, but waht means “access denied” after the “capabilities”? That means my vga card is not in use? (I think)

    • sherif April 16, 2011, 8:44 am

      try sudo

    • Kandi Klover March 23, 2014, 10:20 pm

      heheh ur a furry <3 murr

  • dibber September 7, 2008, 6:28 pm

    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.

    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

  • Frans van Beckel September 14, 2008, 8:13 am

    what means “access denied” after the “capabilities”?

    Do use superuser. #sudo lspci -v -s 00:02.0

  • luke October 20, 2008, 7:39 pm

    how do i find how much memory my video card has?

  • Danny G March 20, 2009, 1:55 am

    You could also do:

    lspci -v | grep VGA -A12

    To focus the -v option right to the VGA adapter

  • leo October 26, 2009, 6:13 pm


    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


  • Gustavo H Reyes November 17, 2009, 7:35 pm
    [admin@ttcol06p admin]$ sudo grep -i mem /var/log/XFree86.0.log|grep VESA
    (II) VESA(0): VESA VBE Total Mem: 8000 kB
    (II) VESA(0): Total Memory: 125 64KB banks (8000kB)
    (II) VESA(0): VESA VBE Total Mem: 8000 kB

    For Xorg:

    grep -i mem /var/log/Xorg.0.log |grep VESA

    Saludos desde Argentina!

  • raj April 6, 2010, 7:21 am

    how to run .exe files in linux?

    • Hashmatullah October 10, 2010, 5:00 pm

      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.

      • Propeng October 30, 2010, 9:42 am

        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.

        • Hashmatullah October 30, 2010, 5:34 pm

          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.

    • raj kumar April 28, 2013, 12:04 pm

      if you have binary .exe then use wine
      or if .net .exe use mono to run exe that my personal experience

  • Daniel April 21, 2010, 8:33 pm

    This is what I’m using in one of my scripts. And as the comments say, it doesn’t always return the correct value.

    # Function  : guess_video_memory
    # Parameters: none
    # A sloppy function to attempt to retrieve video memory.  This is known to be
    # incorrect in some cases, although the value returned should never be higher
    # than actual. If you know a better way, please email it to me!
    guess_video_memory() {
        test -x /usr/sbin/lspci || return 1
        slot="$(/usr/sbin/lspci | grep "VGA compatible controller:" | awk '{print $1}')"
        test -n "${slot}" || return 1
        let videomem="$(/usr/sbin/lspci -vs ${slot} |
            egrep ' prefetchable\) \[size=[0-9]+M' |
            perl -pe 's/.*size=([0-9]+)M.*/$1/g')" || return 1
        return 0
  • swaroop October 10, 2011, 3:52 am

    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

  • Toppo November 24, 2011, 7:37 pm

    hey hi, i just wanna know how and where do i run the .SH file format, am using FEDORA 14.

  • Mubeen February 11, 2012, 10:02 pm

    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 ??

  • Jayen March 11, 2012, 7:51 am

    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.

  • Anand August 29, 2013, 5:48 pm

    Really helpful article.
    Googled “how to check video memory on ubuntu server”, you guys were at second.

  • Sean October 12, 2013, 1:57 pm

    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…

  • Damon Ridley May 31, 2014, 12:49 pm

    Thanks!!! Just what I was looking for

  • Gimmy September 30, 2014, 12:16 pm

    Hi guys,

    just dropping a comment to say thanks for your help :)
    Found a lot of useful info!

  • Jesse December 10, 2014, 9:26 pm

    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???

    • Jesse December 10, 2014, 9:35 pm

      never mind, i figured it out.

  • John April 30, 2015, 9:31 pm

    I googled “arch find out how much memory video card has” and this site popped up first. Very helpful and thank you.

  • onni May 22, 2015, 11:51 am

    thanks very much!!!

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , , , , , , , , , , , , , , , ,