Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

X79 possible issues with NVIDIA GPUs #48

Closed
Raziel49 opened this issue Apr 29, 2023 · 356 comments
Closed

X79 possible issues with NVIDIA GPUs #48

Raziel49 opened this issue Apr 29, 2023 · 356 comments
Labels
bios issue with firmware that needs patching help wanted Extra attention is needed

Comments

@Raziel49
Copy link

Raziel49 commented Apr 29, 2023

Hi there,

I have a ASUS P9X79 PRO motherboard with an i7-4930K and 32GB of ram, gpu is a Sapphire RX 580 Nitro+ 8GB.

The issue is that, after having successfully added your .ffs module to the bios, and also enabled the bios submenu for Above 4G Decoding, and having enabled the 4G Decoding itself, the board POSTs just fine but it doesn't boot anything, it just stucks to a black screen.

If i disable the Above 4G option, i can boot to windows just fine. Also another thing is that adding your module to the bios, breaks the sata contoller somehow (it gives code 10 in device manager, sata controller is a Marvell 91xx, but this is not a problem as i am booting from a NVMe drive).

I didn't do the UEFIPatch part, and the program said that it cannot find anything to patch.

Also i didn't do the DSDT patching step as you indicated in the guide that HEDT boards do not need it.

(But i still tried to look in the extracted DSDT file from the AmiBoardInfo module if i could find any of the lines you pointed to in the guide, and i couldn't find anything that matched)

I tried also updating the GOP in the vga bios to the last version, but to no avail.

UPDATE by xCuri0:
The issue above has been fixed by a new UEFIPatch (make sure to uncomment it) and DSDT patch, however there have been some reports of NVIDIA GPUs still not working on Windows.

UPDATE from @nefh:
dmesg_2GPU_KWin.txt

Since you've renamed the topic, I thought about some summary that could be pasted into first post.
I've recorded also some boot comparison videos for illustration, hope it's easier to get it this way.

All of the following issues happen only with ReBAR>1GB, only when RTX is receiving 64bit address space for BAR1.
In all cases ended in successful boot, the ReBAR works correct.

1. Boot to Windows - bad case
a) If RTX is connected to any display, even as a secondary input, then booting stops after POST, when Windows bootloader starts. The PC responds with instant turn off for power button push.
b) With Radeon connected alone or with no cables attached at all, the boot proceeds without any problems:

WindowsBoot.mp4

2. Boot to Linux - better case
Connecting display to RTX results in visibility problems during booting.
a) When display shows output from Radeon with secondary input connected to RTX, there is black screen instead of bootloaders UI. Any graphics seems to be a problem, even AMI logo is missing in POST screen. The visibility comes back during text mode.
b) When display shows output from RTX, the screen stays entirely black for whole boot sequence.
However, in all cases we have successful boot and proper display in desktop mode.

LinuxBoot.mp4

3. Misc info
The issue is independent to bootloaders. No matter if boot goes through rEFInd, GRUB or straight to Windows, the behavior is the same. Removing Radeon entirely and keeping only RTX also gives no effect - issues stays the same. RTX3090 VBIOS is the newest one.

Thanks for all your support and great work!

@xCuri0
Copy link
Owner

xCuri0 commented Apr 29, 2023

@Raziel49

You need to disable CSM

GPU is a Sapphire RX 580 Nitro+ 8GB

I'm also using the same GPU and GOP doesn't work when using modded VBIOS unless you use "magic GOP" which is incompatible with secure boot. So try with stock VBIOS and if it works then you can try magic GOP if you need modded

@Raziel49
Copy link
Author

Yeah i already reverted to the stock bios.

Forgot to mention, obviously the CSM is off.

@xCuri0
Copy link
Owner

xCuri0 commented Apr 29, 2023

@Raziel49

Try setting these BIOS settings:

4G Decode: On
Full Screen LOGO Show: On
CSM Support: Never
Boot Mode Selection: UEFI
Storage Boot Option Control: UEFI Only
Display Boot Option Control: UEFI Only
PCI Device ROM Priority: UEFI OpRom

