Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Solved) Only upto 1GB ReBarState is available on Gigabyte Z170-HD3-DDR3 and RTX 4060 PCIE x8 bus (Code 12) #114

Closed
4 of 5 tasks
takem94 opened this issue Jan 12, 2024 · 8 comments

Comments

@takem94
Copy link

takem94 commented Jan 12, 2024

System

  • Motherboard: Gigabyte Z170-HD3-DDR3-CF
  • BIOS Version: F21f (modded for Coffelake)
  • CPU: QQLT (ES i7 8700h)
  • RAM: 16 GB
  • GPU: inno3d RTX 4060
  • CSM is turned off. Make sure to confirm this in the BIOS and not with GPU-Z or similar since it can be inaccurate
  • 4G decoding is enabled. Make sure to confirm this in the BIOS and not with GPU-Z or similar since it can be inaccurate
  • UEFIPatch is applied. "Don't downgrade 64-bit BARs to 32-bit (Coffee Lake)" and "Remove <64GB BAR size limit (Skylake/Kaby Lake/Coffee Lake)" applied successful.
  • DSDT is not applied. DSDT Patch probably don't needed, because I saw similar code inside disassemble file with the same variables, but with little bit different calculations.
  • I have read Common issues (and fixes)

Description
I have a very specific case, since I use a “mutant” processor, this is QQLT (ES i7 8700h). Therefore, I am already doing the modification for the modified BIOS in coffetime. I'm afraid this is the main problem, but maybe someone understands better.
I've seen people successfully use rebar on the same motherboard or similar ones, but I can't reach anything larger than 1 gigabyte for ReBarSize.
With a value of 2 gigabytes, it seems that initialization beyond the BIOS does not occur at all. With 4 gigabytes or more, something seems to be happening, the OS system even boots, but no image is displayed on the GPU. There is no image during BIOS loading, as well as in Windows itself. When I'm using iGPU, the image is output on 8 GB value and even 16 GB seems to work, but the iGPU itself does not support rebar, so this is not certain. If check GPU in device manager then can see status with error code 12 and not enough free resources for use.
image
I did the BIOS firmware using the fptw64 utility, the authenticity will not pass through the Q-flash, I think the problem may be that the wrong BIOS is being flashed, since there are two of them on this board? Another option is to try flashing it via efiflash, but when I do backup of modded bios via Q-flash or through fptw64, I getting a BIOS with FFS ReBar modification and with all patches. After that assumption, I did flashing for dual bios by efiflash 0.87 mod and got the same result.
There is an impression that 4G decoding is not enabled, although both in the BIOS and in GPU Z it appears enabled; perhaps the BIOS itself is not working correctly. I tried load without Above 4g encode with 1 Gb ReBarState and instantly get infinite reboot, so it definitely do something.
изображение_2024-01-12_165335219
With iGPU and 8 GB size of ReBarState but no image from RTX 4060 and error 12:
image
Memory range with 4g decode:
image
Memory range without 4g decode:
image
Total memory range with 4g decode (if turn iGPU on, it will appears on the end of list near to to the eXt Host Conrtoller with similar address):
image

@xCuri0
Copy link
Owner

xCuri0 commented Jan 13, 2024

@takem94 this is all expected behavior. You need to switch your monitor from iGPU to the 4060 when using 16GB BAR and you will get output. The proper workaround for this is using a dummy HDMI/DP (you can buy this) on the iGPU

Only BAR1 is used for VRAM and can be resized on NVIDIA, for AMD it's BAR0. The other BARs serve other purposes and cannot be resized.

@xCuri0 xCuri0 closed this as completed Jan 13, 2024
@takem94
Copy link
Author

takem94 commented Jan 13, 2024

@xCuri0 I tried different methods, I have 2 monitors, and getting the rtx 4060 to load with a larger ReBarState than 1 GB does not work, there is always error 12 in the device manager. I tried switching 1 monitor from iGPU to GPU, it also didn’t give an image, I tried turning off iGPU in the device manager, but it didn’t make it work. I saw it work for a person from Win-Raid under the nickname Adiel235, but it seems that in my case there is something else, I’m now almost sure that it’s the VBIOS or the X8 bus on the 4060.
And why close the issue, if I haven’t even answered yet about result of your's advice?

@takem94 takem94 changed the title Only 1GB ReBarSize is available Gigabyte Z170-HD3-DDR3-CF Only 1GB ReBarSize is available on Gigabyte Z170-HD3-DDR3-CF (Code 12) Jan 13, 2024
@takem94 takem94 changed the title Only 1GB ReBarSize is available on Gigabyte Z170-HD3-DDR3-CF (Code 12) Only upto 1GB ReBarState is available on Gigabyte Z170-HD3-DDR3-CF (Code 12) Jan 13, 2024
@xCuri0 xCuri0 reopened this Jan 13, 2024
@takem94 takem94 changed the title Only upto 1GB ReBarState is available on Gigabyte Z170-HD3-DDR3-CF (Code 12) Only upto 1GB ReBarState is available on Gigabyte Z170-HD3-DDR3 and RTX 4060 PCIE x8 bus (Code 12) Jan 13, 2024
@takem94
Copy link
Author

takem94 commented Jan 13, 2024

@ xCuri0 how big is the risk of ruin the BIOS by replacing the DsdtAsl module from another BIOS from another motherboard? It’s just that the version of the HD3 motherboard with DDR4 memory has a slightly newer BIOS, maybe it makes sense to remove this module from it?
It seems to me that this condition is probably not fulfilled as expected.
image

@xCuri0
Copy link
Owner

xCuri0 commented Jan 14, 2024 via email

@takem94
Copy link
Author

takem94 commented Jan 16, 2024

@xCuri0 You was right, problem was not in DSDT module, and also both of them are identical.

I found solution for my case and it was hidding in 2 things, the incorrect display of the CSM in the UEFI-BIOS, but the more important is the initialization of the PCIE bus.

So, when I tried flash the BIOS using the efiflash utility in MS-DOS, I turned on CSM to see the flash-drive in boot option. While I was doing this, I noticed that the display of the BIOS logo during boot changed, it stopped being stretched and was in the center of the screen. I realized that I had entered in real UEFI mode, but after reflashing the stretched logo returned again and I still don’t know how to remove this effect. But after that I started turning CSM to enable with all the options and then gradually turning everything off.
But the most important option turned out to be “IGFX” in the "Initial Display Output" item-list, before that I always had the PCIE1 bus selected. Usually I just only turned ON the iGPU, but it turns out that until I forcibly set it as a priority during initialization, the dedicated GPU always loaded first. At the same time, it is not necessary to insert anything into the iGPU; I can easily boot into Windows without access to the BIOS. Sleep mode also works.

image

So, I consider separately in the topic of problems and solutions to indicate the full procedure for actions if Rebar of more than 1 gigabyte is not enabled on 1151 motherboards from Gigabyte.

  1. Reflash bios by using the "efiflash 0.87 mod" utility, not 0.65 version, since it is the only one can flash two BIOS-chips at once.
  2. Load into BIOS settings and at first turn "enable" CSM and turn "disable" 4g above decoding. Before that you must check the ReBarState value, it should be set to "0" (disabled)!
  3. Save these changes and boot into the BIOS again.
  4. Now you need to disable CSM again in the BIOS and enable 4g above encoding.
  5. Again save these changes and boot into the BIOS.
  6. Now it is very important to find the "Initial Display Output" option in the peripherals section and choose "IGFX" in it. And also find the option with integrated GPU and enable it too.
  7. Save everything again and reboot into the system.
  8. Now it is preferable to switch the monitor wire to the iGPU.
  9. Then you can finnaly set ReBarState to 13, 14 or 32.
  10. After rebooting, you can change the monitor wire conection into the dedicated GPU back.
  11. Check the video output after loading in Windows, if there is no image output, switch back wire to iGPU and then try another value in ReBarState one by one with reloads.

As a bonus, here are the results of my tests of rebar in Dying Light 2. No big difference with 1GB vs 8GB, but noticeble without rebar.
image

A small problem is that you need to leave the iGPU turned on, since in theory it consumes RAM and additionally creates interruptions and increases delays in the system and games.

@takem94 takem94 closed this as completed Jan 16, 2024
@takem94 takem94 changed the title Only upto 1GB ReBarState is available on Gigabyte Z170-HD3-DDR3 and RTX 4060 PCIE x8 bus (Code 12) (Solved) Only upto 1GB ReBarState is available on Gigabyte Z170-HD3-DDR3 and RTX 4060 PCIE x8 bus (Code 12) Jan 16, 2024
@JGSphaela
Copy link

JGSphaela commented Sep 24, 2024

1. Reflash bios by using the "efiflash 0.87 mod" utility, not 0.65 version, since it is the only one can flash two BIOS-chips at once.

Hi @takem94 , I have the same issue that my A770 will report code 12 when ReBar >= 2GB: #4 (comment)
I came across your issue and decide to try it since mine is also a gigabyte board. Is this step necessary? I always want to keep the backup bios untouched just in case if I break something.

Edit: I followed your steps but sadly it didn't work. :(

@takem94
Copy link
Author

takem94 commented Sep 25, 2024

Hello @JGSphaela!
I'm sorry to hear that my instructions didn't help you. :(

Regarding the first point, I think you could try flashing only one BIOS ROM, but there's a chance that during memory initialization, as often happened to me, the backup BIOS version from the second chip might load. If you don't have a programmer, you could try flashing only the active flash memory.
The most challenging part is finding out in which case Rebar works with more 1GB memory option. The thing is, I had a situation where I could boot through the iGPU with a discrete graphics card, and I didn't get an error until I tried to connect a monitor to the GPU.

And how many monitors do you have? I have two, and one was connected to the graphics card, while the other in the same time was connected to the motherboard's iGPU i. In general, I struggled with this problem for a very long time. Possibly more than a week, I knew it could work and therefore didn't stop trying.

I wish you luck in finding the cause in your case. And if it's not just for curiosity's sake, I certainly hope you'll be able to upgrade soon your setup. I know it's difficult in our time, but it's worth it even on not very powerful graphics cards like mine.

@JGSphaela
Copy link

@takem94 Thanks for your warm reply! I change my Intel A770 GPU to an AMD RX580 and it works. I updated right here: #4 (comment)
It seems that Intel GPU is the issue here, I don't know if it's even fixable. Though many others have A770 working, but I never saw one with Gigabyte Z170.

I already trying to get this working for almost a week now... I will continue trying it for now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants