Bitcoin Forum
June 19, 2024, 11:41:49 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: How to Hack Your Radeon 79x0 GPU BIOS (any version) to Undervolt it  (Read 16330 times)
swiftshoot (OP)
Full Member
***
Offline Offline

Activity: 200
Merit: 100


View Profile
October 14, 2013, 07:11:50 AM
Last edit: October 14, 2013, 07:36:58 AM by swiftshoot
 #1

Guys, I have done this on Sapphire 7970 and Gigabyte 7950s.  I had undervolted the ROMs to have them running at lover voltages.
Before specs:
  • 4 x 7950s @ 550kh/sec @ 1000 watts
  • 1 x 7970 @ 700kh/sec @ 350 watts
After undervolting modded stock BIOS
  • 4 x 7950s @ 665 kh/s @ 900 watts @ 1.0v
  • 1 x 7970 @ 730 kh/s @ 250 watts @ 0.962v

To modify your BIOS, follow the instructions listed below.  See Disclaimer below.

  • Grab atiflash and save your bios ("./atiflash -s 0 bios0.back.up.rom" to save bios from card zero),
  • Check that it produces a file of size 128Kb ("ls -lkh bios0.back.up.rom"),
  • If it produced file of size 256Kb, these will appear valid but attempting to write them back to the card will always fail, leaving you without a valid backup! In this case, retry to read the video card bios again specifying an additional size parameter ("./atiflash -s 0 bios0.back.up.rom 20000"),
  • You should save the bios from each card, then use diff to see which match and modify that subset, then flash all the cards,
  • Please check all GPUs stock voltage in cgminer GPU Management and Bios Config File in output of "./atiflash -ai", these can vary between bios in "identical" brand GPUs,
  • Transfer all bios to a Windows PC/laptop using WinSCP, or via Webmail if you do not have WinSCP
  • Open the saved bios in a hex editor, we use Frhed,
  • Convert that bios stock GPU voltage into hex, eg google "1125 in hex" if bios stock voltage is 1.125. The hex equivalent in this case is 0x465,
  • Reverse the stock hex voltage, eg: 0x465 = 04 65 = 65 04,
  • Using your hex editor, search and replace for (reversed stock voltage) <bh:00><bh:65><bh:04><bh:00> with your desired voltage in the same pattern, eg: to undervolt to 0.962V, 0962 = 0x3C2 = c2 03, so you'd replace with <bh:00><bh:c2><bh:03><bh:00>,
  • Save the modified bios to a different file name so you can always write the original back if required,
  • Unlock the bios for the card you wish to flash (eg: ./atiflash -unlockrom 0),
  • Transfer the modified bios back to your (Linux) coin mining rig and write the modified bios back to the video card using atiflash with the -f parameter to bypass checksum checks. In our experience this can fail multiple times before succeeding and some bios require using different write flags (-atmel, -sst).
  • Cold Reboot and use cgminer GPU Management to see new undervoltage in action!
  • We recommend doing one card to start with and not the primary video card until you are confident with the process :-)

After doing all this above, you will save money and be able to run a cooler rig.  I now use 1250 watts total and it a beautiful space heater for my whole house Smiley

Happy Bios Flashing, Video Card Undervolting & Coin Mining!



If you Found this article useful, please send a donation to:

BTC: 1PoN7e4q5DMoTXiU2HYecbaGrb78mSxo6W
LTC: LNYFzi4ed8gBwk8joVpntk5apUcvndu2g9
BTB: BBe9NyL2uzne4ZEXax39huFzUH1XMD4a7t
BTG: gbpuqkpmZVhcJgZBQtmGRamSvLdEhQFEkM

DISCLAIMER: Any and all modifications done here is at your own risk.  I am not responsible if your hardware goes dead, gets damaged, or burns up.  This information is strictly for educational purpose.  Use at your own risk.

Build your own Cloud Miner! https://cex.io/r/1/swiftshoot/0/
to Make your BTC Mine for you. 3% referral bonus if you sign up others... please use my referral code if you want to join. You can also redeem your hardware after you get enough GHS.
btc:
ltc:
other altcoins: send me PM for address.
ssateneth
Legendary
*
Offline Offline

Activity: 1344
Merit: 1004



View Profile
October 14, 2013, 03:17:57 PM
 #2

