Page 1 of 2

Total Vram Test

Posted: June 28th, 2017, 1:35 pm
by StArL0rd84
As some of you might already know, i am making a suite, And it has a GPU monitor.
The bar in the skin needs to know the Total amount in order to be correct.
In stead of asking the user to punch in the amount manually i needed it to measure it automatically.

Both HWINFO and MSI afterburner cannot tell me the total amount of Vram on my GPU, but i found this 4 year old post by slaithan, and Dank420 posted an answer that can get the value from the registry.
https://forum.rainmeter.net/viewtopic.php?t=15350

But when i plugged it in my skin it only showed half of the Vram present in my GPU.
Made a simple modification so it just doubles the amount.
But before i can release my suite i need to know how this modification will work on other machines.
gpu.png
So please lend me a hand and test it on your machine, and let me know what result you get.
What i need to know from you:
Was Total Vram 1 or 2 correct for you?
TotalVramTest_1.0.rmskin

Re: Total Vram Test

Posted: June 28th, 2017, 4:44 pm
by jsmorley
For me Vram2 is sorta correct, it says 4015 MB, but the name of the video card is wrong. I upgraded and replaced my video card recently, but for some reason the registry still has the old name. Not sure you can trust the registry for this stuff...

Re: Total Vram Test

Posted: June 28th, 2017, 4:56 pm
by jsmorley
I would think RunCommand with something like:

wmic.exe PATH Win32_videocontroller GET AdapterRAM, name

Would be more reliable.
1.png

Re: Total Vram Test

Posted: June 28th, 2017, 7:26 pm
by Brian
jsmorley wrote:Was Total Vram 1 or 2 correct for you?
My Vram1 was double for some reason.
vram.png
I would suggest using the wmic command like jsmorley pointed out.

-Brian

Re: Total Vram Test

Posted: June 28th, 2017, 8:21 pm
by StArL0rd84
I should clarify.
Don't really need the GPU name.
Just need to know if it's consistent.
But if brian's Vram1 is doubled then the registry method wont work.
Thanks for testing guys.

Re: Total Vram Test

Posted: June 28th, 2017, 8:36 pm
by balala
Here something is going really wrong:
Image
Image

Re: Total Vram Test

Posted: June 28th, 2017, 9:11 pm
by StArL0rd84
I tried the RunCommand route and this is what i came up with.

Code: Select all

[TotalVram]
 Measure=Plugin
 Plugin=RunCommand
 Parameter=wmic PATH Win32_videocontroller GET adapterram
 OutputType=ANSI
 DynamicVariables=1
 OutputType=ANSI
 OutputFile=#CURRENTPATH#Vram.txt
 RegExpSubstitute=1
 Substitute="AdapterRAM.*#CRLF#":"","#CRLF#.*":""

[TotalVramCalc]
 Measure=Calc
 Formula=( Round ( [TotalVram] / ( 1024 ** 3 )))
 DynamicVariables=1
 OnChangeAction=[!UpdateMeter *][!Redraw]

[MeterResult]
 Meter=String
 MeasureName=TotalVramCalc
 Text=%1
 FontSize=14
 FontColor=255,255,255,255
 SolidColor=47,47,47,255
 AntiAlias=1
 LeftMouseUpAction=[!CommandMeasure TotalVram "Run"]
Struggeling with the TotalVramCalc though.

If i do Formula=[TotalVram] i get 4293918720
And with the current calculations in the calc measure, i get a value of 4 when i should be getting 8 (8GB).

Re: Total Vram Test

Posted: June 28th, 2017, 9:14 pm
by jsmorley
Not sure. I have 4gig of RAM on my video card, and wmic tells me 4gig... No complicated formula other than AutoScale on the String meter is really needed.

Re: Total Vram Test

Posted: June 28th, 2017, 9:21 pm
by StArL0rd84
jsmorley wrote:Not sure. I have 4gig of RAM on my video card, and wmic tells me 4gig... No complicated formula other than AutoScale on the String meter is really needed.
Oh, Doh :D
Tried autoscale and wmic tells me 4gig too.
Hmm. Perhaps this is why HWINFO and MSI Afterburner's not able to get it either.

Re: Total Vram Test

Posted: June 28th, 2017, 9:21 pm
by jsmorley

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!CommandMeasure TotalVram "Run"]

[TotalVram]
Measure=Plugin
Plugin=RunCommand
Parameter=wmic PATH Win32_videocontroller GET adapterram
OutputType=ANSI
DynamicVariables=1
OutputType=ANSI
OutputFile=#CURRENTPATH#CPUName.txt
RegExpSubstitute=1
Substitute="AdapterRAM.*#CRLF#":"","#CRLF#.*":""

[MeasureVramToNum]
Measure=Calc
Formula=[TotalVram]
DynamicVariables=1

[MeterResult]
Meter=String
MeasureName=MeasureVramToNum
AutoScale=1
Text=%1B
FontSize=14
FontColor=255,255,255,255
SolidColor=47,47,47,255
AntiAlias=1
1.png