[Guide] Manual AMI UEFI BIOS Modding

Big enough, thanks, looks like that might not be the correct location. I’ll figure it out tonight when I have time to dig into the modules myself.
OK leave as-is now, I only mentioned all that to get you some stability while we figure out the issue, if fail safe is OK to use then it will be fine
Are you using 0703 BIOS, if not which version?

Yes i’m using version 0703 straight from the asus support page

@aShroom456 - CPU Microcodes are not the latest (FYI), and are those the only two you want/will need in future? If not, let me know, I can edit and update all the originals leaving them all in there if you want.
BIOS looks OK to me, as far as the file you uploaded with only the UBU edits, no menu change. I asked before and you didn’t say, did you test the BIOS like that before the menu edit? If yes, was it OK?

One thing I noticed in your image guide, you mentioned you extracted setup-compressed whole section, then show the IFR output. With version of IFR tool you have and the other universal IFR tool version 7, I was not able to get green output from anything but the sub-GUID 97E409E6-4CC1-11D9-81F6-000000000000.
I tested Setup as a whole as-is, and it’s body, then compressed section as a whole, then it’s body, PE32 as-is then it’s body etc, only the sub-GUID gave IFR output. So maybe there was some confusion on which file you got the IFR from and then reinserted at wrong location post edit? Just thinking maybe, since I noticed that.
Not that IFR output applies to any of this menu edit 0100 string stuff , but it caught my eye as I looked through all this for you. PE32 is the one that contains the string you edited, and that does appear to be the correct location.
I did notice though, if you extract setup uncompressed with MMTool you get the full IFR output with all menu sections, maybe you did that too?

Before I do anything, on original BIOS screen did you see Exit tab there too (where the realtek one is now on the messed up BIOS)? For now, I’ll assume so, but I’ll try to find BIOS image in reviews/Google too, then do the mod myself on stock BIOS that way you can test my mod and see if same issue happens.

I thought of another thing maybe caused this, and your mod could be OK? Maybe that in windows Asus tool messed up, or always messes up this particular mod/flash?
Maybe try FPT flash instead, I will outline method to let it happen for you without errors once I’m done with the mod.

*Edit

Here is two BIOS to test, do #1 first, then #2 last if #1 didn’t enable AI Tweaker - hopefully neither give the Realtek bug!
https://nofile.io/f/mwzoPj1RSST/P8H61-I-…03-Test-Mod.zip

Please flash via FPT so we can rule out the Asus in windows app. Download this Intel System Tools package - https://mega.nz/#!CF1l1LJK!K2l6_74FPsGig…Rvp8Efj8a5drZSc
For FPT we’ll use .rom file, so please open .cap BIOS in UEFITool and extract body for this process. Then put copy of rom mod BIOS in folder with FPT exe you plan to use.
Then open command prompt at the desired FPT versions folder (select folder, hold shift and press right click, select open command window here), then issue the following command.

fptw -bios -f modbiosname.rom

If you get error BIOS locked or other “Locked” region error in FPT see the guide I made for just this issue (It’s assumed you will get this error!)
[GUIDE] Grub Setup_Var Guide - Fix Intel FPT Error 368 - BIOS Lock Bit Set HSFS W/ Asus or Other Mod BIOS

Only, do not use it’s Variables, you will be unlocking the following
SMI Lock, VarStoreInfo (VarOffset/VarName): 0x87
BIOS Lock, VarStoreInfo (VarOffset/VarName): 0x88
GPIO Lock, VarStoreInfo (VarOffset/VarName): 0x89

Rename the Boot.efi file to the following for your system >> Shellx64.efi

Then disable each of these following the guide (ie use these values instead of the one it shows)
0x1 = enabled
0x0 = disabled

To change setting, you enter variable + value then press enter - example >> 0x87 0x0

Before disabling you can check current value by inputting variable only and press enter - example >> 0x87
Then system will show you it’s current value