The benefit of doing this is what exactly?

I'm going to assume you have free power. The point of this is to reduce power consumption, so lower electric bills. It's also possible the resulting lower temperatures gives higher overclock headroom, even at lower volts.

kuusj98
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1000


I <3 VW Beetles


View Profile
October 14, 2013, 05:42:41 PM
 #3

Funny thing is, is that my HD7850's don't really use more power when overvolted, or use less when undervolted.
But, 100W is a huge win, such things mean ROI or no ROI.

Thanks for the guide, I thing many people will find this usefull.
ssateneth
Legendary
*
Offline Offline

Activity: 1344
Merit: 1004



View Profile
October 14, 2013, 05:57:04 PM
 #4

Funny thing is, is that my HD7850's don't really use more power when overvolted, or use less when undervolted.
But, 100W is a huge win, such things mean ROI or no ROI.

Thanks for the guide, I thing many people will find this usefull.

Maybe your 7850 is voltage locked.

Wipeout2097
Sr. Member
****
Offline Offline

Activity: 840
Merit: 255


SportsIcon - Connect With Your Sports Heroes


View Profile
October 14, 2013, 07:13:41 PM
 #5

That's an excellent post! I've done it 2 weeks ago, but using an usb pen booting DOS.

███████████████████████████████████████████████████████████████
██▀       ▀█       ▀████████████        ▀█         █▀       ▀██
██   ▀██▄▄▄█   ██   ████████████   ███   ████   ████   ▀██▄▄▄██
███▄     ▀██       ▄████████████       ▄█████   █████▄     ▀███
██▀▀▀██▄   █   █████████████████   █▄  ▀█████   ████▀▀▀██▄   ██
██▄       ▄█   █████████████████   ██▄  ▀████   ████▄       ▄██
███████████████████████████████████████████████████████████████
██       ██▀      ▀█████████████    ▀██   █████████████████████
████   ███   ▄██▄   ████████████     ▀█   █████████████████████
████   ███   ████████   ████   █   ▄  ▀   █████████████████████
████   ███   ▀██▀   █   ████   █   █▄     █████████████████████
██       ██▄      ▄███        ██   ██▄    █████████████████████
███████████████████████████████████████████████████████████████
██████████████
██
██
██
██
██
██
██
██
██
██
██
██████████████
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████                                                             ████████████████████████████████████████████████
.
.
.

████████████████████████████████████████████████████████████          ████████████████                                 ██████████████████████████████████████████████████████████████████████████████████████
██████████████
██
██
██
██
██
██
██
██
██
██
██
██████████████
███████
██
██
██
██
██
██
██
██
██
██
██
███████
███████
██
██
██
██
██
██
██
██
██
██
██
███████
►►  Powered by
BOUNTY
DETECTIVE
l3jmr
Member
**
Offline Offline

Activity: 99
Merit: 10


View Profile
October 14, 2013, 08:58:53 PM
 #6

Funny thing is, is that my HD7850's don't really use more power when overvolted, or use less when undervolted.
But, 100W is a huge win, such things mean ROI or no ROI.

Thanks for the guide, I thing many people will find this usefull.
Think most of 7850's are voltage locked. I have voltage slider on my asus/xfx cards and i can move it around. But if i check in gpu-z it's at the same stock value no matter what i do.

⚫ ⚫ ⚫  Listen to the weekly altcoinsidekick.com podcast to understand what cryptocurrency is really all about.  ⚫ ⚫ ⚫
AltcoinSidekick.com - CRYPTO Blog | Podcasts | Videos | Tools  ▬▬▬ ■
swiftshoot (OP)
Full Member
***
Offline Offline

Activity: 200
Merit: 100


View Profile
October 15, 2013, 02:33:10 AM
 #7

This is for Hardware that has Voltage locked via the BIOS.   All you are doing is Lowering the Voltage Lock ceiling down to a lower level.  This way, it is still voltage locked but at a lower level.  therefore unlocking it per say.

Build your own Cloud Miner! https://cex.io/r/1/swiftshoot/0/
to Make your BTC Mine for you. 3% referral bonus if you sign up others... please use my referral code if you want to join. You can also redeem your hardware after you get enough GHS.
btc:
ltc:
other altcoins: send me PM for address.
sveetsnelda
Hero Member
*****
Offline Offline

