Pages:
Author

Topic: The OhGodAVBIOS Suite - Edit PowerPlay Tables, Decode Timings, and More! (Read 4225 times)

jr. member
Activity: 42
Merit: 12
Interesting, as the actual "put code in the mclk and sclk" type stuff in sysfs does NOT actually change the clocks when I tried it on my 4 x R9 290 rig or my mixed R9 280x/HD7850/HD7750 rig.

Did you check /sys/kernel/debug/dri/0/amdgpu_pm_info to see if the clocks actually CHANGED? (change the 0 for the specific card being checked of course).


Might also be a "R9 3xx" vs "R9 2xx" difference, or a GCN 3 vs older GCN versions difference, if it DOES actually work - I only have R9 290/280x + HD 7870/7850/7750 cards to test on while GCN 3 wasn't introduced 'till the R9 285 (Tonga) card.





an old thread, but a few things for anyone that runs across it that still cares about using old cards: at least GCN 1 and 2 don't work with the amdgpu way of overclocking, AND some of the cards have "quirks" coded into the driver that sets a max speed, so even a vbios mod to, say, take the memory of a 7850 and run it at 1500mhz won't work because it's coded into the driver to not allow it over 1200mhz, Core clock was also maxed out at one point but I think that got lifted on the 7850. It's possible to mod that part of the driver even with the amdgpu-pro one.. once that's edited, you can change clocks and voltages for cards in the vbios. hex editing and VBE7 are the things to do that for pitcairn (7850, 7870, r7 265 r9 270/270x and r7 370.) tahiti (7950, 7970, 7990, 7870 XT, 280, 280X). I'd expect it to work on 7750 and 7770 too, but not 7790, as 7790 is actually GCN 2 like the 290(X) and 390(X) are. Not sure if Hawaii Bios Editor can handle the 7790, but otherwise that's the tool for those. GCN 3 cards, like the R9 285 and 380.. not sure if overclocking works with the amdgpu way, and I'm unsure what vbios editing tools work with them.

edit: as for the 7870 XT, which is different from the 7870, it's got a Tahiti core stripped down to a 256bit bus like Pitcairn but has more compute units and better FP64 performance on those units than Pitcairn has.
legendary
Activity: 1498
Merit: 1030
Interesting, as the actual "put code in the mclk and sclk" type stuff in sysfs does NOT actually change the clocks when I tried it on my 4 x R9 290 rig or my mixed R9 280x/HD7850/HD7750 rig.

Did you check /sys/kernel/debug/dri/0/amdgpu_pm_info to see if the clocks actually CHANGED? (change the 0 for the specific card being checked of course).


Might also be a "R9 3xx" vs "R9 2xx" difference, or a GCN 3 vs older GCN versions difference, if it DOES actually work - I only have R9 290/280x + HD 7870/7850/7750 cards to test on while GCN 3 wasn't introduced 'till the R9 285 (Tonga) card.




sr. member
Activity: 588
Merit: 251
AMDGPU however does NOT support undervolt OR clock control for R9 series cards (try it, the clocks DO NOT MOVE no matter what settings you use)

It works fine for GCN3 (i.e. Tonga).
Code:
sudo ./ohgodatool -i $r380 --core-state 5 --core-clock 906
sudo ./ohgodatool -i $r380 --core-state 5 --core-vddc-idx 1

It's not quite as good as Polaris, because the AMDGPU driver seems to use fixed voltage tables with Tonga rather than EVV.
You also need to watch out for the ACPI bug that causes powerplay to fail.  It seems BIOS and slot dependent, so you might not encounter it.  I had problems with the the 16x slot on H97 anniversary boards, and after trying a couple different BIOS versions I gave up and just use the 5 1x slots.
legendary
Activity: 1498
Merit: 1030

As someone brought up before, AMD is releasing stuff for Polaris Soon™. Our tool isint limited in this regard, however.

