diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-09 17:35:39 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-09 17:35:39 -0400 |
commit | e888aad7554e734fba8be767160772c61b080a68 (patch) | |
tree | 60721732d380f73608a7fbcdcb060587aebdf902 /pts-core/functions/pts-functions_system_graphics.php | |
parent | 8e32927b6bb6f16a8349ead26ca143f999d0ea5f (diff) | |
download | phoronix-test-suite-upstream-e888aad7554e734fba8be767160772c61b080a68.tar.gz phoronix-test-suite-upstream-e888aad7554e734fba8be767160772c61b080a68.tar.xz phoronix-test-suite-upstream-e888aad7554e734fba8be767160772c61b080a68.zip |
pts-core: Improved Video RAM detection when parsing X log
Diffstat (limited to 'pts-core/functions/pts-functions_system_graphics.php')
-rw-r--r-- | pts-core/functions/pts-functions_system_graphics.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pts-core/functions/pts-functions_system_graphics.php b/pts-core/functions/pts-functions_system_graphics.php index 51377be..609119d 100644 --- a/pts-core/functions/pts-functions_system_graphics.php +++ b/pts-core/functions/pts-functions_system_graphics.php @@ -580,10 +580,14 @@ function graphics_memory_capacity() // fglrx driver reports video memory to: (--) fglrx(0): VideoRAM: XXXXXX kByte, Type: DDR $info = shell_exec("cat /var/log/Xorg.0.log | grep VideoRAM"); - if(($pos = strpos($info, "VideoRAM:")) > 0) + + if(empty($info)) + $info = shell_exec("cat /var/log/Xorg.0.log | grep \"Video RAM\""); + + if(($pos = strpos($info, "RAM:")) > 0) { - $info = substr($info, $pos + 10); - $info = substr($info, 0, strpos($info, ' ')); + $info = substr($info, $pos + 5); + $info = substr($info, 0, strpos($info, " ")); $video_ram = intval($info) / 1024; } } |