Activity: 642
Merit: 500


View Profile
October 15, 2013, 05:03:53 AM
 #8

Thanks for writing this guide, but be aware that this doesn't actually change the voltage.  It just changes what ADL *reports* as the voltage.  The voltage must be changed by modifying the values sent to the voltage regulator.  The number you're modifying is only a "label" for the voltage used, not to control the voltage itself.  You'll see the voltage change in CGMiner etc, but if you measure it with a meter, it didn't move.

14u2rp4AqFtN5jkwK944nn741FnfF714m7
sveetsnelda
Hero Member
*****
Offline Offline

Activity: 642
Merit: 500


View Profile
October 15, 2013, 05:50:41 AM
 #9

Further explanation:

For every 7000 series card, there are five voltages in a table for the "performance" state.  You'll notice that each 7000 series card you buy doesn't necessarily have the same voltage, but the BIOS is identical.  The voltage that gets used depends on the quality of the ASIC on the board.  If your chip has extremely low leakage, the lowest value (of the five voltages) gets used.  Highest leakage = highest value.  Somewhere in the middle = one of the other three values.  There is a function in GPU-Z that will read the "ASIC Quality" value of your card if you're curious.

It's even more complicated for boost BIOSes.  There's *another* table of 5 values for the "boost" state.  The card will switch back and forth depending on the thermal state.

On the 7990 cards, there's a THIRD leakage table (beyond the scope of what I'm writing).

If you want to change the voltage on a 7000 series card, you have to modify the extended voltage tables (referred to as LEAKID_VOLTAGE or VOLTAGE_LUT_ENTRY).  You either need to modify all 5 of the values to be identical (which is wasteful if you flash it to a bunch of cards with different leakage), or you need to modify the values proportionally to be higher/lower.  If it's a boost edition card, you'll need to modify the 2nd table as well.  For the 7990 cards, you'll need to modify the 3rd state table as well (assuming you're keeping the card extremely cool anyways...  otherwise the voltage will likely bounce around).

The cards that are "voltage locked" actually aren't technically "locked".  They still have a variable VRM and can be modified.  The BIOS just has a function that loops and repeatedly sets the voltage.  When you change the voltage with a utility like MSI Afterburner, the voltage actually changes for a split second but it gets changed back by the card's BIOS.  You can still set the voltage in the leakage tables though.

The only utility I'm aware of that will properly modify these tables is here:
http://www.techpowerup.com/forums/showthread.php?t=189089

This utility will modify all 5 voltage values to be the same though.  If you use this to modify your BIOS and then flash it to multiple cards, you're most likely wasting electricity because you'll set the voltage high on a low-leakage chip.  Either that, or you'll flash too low of a voltage on a high leakage chip and it'll be unstable at your desired clock.  In other words -- you'll need to create multiple BIOS files with different voltages and flash them according to your cards for optimal power savings (or modify the files manually with proper voltage "steps").

I spent many full days reverse engineering the 7000 series BIOSes quite a few months back.  If anyone has any technical questions, feel free to post 'em.

14u2rp4AqFtN5jkwK944nn741FnfF714m7
philips
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500



View Profile
October 15, 2013, 10:21:10 AM
 #10

Further explanation:

For every 7000 series card, there are five voltages in a table for the "performance" state.  You'll notice that each 7000 series card you buy doesn't necessarily have the same voltage, but the BIOS is identical.  The voltage that gets used depends on the quality of the ASIC on the board.  If your chip has extremely low leakage, the lowest value (of the five voltages) gets used.  Highest leakage = highest value.  Somewhere in the middle = one of the other three values.  There is a function in GPU-Z that will read the "ASIC Quality" value of your card if you're curious.

It's even more complicated for boost BIOSes.  There's *another* table of 5 values for the "boost" state.  The card will switch back and forth depending on the thermal state.

On the 7990 cards, there's a THIRD leakage table (beyond the scope of what I'm writing).

If you want to change the voltage on a 7000 series card, you have to modify the extended voltage tables (referred to as LEAKID_VOLTAGE or VOLTAGE_LUT_ENTRY).  You either need to modify all 5 of the values to be identical (which is wasteful if you flash it to a bunch of cards with different leakage), or you need to modify the values proportionally to be higher/lower.  If it's a boost edition card, you'll need to modify the 2nd table as well.  For the 7990 cards, you'll need to modify the 3rd state table as well (assuming you're keeping the card extremely cool anyways...  otherwise the voltage will likely bounce around).