Polaris undervolt under AMDGPU is possible NOW (and I think it also can be done for Vega but haven't actually looked at the code for that) - but you have to hack the applicable kernal module and it's an ugly mess - and trying to do it with individual undervolt for each card is going to be a major PITA on the current AMDGPU version.
AMDGPU however does NOT support undervolt OR clock control for R9 series cards (try it, the clocks DO NOT MOVE no matter what settings you use), and STILL offers exactly ZERO support at all for the iGPU on AMD A-series CPUs (even the GCN ones)
OpenCL for SOME APU models under ROCm is supported (works on the 7890k and 7860k, I've not tested on the 5700 as that's pre-GCN, and I don't have any other models to test it on) but forget trying to use APU graphics if you have anything else in the system using AMDGPU.

*SUPPOSEDLY* they are adding undervolt control to "the next version" of AMDGPU - but ghods only know when that will show up, and if it will work with anything OTHER THAN Polaris or Vega.


In my testing, the undervolt DID reduce power consumption some on Polaris cards that are not already BIOS modded, but I don't recommend trying to do so on modded cards due to how the driver code is set up.
The Phoronix "818" figure proved to be rather optimistic across a range of RX 470/480 cards for stability though, I think I ended up at 850 or 860 before I finally got the rig to be stable for more than a couple hours at a time.


Real driver support on a per-card basis would be a LOT better.


legendary
Activity: 1302
Merit: 1068
Sorry i haven't kept watch on this thread.

We have this currently available as a private tool called OhGodAVolt. This handle communicating with the various VRMs to control it according to specifications.

As someone brought up before, AMD is releasing stuff for Polaris Soon™. Our tool isint limited in this regard, however.
member
Activity: 91
Merit: 10
so voltage control not possible with linux?
On phoronix they say some improvement are possible with next kernel versions
https://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-Linux-4.17-Round-1

I've recompiled amdgpu module with this kind of change
https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/amd-linux/918649-underclocking-undervolting-the-rx-470-with-amdgpu-pro-success
but in fact, I see that the numbers are already changed because of the bios power state, but that it have no effect. I could not continue investigation.

As far as I understand if one understand which memory have to be read/set to control the i2c, and understand the vbios tables (as read by AtomBiosReader), one could do what amdgpu do when interpreting the vbios pseudocode (x86 if I understand well). all normally is in the amdgpu driver, and as I suspect it could even be done with /dev/mem.
best of course would be to use sysfs peudo files calling subroutins in amdgpu, like it is already proposed for pp_*

sr. member
Activity: 2492
Merit: 319
Still not possible? Any update on this? Ethos/Hiveos as main linux distros seems still have the problem to set undervolt, and can only set DPM Sad

Now this is some really good forum necromancing skill Smiley

It really seems strange why would AMD skip doing it for Linux
newbie
Activity: 33
Merit: 0
Still not possible? Any update on this? Ethos/Hiveos as main linux distros seems still have the problem to set undervolt, and can only set DPM Sad
hero member
Activity: 672
Merit: 500
so voltage control not possible with linux?
full member
Activity: 199
Merit: 108
Look, I'm really not that interesting. Promise.
Added a Windows version of OhGodADecode, courtesy of Vento041!
Where to download windows ver.. on github have just linux ver.

It's under the releases: https://github.com/OhGodACompany/OhGodADecode/releases/download/1/ohgodadecode.exe
sr. member
Activity: 248
Merit: 250
Added a Windows version of OhGodADecode, courtesy of Vento041!
Where to download windows ver.. on github have just linux ver.
full member
Activity: 199
Merit: 108
Look, I'm really not that interesting. Promise.
Added a Windows version of OhGodADecode, courtesy of Vento041!
sr. member
Activity: 588
Merit: 251
Just getting around to testing ohgodatool.  So far I'm impressed; with this and rocm-smi it looks like I can do everything I could with fglrx/aticonfig.
If I had learned this tool last week when you released it, I could've had a much easier time testing memory straps.  I used to change mclk in PBE, copy the BIOS file to my rig, flash, reboot, then test.  Now it's just --mem-state 1 --mem-clock xxxx, and test the change.

And once I've found a stable mem clock, I can use it to mod the bios file without having to launch a windoze vm for PBE.
Thanks for releasing this!

While changing mclk works great, so far I've had no luck with voltage changes.  They report as having changed, but power consumption does not change.  I've tried changing individual dpm states to evv and fixed voltages - no effect.  I've tried changing every state from 1-7, and still no effect.
Code:
$ sudo ./ohgodatool -i 0 --show-core
DPM state 0:
        VDDC: 800 (voltage table entry 0)
        VDDC offset: 0
        Core clock: 300
DPM state 1:
        VDDC: 850 (voltage table entry 8)
        VDDC offset: -26
        Core clock: 466
DPM state 2:
        VDDC: 850 (voltage table entry 8)
        VDDC offset: -26
        Core clock: 751
DPM state 3:
        VDDC: 850 (voltage table entry 8)
        VDDC offset: -26
        Core clock: 1019
DPM state 4:
        VDDC: 850 (voltage table entry 8)
        VDDC offset: -26
        Core clock: 1074
DPM state 5:
        VDDC: 850 (voltage table entry 8)
        VDDC offset: -26
        Core clock: 1126
DPM state 6:
        VDDC: 850 (voltage table entry 8)
        VDDC offset: -26
        Core clock: 1169
DPM state 7:
        VDDC: 850 (voltage table entry 8)
        VDDC offset: 0
        Core clock: 1216
sr. member
Activity: 588
Merit: 251
Just getting around to testing ohgodatool.  So far I'm impressed; with this and rocm-smi it looks like I can do everything I could with fglrx/aticonfig.
If I had learned this tool last week when you released it, I could've had a much easier time testing memory straps.  I used to change mclk in PBE, copy the BIOS file to my rig, flash, reboot, then test.  Now it's just --mem-state 1 --mem-clock xxxx, and test the change.

And once I've found a stable mem clock, I can use it to mod the bios file without having to launch a windoze vm for PBE.
Thanks for releasing this!

full member
Activity: 199
Merit: 108
Look, I'm really not that interesting. Promise.
Cleaner code than mine, but missing CAS timing output, so I added it.
https://github.com/nerdralph/OhGodADecode

Also added a Makefile.


Thank you so much! Would it be okay if you did a pull request, if it's no bother?

Well normally just my wife gets my pull requests... :-)


Oh! Well, better get her permission first. She might be open to a three-way merge.

Thank you very much!
sr. member
Activity: 588
Merit: 251
Cleaner code than mine, but missing CAS timing output, so I added it.
https://github.com/nerdralph/OhGodADecode

Also added a Makefile.


Thank you so much! Would it be okay if you did a pull request, if it's no bother?

Well normally just my wife gets my pull requests... :-)
full member
Activity: 199
Merit: 108
Look, I'm really not that interesting. Promise.
Cleaner code than mine, but missing CAS timing output, so I added it.
https://github.com/nerdralph/OhGodADecode

Also added a Makefile.


Thank you so much! Would it be okay if you did a pull request, if it's no bother?
sr. member
Activity: 588
Merit: 251
Cleaner code than mine, but missing CAS timing output, so I added it.
https://github.com/nerdralph/OhGodADecode

Also added a Makefile.
full member
Activity: 199
Merit: 108
Look, I'm really not that interesting. Promise.
Nice! Can't wait to play with this. Thanks!! Grin

You are so very, very welcome!

Thank you for this release !
Will try this as soon as i come back from work have time (i hope it will be before this week-end, as i'm really looking forward to test it :p)

If you need any help, you can come to me on Freenode - I'm under OhGodAGirl; I'm also available on everything else as, you guessed it, OhGodAGirl. Just let me know!
full member
Activity: 185
Merit: 100
Nice! Can't wait to play with this. Thanks!! Grin

You are so very, very welcome!

Thank you for this release !
Will try this as soon as i come back from work have time (i hope it will be before this week-end, as i'm really looking forward to test it :p)
Pages:
Jump to: