How can I change the amount of video memory?

unhappy_mage

[H]ard|DCer of the Month - October 2005
Joined
Jun 29, 2004
Messages
11,455
I've got a laptop with an 855GM graphics controller in it. The machine has only 512 MB of memory, and xorg is allocating 128 of that to video memory. Here is a snippet from Xorg.0.log:
Code:
(II) intel(0): I830CheckAvailableMemory: 448508 kB available
(==) intel(0): VideoRam: 131072 KB
I tried forcing a smaller allocation (16 or 32 MB would be better for me) but the only change I got a was a warning that the VideoRAM directive is no longer supported.

I checked settings in the BIOS, there is no AGP aperture setting. In "top", xorg is using over 190 MB of virtual memory:
Code:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 5641 root      15   0  194m 8744 4224 S 11.1  1.7   0:38.53 Xorg
and it appears that this memory is actually mapped to physical memory; for all intents and purposes this is acting like a 384 meg machine. The results are the same with the "intel" and the "i810" drivers.

How can I change the amount of video memory used? I've googled for a good hour now, and other people seem to be hitting this problem, but I haven't found a solution.
 
Video memory is changed in the BIOS.

My laptop has an intergrated 7150 that uses system memory and I can only change it in the BIOS.
 
There is nothing wrong with what you are seeing. The 128mb that xorg reports as being available to the card is fine, it includes agp aperature and stuff like that too. If you want to see more description on how xorg is reading the card's memory then you can check the xorg logs, but what you're seeing is fine.


I checked settings in the BIOS, there is no AGP aperture setting. In "top", xorg is using over 190 MB of virtual memory:
Code:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 5641 root      15   0  194m 8744 4224 S 11.1  1.7   0:38.53 Xorg
and it appears that this memory is actually mapped to physical memory; for all intents and purposes this is acting like a 384 meg machine. The results are the same with the "intel" and the "i810" drivers.

This is not the case. Xorg is taking up 194 megabytes of virtual memory, which includes shared libraries and swapped pages and all that mess. The actual physical memory footprint of the process is given by the RES column (in kilobytes), so in your case xorg is taking up a little over 8mb of actual physical ram. The top man pages give lots of details about exactly what the memory usage figures mean, check them out if you're in doubt.
 
There is nothing wrong with what you are seeing. The 128mb that xorg reports as being available to the card is fine, it includes agp aperature and stuff like that too. If you want to see more description on how xorg is reading the card's memory then you can check the xorg logs, but what you're seeing is fine.
Code:
(II) intel(0): Memory allocation layout:
(II) intel(0): 0x00000000-0x0001ffff: ring buffer (128 kB)
(II) intel(0): 0x00020000-0x00027fff: logical 3D context (32 kB)
(II) intel(0): 0x00028000-0x00037fff: xaa scratch (64 kB)
(II) intel(0): 0x000df000:            end of stolen memory
(II) intel(0): 0x000df000-0x000dffff: Core cursor (4 kB, 0x15965000 physical)
(II) intel(0): 0x000e0000-0x000e3fff: ARGB cursor (16 kB, 0x14004000 physical)
(II) intel(0): 0x000e4000-0x000e4fff: Core cursor (4 kB, 0x14801000 physical)
(II) intel(0): 0x000e5000-0x000e8fff: ARGB cursor (16 kB, 0x14804000 physical)
(II) intel(0): 0x000e9000-0x000e9fff: overlay registers (4 kB, 0x14165000 physical)
(II) intel(0): 0x000f0000-0x030e7fff: front buffer (49120 kB)
(II) intel(0): 0x030e8000-0x032e7fff: DRI memory manager (2048 kB)
(II) intel(0): 0x04000000-0x04ffffff: back buffer (10240 kB)
(II) intel(0): 0x05000000-0x05ffffff: depth buffer (10240 kB)
(II) intel(0): 0x06000000-0x07ffffff: textures (32768 kB)
(II) intel(0): 0x08000000:            end of aperture
That sure looks to me like at least 96MB is being used. Am I misinterpreting this? 50 MB front buffer + 10 MB back buffer + 10 MB depth buffer + 32MB textures.
This is not the case. Xorg is taking up 194 megabytes of virtual memory, which includes shared libraries and swapped pages and all that mess. The actual physical memory footprint of the process is given by the RES column (in kilobytes), so in your case xorg is taking up a little over 8mb of actual physical ram. The top man pages give lots of details about exactly what the memory usage figures mean, check them out if you're in doubt.

But there's no swap or real video memory in the system. Those pages have to be somewhere real, right? The top man page says that VIRT=SWAP+RES, and there is no swap:
Code:
Mem:    515432k total,   509072k used,     6360k free,    20256k buffers
Swap:        0k total,        0k used,        0k free,   192952k cached
so I don't think there's any way those pages are anywhere else. Turning on the 'DATA' column shows that only 17 MB of that memory is in use in the stack or the heap, but the 'SWAP' column shows that 205m is swapped, despite the fact that there isn't any!

Is there a way I can see what pages are in use for what purpose for xorg? For the whole system? If I boot the system in qemu or VMware? I'm willing to believe it's not xorg, okay, but something is certainly taking a lot of memory. Just sitting at the (KDE) desktop with no additional things running takes more than 250 megabytes of memory. Some of that is from aufs (this machine mounts its root filesystem from a squashfs image and overlays that with a memory-backed filesystem with COW) but I wouldn't expect *that* much memory would be used by the tmpfs: only 50 MB of files are currently stored on it.
 
Back
Top