有没有办法检查视频存储器的大小?具体来说,有没有一种可以同时适用于集成GPU和PCI / AGP图形卡?
许多集成GPU已动态分配了内存,因此该解决方案有望返回最大可用视频内存或当前分配的内存量。对于独立的NVidia或ATI卡,它显然会返回物理GPU RAM的总量。
lspci -v
确实会输出内存数字,但我不认为这是视频内存。我怀疑报告的数字是某些系统内存分配,块或通道大小,但我不确定。您可以在以下测试结果中看到,在6个测试中的5个测试中,lspci是错误的:
** 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]