The cards that are "voltage locked" actually aren't technically "locked".  They still have a variable VRM and can be modified.  The BIOS just has a function that loops and repeatedly sets the voltage.  When you change the voltage with a utility like MSI Afterburner, the voltage actually changes for a split second but it gets changed back by the card's BIOS.  You can still set the voltage in the leakage tables though.

The only utility I'm aware of that will properly modify these tables is here:
http://www.techpowerup.com/forums/showthread.php?t=189089

This utility will modify all 5 voltage values to be the same though.  If you use this to modify your BIOS and then flash it to multiple cards, you're most likely wasting electricity because you'll set the voltage high on a low-leakage chip.  Either that, or you'll flash too low of a voltage on a high leakage chip and it'll be unstable at your desired clock.  In other words -- you'll need to create multiple BIOS files with different voltages and flash them according to your cards for optimal power savings (or modify the files manually with proper voltage "steps").

I spent many full days reverse engineering the 7000 series BIOSes quite a few months back.  If anyone has any technical questions, feel free to post 'em.



Thanks for all this info.
hulk
Sr. Member
****
Offline Offline

Activity: 392
Merit: 250


View Profile
October 16, 2013, 02:54:17 PM
 #11

It would be easier to buy GPU that is voltage unlocked, its has more flexibility and save time.

sveetsnelda
Hero Member
*****
Offline Offline

Activity: 642
Merit: 500


View Profile
October 16, 2013, 03:58:44 PM
 #12

It would be easier to buy GPU that is voltage unlocked, its has more flexibility and save time.
Not even close (unless you only run one rig with a few cards).  My world would be a nightmare if I couldn't flash my cards and run Linux.

14u2rp4AqFtN5jkwK944nn741FnfF714m7
sveetsnelda
Hero Member
*****
Offline Offline

Activity: 642
Merit: 500


View Profile
October 16, 2013, 04:00:20 PM
 #13

and if there's an interest to fund such a thing, I'm confident that I could reverse engineer and modify locked card BIOSes to be unlocked.  My time is just spread very thin right now.

14u2rp4AqFtN5jkwK944nn741FnfF714m7
hulk
Sr. Member
****
Offline Offline

Activity: 392
Merit: 250


View Profile
October 16, 2013, 04:02:39 PM
 #14

It would be easier to buy GPU that is voltage unlocked, its has more flexibility and save time.
Not even close (unless you only run one rig with a few cards).  My world would be a nightmare if I couldn't flash my cards and run Linux.

What do you mean, have you tried runing 6 GPU on window 7?

sveetsnelda
Hero Member
*****
Offline Offline

Activity: 642
Merit: 500


View Profile
October 16, 2013, 04:45:18 PM
 #15

It would be easier to buy GPU that is voltage unlocked, its has more flexibility and save time.
Not even close (unless you only run one rig with a few cards).  My world would be a nightmare if I couldn't flash my cards and run Linux.

What do you mean, have you tried runing 6 GPU on window 7?
I mean that I'm running over 250 GPUs.  If I had to use Afterburner to set voltages on all of them, it would be a nightmare.  Simply powering on the machine from a bootable flash drive (or SAN) is a lot easier/cheaper than a full Windows install on a hard drive with Afterburner (which isn't easily scripted).

14u2rp4AqFtN5jkwK944nn741FnfF714m7
hulk
Sr. Member
****
Offline Offline

Activity: 392
Merit: 250


View Profile
October 17, 2013, 01:09:10 AM
 #16

It would be easier to buy GPU that is voltage unlocked, its has more flexibility and save time.
Not even close (unless you only run one rig with a few cards).  My world would be a nightmare if I couldn't flash my cards and run Linux.

What do you mean, have you tried runing 6 GPU on window 7?
I mean that I'm running over 250 GPUs.  If I had to use Afterburner to set voltages on all of them, it would be a nightmare.  Simply powering on the machine from a bootable flash drive (or SAN) is a lot easier/cheaper than a full Windows install on a hard drive with Afterburner (which isn't easily scripted).