Yes, I tested the bios with only UBU tweaks and it looked like it was working (checked with inspectre for patches against spectre attack).
As far as IFR goes, I just picked a version that extracted the file, but had a hard time finding anything that resembled the 01 00 01 01 01 string.
Ok, so this is how the bios looks like https://imgur.com/a/9a5q3KX , and yes there is an exit tab in original, just when the realtek menu shows, the exit button is useless, since anything you do just resets you to the first menu of the bios.

Will flash and report in a few minutes ^^

edit: tried flashing, but came up with error 280 https://imgur.com/a/nySN5F0 will look at the guide you posted

Ok, good, then we know UBU edits are OK and any issues after that are caused by our mistakes

I see “Tool” menu as last tab (#5), but no exit? This is entire IFR output for the menu/tab list, 7 possible tabs

Main (0x7 from string package 0x0)
Ai Tweaker (0x1A from string package 0x0)
Advanced (0x1C from string package 0x0)
Monitor (0x1E from string package 0x0)
Boot (0x20 from string package 0x0)
Tool (0x30 from string package 0x0)
Exit (0x43 from string package 0x0)

On FPT, yes you will have to follow the guide to unlock. You can go ahead and try flashing with the Asus tool like before as a test, but if same outcome I don’t trust it’s our BIOS edits causing that and not the tool, that’s why I wanted to flash another way this time.
But, if you want for quick test, flash with the Asus windows updater and see if same, then if same issue, please try flashing other way to make sure it’s not that software routine causing the problem.

Yes the exit menu is there, you can just barely see it in the top right corner :stuck_out_tongue:
So I just flashed Test1.CAP with asus easy flash, it completed in under a second thought and no changes in bios, so i’m guessing it didn’t do anything
Try Test2.CAP next or go with FPT?

edit: regarding FPT, when i try to extract the PE32 image body I get .sct file instead of .ffs like in your guide, and the IFR extractor wont extract anything from this file.
edit2: just saw that you did all the work searching for the variables, sleepy me

So, when you hit exit in top right corner, do you see the options shown in AMIBCP?

Not sure why asus software would do that, unless it thinks same version? Maybe check in the app program folder for a config file and see if you can find something for allow same version or check if same version, and disable that.

On FPT, I mean you extract the main BIOS from capsule. Open cap BIOS file in UEFITool, right click on the main entry at top (capsule) and extract body, that is entire BIOS rom minus the 2KB capsule
Very sorry, the entire guide is not needed, I meant to and forgot to mention you only need to do step 7 onward, I gave you the needed variables above. Sleepy me too, I’m about to get off here for a while, hopefully you get this sorted out and my BIOS mods are OK and you have AI Tweaker!

It works! :smiley:
But now there is a visual problem on the exit button (probably nothing, just visual or?) and SSD read/write speed got axed in half
https://imgur.com/a/rZbB4j7

edit: will try to load optimized defaults to see if that fixes it
edit2: Sata mode was set to IDE, but when changed to AHCI windows bluescreens :s
edit3: fixed the sata problem (bios was set to IDE after flash, so windows took the liberty to update the registry to IDE values, had to manually change them back to AHCI ones)

one thing I noticed was that, even though ahci is now working, the max write speed is 75mb/s. The same case was when board was flashed with UBU updated bios so i’m guessing this board doesn’t like the updated storage modules? Also would it be possible to include the multicore enchantment option in the AI Tweaker tree?

Again thank you for your invaluable knowledge and time!

Sweet! And you’re welcome! Glad you figured out the SATA issue, instead of quickly and painfully doing a clean windows install, you wouldn’t believe how many times I’ve seen people do that instead of waiting for help!

Did you modify my BIOS edit, with UBU later? I did not do any UBU edits with my BIOS files. AS SSD image in gallery is showing you are in IDE mode

Are you sure you only edited the variables I showed while you were in grub, exactly as shown? If you are, go ahead and set them back now if you want, maybe that is causing some issue too (Those things are stored in NVRAM, I am not sure if reflash of BIOS using only -bios flag reflashes NVRAM)

I’d say, clear CMOS good, then load optimized again and see if that sorts everything out or not. Then don’t forget to set AHCI again before loading windows, and if you moved your hard drives around earlier, put them back where you had them initially

Which BIOS gave you the AI Tweaker menu, #1 or did you have to go to #2 before it showed up? That way I know where to edit, so I can enable the rest for you. I’m not sure about that exit menu button? Let me look around later

Don’t know what happened but its working fine now https://imgur.com/a/cpXZd1D (could be the cheap chinesse ssd being inconsistent :d)
Only flashed Test1.rom without doing anything to it. Yes only edited the variables you posted. Should i set them back, or leave as is for future flashing? Clearing the CMOS is going to be a pain in the ass though. I take it that removing the CMOS battery should do the trick just as well?

Bios #1 gave me the AI Tweaker menu

edit: also some settings can’t be changed like cpu voltage and AI overclock Tuner only shows options Auto and X.M.P

Now it’s ON AHCI!! On the variables, I was only thinking maybe those in regards to all the issues. You can leave if you want, at least check for me if you don’t mind, are they still set as you set them, or reset now due to BIOS flash.

Yes, clearing CMOS can be done by removing battery for a minute, when I do that I also unplug the PSU from the wall or back of PC and press and hold the power on button or short pins for 10 seconds or so to ensure it’s all drained and clears quickly.

Thanks, wait for the CMOS clear until I send you new BIOS in a second with the rest of the AI Tweaker enabled. Before I do that, can you show me via few images scroll up/down main AI Tweaker section so I can see what you can see now and what you can’t.

OC Tuner only has auto, or second one has manual. I will enable both for you on edit. OC Tuner has to be on manual I think for vcore to work (once you use it, you have to choose voltage mode offset or manual too) Be sure you are not using fail safe!

The poor write speed was on AHCI, but it fixed itself somehow (probably just a background program writing to ssd)
The first 2 variables changed back but the last one stayed https://imgur.com/a/Dxo5P2p

The image you posted showed IDE mode though - https://i.imgur.com/eEhBVHn.jpg
Thanks for checking that grub stuff for me, now I will try to remember for the future. SMI and BIOS lock are the main security ones, so I assumed they would get set back.

Thanks for the images, I’ll get you BIOS edited in here shortly. Then you can do few minute clear CMOS after you flash it, then load optimized and set AHCI and check it all out.

Yes my bad, didn’t retake the picture but im 99% it’s the ssd using all it’s internal ram, and when it does the write speed slows down.
Need to reset the variables back to 0x00 before reflash, right?

I meant, that was previous image I linked was showing the IDE mode and poor speed you initially mentioned. Last SSD image was AHCI mode and good speeds
Yes, you’ll need BIOS and SMI lock to 0x0 before you can flash again via FPT. Here is new BIOS again, once you flash shut down and clear CMOS good, then load optimized, set AHCI and save, reboot and then check it all out.
https://nofile.io/f/WS0TZQwePk3/Mod3.zip

Safe to proceed? https://imgur.com/a/ZP1AAj6

No, do not proceed! Sorry, that was a cap file renamed rom and I didn’t notice so I didn’t think to tell you to remove rom from capsule again!
Here, it’s fixed - https://nofile.io/f/FejEKUbG8qM/Mod32.zip

Its working now!
Did everything you said and now i’m presented with these options in the bios https://imgur.com/a/iXl9W1C
Again thank you so much for your help and the time you took to help a stranger on the internet, don’t know how I can repay you

I’m glad it’s all OK and you waited! You’re welcome, thank you too!

I see iGPU voltage options there, but no voltage entry area shown, does it appear if you change the mode or not? If not, I’ll have to set that one to visible for you too.
Also, those two AI Tuners at top, they present to you in a different and understandable way correct? I assumed so when I was looking them over, but wasn’t quite sure, if you want either disabled let me know.

How’s the exit button?

The exit button is working as intended
Regarding iGPU voltage, I can change it from offset to manual but (i think) it makes no difference since my cpu has no iGPU.
Yeah the 2 AI tuners have different options to them, haven’t tested them though https://imgur.com/a/o7csDfw