# Seeing only 379MB of 512MB DIMM installed [SOLVED]

## helio

I have recently installed a 64-bit gentoo (amd64) on a very old HP Pavilion a736n Desktop PC. The system has a 512MB DIMM installed, but the OS seems only able to access 379MB of memory, as indicated by the free, top, and cat /proc/meminfo commands, even though the BIOS still shows 512MB of DIMM available. Is there anyway I can access the entire 512MB memory? Thanks.Last edited by helio on Tue Sep 21, 2010 6:09 am; edited 1 time in total

----------

## NeddySeagoon

helio,

At a guess, I would say that 128Mb of your RAM is being donated to on board graphics.

In your BIOS, see if you can reduce the RAM used for graphics. 32Mb will be plenty unless you have ambitions to run 3D with texture support.

I have not looked up the specifications for your machine but 

```
 379

+128

=507
```

which leaves a few Mb for the kernel.

----------

## helio

NeddySeagoon,

thanks for suggestion. 

From the hp spec page, the graphic card is said to be "Integrated with up to 64 MB allocated video memory".  But /var/log/Xorg.0.log says

(--) SIS(0): 131072K shared video RAM (UMA)

(--) SIS(0): DRAM type: DDR SDRAM

(--) SIS(0): Memory clock: 182.554 MHz

(--) SIS(0): DRAM bus width: 64 bit

(--) SIS(0): Linear framebuffer at 0xE0000000

(--) SIS(0): MMIO registers at 0xED000000 (size 64K)

(--) SIS(0): VideoRAM: 131072 KB

(II) SIS(0): Using 130496K of framebuffer memory at offset

So I am confused how much the video ram really is, or if the graphic card takes any system RAM as well?

----------

## drescherjm

The graphics card has no video ram so it takes system ram. And xorg and free are both telling you that it is taking 128MB of system ram.

----------

## MotivatedTea

NeddySeagoon's probably got the right answer. Here are more details on how to go about testing it:

I'm not familiar with SIS graphics controllers, but on many lower-end or embedded graphics cards (especially Intel cards), the card itself has no video ram. It borrows memory from your system instead. You can often set how much memory is used in your BIOS. Start by checking there, and see if you can reduce the amount used as NeddySeagoon suggested.

If you can't find an option in your BIOS, or if it seems to have no effect, you might be able to control the value by using the VideoRam parameter in /etc/X11/xorg.conf. Assuming you're currently running without any xorg.conf file (as recommended), you should be able to create a minimal version that does nothing but change the VideoRam setting, something like this:

```
Section "Device"

# The Identifier line is required

    Identifier "Any text string you want"

# The Driver line is required.

# I'm guessing this is "sis" for you.

# If you don't already know the driver you're using you can probably figure it out from your existing Xorg.log.

    Driver "sis"

# Set VideoRam to the amount of memory you want to use.

# This is supposed to be measured in KB (according to the man page),

# but I've seen one system on which it was measured in MB. (That was presumably a bug in that driver.)

# Often this must be a power of two.

    VideoRam 32768

EndSection
```

Also see "man xorg.conf" and search for "VideoRam".

If you set the VideoRam too low, you'll lose graphics acceleration. (If you set it really low or larger than your memory available, X-windows won't run.) I'd recommend starting by setting it to the current value (131072, according to your log), make sure X-windows still works, and that your graphics acceleration still works. Then gradually reduce it by powers of two until you lose acceleration. Once you know the limit, increase it so acceleration works again.  (Unless you don't care about graphics acceleration, in which case you can save more memory.) The amount of memory your system needs to run (or to run with acceleration) will also depend on your screen resolution and bit depth.

This is not guaranteed to work, and I'm not familiar with your chipset, but it's easy to try and to undo if it doesn't help.

----------

## helio

Thanks everyone for the great suggestions.

Indeed the BIOS solution worked. The graphic card memory was set to 128MB by default for some reason, but 64MB and 32MB were the other two options. After I selected 32MB, now the top command indicates that 475264k system memory is accessible.

----------