Wow, that is a lot of GPU. I am thinking to upgrade my 4 GPU window 7 to 6 GPU but some people told me that its unstable and others tell me it should work. Any idea since I believe you used window prior to linux?

Thanks in advance.

jdebunt
Legendary
*
Offline Offline

Activity: 1596
Merit: 1010


View Profile WWW
October 17, 2013, 06:53:30 PM
 #17

very nice info, i have a sapphire 7970 & may use this Smiley
xminer
Jr. Member
*
Offline Offline

Activity: 73
Merit: 2


View Profile
October 17, 2013, 08:08:07 PM
 #18

Funny thing is, is that my HD7850's don't really use more power when overvolted, or use less when undervolted.
But, 100W is a huge win, such things mean ROI or no ROI.

Thanks for the guide, I thing many people will find this usefull.

Definitely voltage is locked. With all of my 5870/5770/5750/7850/7950 I can see the difference in wattage;it is even possible to run 7950 close to 100W at 0.8V/600-800MHz core.

xminer
Jr. Member
*
Offline Offline

Activity: 73
Merit: 2


View Profile
October 17, 2013, 08:21:06 PM
 #19

Guys, I have done this on Sapphire 7970 and Gigabyte 7950s.  I had undervolted the ROMs to have them running at lover voltages.
Before specs:
  • 4 x 7950s @ 550kh/sec @ 1000 watts
After undervolting modded stock BIOS
  • 4 x 7950s @ 665 kh/s @ 900 watts @ 1.0v


The idea of undervolting is pretty useful but 2 moments:

1. amm, you didn't state frequencies used before and after - really, only changing voltages affected hash rate?! ("I don't believe you!")

2. There are memory timings - and it does help if you can edit them. But I don't know how to do that.

E.g. 7850 from sapphire and 7850 from gigabyte can reach 375-400kh and up to 350kh "whatever you do" respectively; all with the same settings(like 1100/1250). HIS 7950 ICEQ does 585kh/s at 970/1000 and nothing more - whatever I try; raising mem speed to 1250 or whatever upper - doesn't do any good.
swiftshoot (OP)
Full Member
***
Offline Offline

Activity: 200
Merit: 100


View Profile
October 18, 2013, 03:36:43 AM
 #20

Guys, I have done this on Sapphire 7970 and Gigabyte 7950s.  I had undervolted the ROMs to have them running at lover voltages.
Before specs:
  • 4 x 7950s @ 550kh/sec @ 1000 watts
After undervolting modded stock BIOS
  • 4 x 7950s @ 665 kh/s @ 900 watts @ 1.0v


The idea of undervolting is pretty useful but 2 moments:

1. amm, you didn't state frequencies used before and after - really, only changing voltages affected hash rate?! ("I don't believe you!")

2. There are memory timings - and it does help if you can edit them. But I don't know how to do that.

E.g. 7850 from sapphire and 7850 from gigabyte can reach 375-400kh and up to 350kh "whatever you do" respectively; all with the same settings(like 1100/1250). HIS 7950 ICEQ does 585kh/s at 970/1000 and nothing more - whatever I try; raising mem speed to 1250 or whatever upper - doesn't do any good.

1: Both at Intensity 20, Thread Concurrency @ 40960, Shaders @ 1792, lookup gap @ 2, Threads @ 1, powertune @ 0
    Before undervolting, running 1090MHz CPU, 1500 MHz Memory
    After undervolting, running 1080MHz CPU, 1250 MHz Memory.  250MHz lower on memory speed yet gained 115kh/s

2: Nor do I but it does not affect mem timing if you are using the memory stock speed of your vid card.

Gigabyte and Sapphires work great for getting good high hash rates.  I had an XFX, was crap returned it.
Consider maxing out the Thread Concurrency as much as possible along with the shaders.  It worked for me and getting great speeds.  Scrypt is memory intensive so more memory it gets the more it can hash.

Build your own Cloud Miner! https://cex.io/r/1/swiftshoot/0/
to Make your BTC Mine for you. 3% referral bonus if you sign up others... please use my referral code if you want to join. You can also redeem your hardware after you get enough GHS.
btc:
ltc:
other altcoins: send me PM for address.
Pages: [1] 2 3 »  All
  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!