@Raziel49
Copy link
Author

I did already try all of them, i even tried changing mmioh size from 64gb to 128gb but with no results.

@xCuri0
Copy link
Owner

xCuri0 commented Apr 29, 2023

@Raziel49 are you able to boot a linux live usb with 4g decoding ?

@Raziel49
Copy link
Author

@xCuri0 I will try now, will let you know

@Raziel49
Copy link
Author

Just tried 3 different linux distros, ubuntu, xubuntu and kali linux, but i can't boot in any of them. The bootloader works, but as soon as one selects "install linux" or "try linux without installing" i get the same black screen as if i was trying to boot windows 10.

@Raziel49
Copy link
Author

Of course all of this is with Above 4G option enabled, with the option disabled i can boot no problem.

I think that there is some problem with the motherboard bios and the Above 4G function, maybe it was not well implemented, there has to be a reason if it was hidden by default.

@xCuri0
Copy link
Owner

xCuri0 commented Apr 29, 2023

@Raziel49 try to get a log of the kernel output somehow

@Raziel49
Copy link
Author

Ok, do you have any suggestion?

How can i record that output?

@xCuri0
Copy link
Owner

xCuri0 commented Apr 30, 2023

@Raziel49 try adding kernel option earlyprintk=efi to output to EFI framebuffer. Can also add ignore_loglevel for more output

Also can try disabling acpi to see if it fixes with acpi=off kernel option.

worst cause u will need to debug over serial port if no other way gives you early kernel output

@Squall-Leonhart
Copy link

Squall-Leonhart commented May 3, 2023

These asus x79 motherboards have a hidden MMIOH setting that defaults to 64GB, it might be a factor and need restricting to lower in order to support ReBar on this platform.

You need to enable the hidden system agent settings (IOH config) panel in a bios editor to access it.

image

@xCuri0
Copy link
Owner

xCuri0 commented May 3, 2023

@Squall-Leonhart is that the MMIOH size or base ? Either way it should be fine unless you have 64GB+ RAM or a GPU with 32GB+ BAR.

There is no need for BIOS editing you can just use setup_var as described here Enabling hidden 4G decoding

@Raziel49
Copy link
Author

Raziel49 commented May 3, 2023

I remember trying all of these different MMIOH values but with no result.

Sadly i can't continue trying things as i don't own the board anymore.

@franckythebest
Copy link

Ces cartes mères asus x79 ont un paramètre MMIOH caché qui est par défaut de 64 Go, cela peut être un facteur et doit être réduit pour prendre en charge ReBar sur cette plate-forme.

Vous devez activer le panneau des paramètres de l'agent système caché (configuration IOH) dans un éditeur de bios pour y accéder.

image

Hello squall-leonhart my shore card is configured on mmioh 64g by default. when I decrease the value at 32G, there is a black screen while when I put it on 128G, my pc starts correctly. do you have any idea of ​​the cause?

@xCuri0
Copy link
Owner

xCuri0 commented May 6, 2023

@franckythebest so 4g decode works with 128g ?

@franckythebest
Copy link

@franckythebestdonc le décodage 4g fonctionne avec 128g ?

I haven't tried to activate "ABOVE 4G". the pc starts correctly with a "mmioh" value of 64G and 128G, but a value less than 64G the pc does not start. you think that the "mmioh" value can influence the "ABOVE 4G" option.

@xCuri0
Copy link
Owner

xCuri0 commented May 8, 2023

@franckythebest possibly, i don't have x79 to know

@franckythebest
Copy link

I have a question. I read on the forum that it is necessary to modify the DSDT of the bios which could be responsible for the black screen. But is it for windows or MAC?.

@xCuri0
Copy link
Owner

xCuri0 commented May 15, 2023

@franckythebest if it happens on linux even with acpi=off then it's not an ACPI or DSDT issue. we need someone to debug this using serial port or file output to get kernel log.

@ThatGuy-Bob
Copy link

ThatGuy-Bob commented May 16, 2023

Im getting a similar issue on a Chinese X79 board with a 3930K and 16gb or 32gb of UDIMM memory.

