Friday, March 02, 2012

AMD UVD and the mysterious underclocking

I have known for a few months now that the first core in my MSI ATi Radeon 5970 card under-clocks itself to 400MHz core and 900MHz memory after resuming from a hybrid sleep. The issue disappears once I restart the computer, but that defeats the advantages of hibernating/resuming.

Normally, I wouldn't have noticed this under-clocking issue but I run one instance-each of a Bitcoin mining and the first instance of the two always runs at a reduced MHashes per second (~130MH/s for core 1 vs ~250MH/s of core 2). I have put away the task of diagnosing the cause of this strange malady afflicting only one of the two cores of my video card to some time in the future.

Well, that future is now and here's how I resolved the issue (well, sort-of):

At first, I thought that I could force the clocks via the Catalyst Control Center's AMD Overdrive section. But even after manually setting the clocks to 750MHz core and 1050MHz memory, the first core's clock speeds were stuck at 400MHz Core and 900MHz memory, no matter if there was a game running or not. The second core accepted the new clocks just fine.
Not to be deterred, I installed Radeon BIOS Editor (RBE) and tried to set the core clocks in the BIOS of the video card directly. It was when I was going through RBE's information rich interface that I noticed that there were multiple clock speed modes (which I already know) and among them was the infamous 400MHz/900MHz combination. This mode was exclusively being used by a PowerPlay (ATi's power saving technology) state called "UVD", which, of course, is ATi's GPU accelerated video decoding technology.

The problem then was obvious, given that no video (DXVA or otherwise) was being viewed; the video card's driver, for whatever reason, thought that it needed to put one of the cores in video decoding mode (UVD)when coming out of hibernation.

Seeing how performing a computer reboot clears the issue, it was as if the driver was getting confused when the computer is resuming from hibernation and needed to be reset for it to put the video card in the correct mode. That's the equivalent of slapping someone awake when they are groggy and confused. So now my task was to find an application that will reset the video card mode whenever I wanted to.

I found such a functionality in the application AMD GPU Clock Tool. Though the main utility of the application is that of changing the clock speed of AMD GPUs, apparently, it also has some hidden functionality. And one such functionality is that of resetting the video card mode, which is what I wanted. To accomplish this, I just need to call the application with the "restore" flag/option.

"C:\Program Files (x86)\AMD GPU Clock Tool\AMDGPUClockTool.exe" -restore

Now, my video card clocks are back to what it should be for each mode. I just need to remember to click on the AGCT's shortcut icon once I resume my computer from hybrid sleep.
Until AMD fixes this issue in their future driver release, I have to resort to this manual method of patching-up the issue.
Hope this post helps someone looking for an answer to this issue.


For reference, here are the clocks for a stock ATi Radeon card:
Idle (2d low) Clocks:
GPU: 157MHz
RAM: 300MHz

2d Medium Clocks:
GPU: 550MHz
RAM: 1000MHz

3d Clocks (High):
GPU: 725MHz
RAM: 1000MHz

UVD mode:
GPU: 400MHz
RAM: 900MHz


And finally, the RBE interface that helped me heaps: