Bitcoin Forum
April 26, 2024, 02:18:51 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: HowTo: Viewing VRM temperatures under Windows in your application(x64 as well).  (Read 1698 times)
Remember remember the 5th of November (OP)
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
November 08, 2012, 02:24:24 PM
Last edit: November 08, 2012, 08:38:53 PM by Remember remember the 5th of November
 #1

Hi all.

A while back a user posted a tool called radeonvolt for Linux that was able to display the VRM temperatures and other sensor data for the HD5850. The tool was Linux only. I decided that something must be done for Windows as well, and came to a conclusion with satisfying results. While the GPU mining era is over, there will still be people mining with them various alt-coins even after ASIC hits.

Development in Windows is tricky, more so when you want to map physical memory to userspace. In Linux, you do it with a couple of lines of code, in Windows you need a kernel mode driver and must be digitally signed for x64 variants of Windows(which the majority of us use).
I tried with the KMDF framework, but apparently, Windows didn't like that, so I instead stopped on WDM(Windows Driver Model). Not knowing how to actually map memory, I googled and discovered this awesome driver on CodeProject that does exactly this.

I went in, and compiled PhyMem for Windows 7 x64, and pmdll which is a wrapper for accessing the driver with Visual Studio 2012(Was going to use MinGW but was advised not to for kernel drivers). I had compiled pciutils for Windows x64 last year, so I used radeonvolt with minimum changes to the code. PCIUtils for Windows is great, but apparently does not fetch the PCI Region size under Windows so I had to act blind on which address to use to map memory, for my 5850 under Windows it was the 2nd I believe.
After compiling radeonvolt with the needed changes, I was able to successfully display VRM,Voltage,Current and whatnot.
I noticed that the 5870 is similar to the 5850 in regards to the GPU registers and whatnot, so it was possible to make the code display sensor data from it, I don't know of any side effects though. Make sure you do not have multiple tools that do I2C on the card, or you may cause damage.
As for other cards, we need technical documents to understand the internals and write code for it.

In order to run self-signed drivers on Windows x64, test-signing must be enabled(Driver signing is not enforced on Windows x86). I was also given a link to a project that apparently bypasses driver signing requirement under Windows x64, but I have not tested it and I'm not going to discuss the legality of that now. Link http://code.google.com/p/bypass-x64-dse/

Mapping Physical Memory to userspace is dangerous. Any person with malicious intent aware of such a map may use it to gain control over the system, elevating privileges or doing severe damage with the power of just overwriting data on a specific memory address. Use with care.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
Whoever mines the block which ends up containing your transaction will get its fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714097931
Hero Member
*
Offline Offline

Posts: 1714097931

View Profile Personal Message (Offline)

Ignore
1714097931
Reply with quote  #2

1714097931
Report to moderator
1714097931
Hero Member
*
Offline Offline

Posts: 1714097931

View Profile Personal Message (Offline)

Ignore
1714097931
Reply with quote  #2

1714097931
Report to moderator
1714097931
Hero Member
*
Offline Offline

Posts: 1714097931

View Profile Personal Message (Offline)

Ignore
1714097931
Reply with quote  #2

1714097931
Report to moderator
2GOOD
Hero Member
*****
Offline Offline

Activity: 547
Merit: 531


First bits: 12good


View Profile WWW
November 08, 2012, 02:24:56 PM
 #2

GPU-z  Grin

how do they do it  Roll Eyes

Remember remember the 5th of November (OP)
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
November 08, 2012, 02:26:31 PM
 #3

I was not asking for a tool. I was providing directions on how to build an application that is able to access VRM temperatures on Windows. Plus, GPU-Z is closed source and does not provide any code/tips on how to do it.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
2GOOD
Hero Member
*****
Offline Offline

Activity: 547
Merit: 531


First bits: 12good


View Profile WWW
November 08, 2012, 02:28:20 PM
 #4

Yes, but why to bother when there is a free tool out there. I don't get it

Remember remember the 5th of November (OP)
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
November 08, 2012, 02:30:01 PM
 #5

Because it allows building of more robust tools. It for instance now allows me to continue development of my program which monitors GPU sensors and tries to keep the system from overheating,fan failure. But VRM sensors were not exposed via the AMD ADL SDK.
Now I will monitor VRM temps trying to keep the system nice and cool. Plus, there is absolutely no information on the internet on how to do it.

And if everything goes as planned, allows me to develop a commercial non-free application. I just shared the instructions so everyone has a chance.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
2GOOD
Hero Member
*****
Offline Offline

Activity: 547
Merit: 531


First bits: 12good


View Profile WWW
November 08, 2012, 02:33:33 PM
 #6

That makes more sense, anyway my opinion is that you are at least a year late.

Anyway good luck with the project. I'll be happy to beta test it Wink

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!