With an RX 5500 XT 8gb and Above 4G Decoding enabled the system freezes at kernel init for Windows or Linux. When windows tries to start, the loading ring is massively corrupted. The UEFI is text mode on this board, and there is also minor corruption (a few characters 'sticking' on the screen) when flipping through the pages with the option enabled as well.

When using an Arc A770 16gb the screen is frozen and looks like a "magic-eye" poster when Above 4G Decoding is enabled.

Even without a GPU in the system it still freezes at the same part of the boot process. The debug display steps from b6 to b1 and it freezes.

UEFI has options for serial debug output, but I have not dug into that further to see if it is working or leftover code at this point.

The behavior makes it seem as if the memory mapping is incorrect for the Above 4G option and devices are directed to memory buffer locations that simply do not exist. The presence of issues prior to boot rules out DSDT problems AFAIK, and this would break almost anything trying to boot the system as well if true.

I do have a Chinese dual socket 2011-0 board coming in the mail and I have a pair of E5-2697 V2s and 128gb of REG ECC memory for it. Will have to compare the modules in the firmware to see if they match, as well as testing if 32/64/128gb of RAM changes anything.

@xCuri0
Copy link
Owner

xCuri0 commented May 16, 2023

@ThatGuy-Bob are you sure csm off and everything legacy off ?

@ThatGuy-Bob
Copy link

ThatGuy-Bob commented May 16, 2023

CSM was absolutely off, its a two step process on these boards. First disable legacy op-rom loading, save/reset, then disable CSM.

Ive been so far down the rabbit hole that Ive even tried patching DSDT info, heh.

@xCuri0
Copy link
Owner

xCuri0 commented May 16, 2023

@ThatGuy-Bob you need to connect a serial device (such as ch341a) to the motherboard serial port pins (labelled COM) and set the linux kernel to use that. don't think it needs any bios settings besides just enabling serial port

you can either just use jumper wires or use a serial header to db9 adapter.

@ThatGuy-Bob
Copy link

It seems to send UEFI debug info out over serial for a UEFI development setup. The firmware on these boards feels very much like its still an internal development build.

The option is labeled as "Serial Message Debug Level" and its under the "North Bridge" control group.

@xCuri0
Copy link
Owner

xCuri0 commented May 16, 2023

@ThatGuy-Bob you don't need debug information about uefi, just from linux kernel

@ThatGuy-Bob
Copy link

OK, need kernel boot parameters if its something other than "console=ttyS0,9600n8". Have the HW setup, building a Debian live USB.

@xCuri0
Copy link
Owner

xCuri0 commented May 16, 2023

@ThatGuy-Bob try getting it working under a normal boot first, if it's not outputting then dmesg should tell why

@ThatGuy-Bob
Copy link

ThatGuy-Bob commented May 16, 2023

All I get with 4G Decode enabled is this before it dies...

[ 0.091944] x86/cpu: VMX (outside TXT) disabled by BIOS

This is the same first message on a normal boot without 4G Decoding enabled.

@cjdeedee
Copy link

Thanks to ZOXZX
For his huge helps
Finally, after flash bios with AI Suite successfully enabled above 4g and rebar
Capture

@franckythebest
Copy link

hello zoxzx

have you applied a dsdt and uefipatch patch on the p9x79 bios because for my part on my x79 R4e nothing works, black screen on startup.

@ZOXZX
Copy link

ZOXZX commented Dec 21, 2023

have you applied a dsdt and uefipatch patch on the p9x79 bios because for my part on my x79 R4e nothing works, black screen on startup.

UEFI patch, then DSDT then notepad++ (regex) replacement.
Or, use the structure that @nefh created. Steps and software is inside.

@ZOXZX Luckily for you, I've documented step by step all of the things I've done to the BIOS, when I was troubleshooting my DSDT. Check the attached archive, text me if anything is unclear. Thanks for the OC notes. BTW, the default VCCSA was something like 1.5 or 1.3, anyway way higher. I've lowered it to this 1.15. P9X79-E_WS.zip

@franckythebest
Copy link

thank you for your files. I just have to modify the dsdt that I extracted into dsdt.dsl but that's where I'm stuck. I will look at your modifications and I will come back to you to tell you more, thank you.

@ZOXZX
Copy link

ZOXZX commented Dec 21, 2023

Thank @nefh

Just follow the guide from @xCuri0.
Under "X79 DSDT Patch" section, find "MALH || MALL" and replace with xCurio's code.
Two similar entries exist and each one has to have unique MxLN/MN/MX variable.
@nefh used 8 and 9, xCuri0 gives M2LN/MN/MX example (other instance would be M3LN/...).
Then proceed to "_UID ..." section of xCuri0's guide and execute all till "AmiBoard..." section.

@Teiketsu33
Copy link

R4G.zip
Hi guys,I followed your method,changed some "default" to "user" by AMIBCP4.55, but BIOS interface still doesn't display "4G decoding" options. Can someone help me to check the bios file and correct it?

@ZOXZX
Copy link

ZOXZX commented Dec 22, 2023

Nope, don't do that.
Change default setting to disable and optimal to enable.
That way it'll be active after you load optimized defaults in bios.
After that tweak settings as usual...

@franckythebest
Copy link

hello zoxzx

I am at the "UID" modification level but I do not understand how to proceed with the modifications. regex is software or I have to modify it manually like:

"Name (_UID, "PCI0-CP004") // _UID: Unique ID
Name (_PXM, Zero) // _PXM: Device Proximity
Method (_STA, 0, NotSerialized) // _STA: Status
{
If ((CSTA (Zero, 0x04) == Zero))"

en
"Name (_UID, "PCI0-0x04") // _UID: Unique ID
Name (_PXM, Zero) // _PXM: Device Proximity
Method (_STA, 0, NotSerialized) // _STA: Status
{
If ((CSTA (Zero, 0x04) == Zero))"

@ZOXZX
Copy link

ZOXZX commented Dec 23, 2023

No, it's a replacement method available in notepad++. Example:

Regex

Under "Search Mode" box, check "Regular expression".

@franckythebest
Copy link

thanks for the information. I modified everything. The compilation report says that there are 0 errors, 133 warnings and 84 remarks. what do you think?

@ZOXZX
Copy link

ZOXZX commented Dec 23, 2023

Errors are important, ignore the rest. Without errors, file is compiled and you are ready for the next step :-)

@franckythebest
Copy link

franckythebest commented Dec 24, 2023

I just flashed my bios with the modified dsdt. but that doesn't change anything, happened to the Windows startup screen, the screen is black and Windows seems to load normally.

@ZOXZX
Copy link

ZOXZX commented Dec 24, 2023

Send me original and modified BIOS to have a look...
What GPU is used?

@franckythebest
Copy link

thanks for your help.

cpu: e5 2697v2
ram 4x8go sniper elite 2400mhz @2000mhz
gpu: xfx 5700xt thiccIII.
R4E1.zip

R4E32nvme5dsdt.zip

rename .zip in .rar

thanks a lot

@ZOXZX
Copy link

ZOXZX commented Dec 24, 2023

As I can see, CSM is left enabled and Above 4G is disabled ...
I'll make a video guide for all to follow and post a link here.

@franckythebest
Copy link

thank you for your efficiency. But I don't understand because I manually change CSM bios to "disabled" and above4g to "enabled".
and I just noticed that now the speed of my RAM remains at 1333mhz even if I change the speed manually.

@franckythebest
Copy link

I just compared the patches.txt file that I used to patch my bios "uefipatch" and I notice that yours has an additional value "# PciBus | Increase 256 byte configuration space limit to 4096 byte allowing access to PCIe extended configuration space
3C1DE39F-D207-408A-AACC-731CFB7F1DD7 10 P:FF000000760B48B8:00100000760B48B8

@franckythebest
Copy link

finally I succeeded. I used your patches.txt file. The one contained in the file you sent me. However, it is impossible to make the RAM work faster. see photos.
gpurebare
rogramfreq
rambios

@xCuri0
Copy link
Owner

xCuri0 commented Dec 24, 2023

@franckythebest did you read common issues and fixes wiki page

these issues are caused by using UEFITool and/or UEFIPatch directly on the BIOS image. And some have even reported unusually high voltages on X79 when this happens.

You need to do it the proper way using MMTool (read the wiki page if u need help with it)

@ZOXZX
Copy link

ZOXZX commented Dec 24, 2023

hmmm ... I was just recording a guide based on Rampage 4 extreme and I stumbled across a difficulty.
All patched modules can be replaced with MMtool, but amiboard always results in incorrect padding.
Any advice?

@franckythebest
Copy link

With the holidays, I didn't have time to worry about this problem. Indeed, I integrated "amiboardinfo.uefi" with uefitool and not mmtool. I will check that tomorrow.

@franckythebest
Copy link

hello xcurio. I noticed that in your comment of November 21, you recommended the modification of these lines

QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x0000000000000000, // Granularity
0x0000000000000000, // Minimum Range
0x0000000000000000, // Range Maximum
0x0000000000000000, // Translation Offset
0x0000000000000000, // Length
,, _Y0B, AddressRangeMemory, TypeStatic)

. which I didn't do. Do you think it should also be modified and explained to me the reason? THANKS.

@ZOXZX
Copy link

ZOXZX commented Dec 27, 2023

Just follow the guide...
Maybe different order of operations could solve padding issue.

@Teiketsu33
Copy link

Nope, don't do that. Change default setting to disable and optimal to enable. That way it'll be active after you load optimized defaults in bios. After that tweak settings as usual...

What I mean is to make the "Above 4G" option appear in BIOS interface.

@ZOXZX
Copy link

ZOXZX commented Dec 31, 2023

What I mean is to make the "Above 4G" option appear in BIOS interface.

It won't work with any display options (user/etc).
Only solution is default off and optimal on in amicpb.

@ZOXZX
Copy link

ZOXZX commented Jan 13, 2024

I've finally found a solution for BIOS bug where neither MMtool or UEFItool would successfully add modified ffs/body.
The problem occurs while patching itvqpi and presents as a padding issue in that BIOS volume.
The system is bootable, but BIOS in unaccessible so change can only be made with editor.

What you have to do is to find the value with hex editor, change it accordingly (you can use patched bios and just copy values) but then checksum fails.
I don't know if flashback would work or not, but official MSI flasher does not allow to flash the BIOS with wrong checksum on one of the headers.
Luckily, UEFItool_NE shows header offset (ivtqpi) so just go to that offset with hex and search from that point forward the current value (UEFItool displays it) and change to correct one :-)

B1
B2

Finally, now I can finish the guide ...
EDIT:
https://www.youtube.com/watch?v=78sdn_H5-pM

@xCuri0
Copy link
Owner

xCuri0 commented Jan 21, 2024

@ZOXZX thanks for figuring this out, I'll update the wiki with it

@ZOXZX
Copy link

ZOXZX commented Feb 7, 2024

I had an experiment with another ASUS (Gene) board, and this time amiboardinfo caused padding error.
Replacing amiboardinfo PE32 with UEFItool or complete ffs with MMtool always caused padding errors.

By comparing DSDT from last two BIOS versions, there was change at the end.
Newer BIOS had this:

Method (_SB._OSC, 4, NotSerialized) // _OSC: Operating System Capabilities
{
Return (Arg3)
}

Creating amiboard info with old DSDT or with this lines removed from new one, solved the padding problem.
Checking UEFI documentation, this entry does not seem important, but it gave me the another idea:
I've removed a couple of OS entries as in guide: "Remove unneeded ACPI _OSI entries to reduce DSDT" and the padding was solved without removing the lines above.
So it looks like at least some padding issues could be avoided by slightly reducing DSDT size.
Hope it helps someone ...

Repository owner locked and limited conversation to collaborators Feb 8, 2024
@xCuri0 xCuri0 converted this issue into discussion #135 Feb 8, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bios issue with firmware that needs patching help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests