Raptor Computing Systems Community Forums (BETA)

Third Party Hardware => GPU Compute / Accelerators => Topic started by: Hasturtium on July 28, 2022, 12:34:30 pm

Title: Necessary firmware for Navi14
Post by: Hasturtium on July 28, 2022, 12:34:30 pm
Hey there! Now that I've got my Blackbird motherboard fully working and functional, I've turned my attention to getting my Radeon Pro W5500 up and running. The Skiroot BOOTKERNFW size is around 1.8MB, which doesn't pose any problems for older Radeons whose firmware fits neatly into that space. However, the full size of Navi14-affiliated files /lib/firmware in my Void install is around 3.8 MB, and there are a large number of files. There are a couple that obviously aren't needed for Skiroot - VCN's tied to the video transcoding engine, MEC(2) is for Micro Engine Compute - but I've had real trouble finding which of these would be needed for Skiroot without overflowing the space. Has anyone else wrestled with this themselves?
Title: Re: Necessary firmware for Navi14
Post by: Woof on July 29, 2022, 03:09:57 pm
Hi! I haven't but I'm planning the same for a W5700 which should be identical, so I'm also interested.
Title: Re: Necessary firmware for Navi14
Post by: Hasturtium on August 05, 2022, 09:12:41 am
I'm going to go ahead and say that I won't personally bother with Navi14 firmware in skiroot. With an HDMI connection to the integrated video and a DisplayPort connection running to my Radeon Pro W5500, I have a nice bifurcation between early boot notifications and my fully functioning Linux environment. After some tinkering, I worked out a solid configuration keeping the instructions here (https://wiki.raptorcs.com/wiki/Troubleshooting/GPU#I_want_Petitboot_via_AST_but_the_subsequent_Linux_OS_console_on_a_discrete_GPU) in mind, with the AST video component enabled. Specificallly:

- adding GRUB_CMDLINE_LINUX="modprobe.blacklist=ast video=offb:off amdgpu.aspm=0" to /etc/default/grub, then running sudo update-grub. From kernel version 5.18 onward, amdgpu.aspm=0 should not be necessary, but my install of Void comes with kernel 5.13, and out of an abundance of caution I've left it in there.
- running lspci to find the PCI addresses for my Radeon and the AST GPU.
- creating the configuration file /etc/X11/xorg.conf.d/21-gpu-driver.conf with a text editor, in which I placed the following info for easy cut 'n' pasting:

# AST2500
Section "Device"
    Identifier     "GPU0"
    Driver         "modesetting"
    BusID          "PCI:2@5:0:0"
    VendorName     "ASpeed Corporation"
EndSection

# Radeon Pro W5500
Section "Device"
    Identifier     "GPU1"
    Driver         "amdgpu"
    BusID          "PCI:3@0:0:0"
    VendorName     "AMD Corporation"
EndSection

# this is absolutely necessary, it tells xorg which GPU to use for the screen
Section "Screen"
    Identifier     "Screen0"
    Device         "GPU1"
EndSection

Be 100% certain your PCI address is substituted in for the Radeon, and for the AST in case that's different.

Power the system down entirely for 30 seconds, restore power, let the BMC initialize the system, turn the system on, and you'll hopefully be set.
Title: Re: Necessary firmware for Navi14
Post by: MPC7500 on August 05, 2022, 11:19:26 am
The same is written on the Wiki (https://wiki.raptorcs.com/wiki/Troubleshooting/GPU).
On Void you can choose active Kernels (https://kernel.org/category/releases.html) like 5.4 (https://github.com/void-ppc/void-packages/tree/master/srcpkgs/linux5.4/patches) / 5.10 / 5.15 / 5.18.
All needed patches on Void are included. Means you don't need "amdgpu.aspm=0" anymore. Apart from Kernel 5.15.x, IIRC.

Edit: Already added in Kernel 5.15.54 (https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.54). 5.16 and 5.17 are already EOL.
Title: Re: Necessary firmware for Navi14
Post by: Hasturtium on August 05, 2022, 07:33:43 pm
The same is written on the Wiki (https://wiki.raptorcs.com/wiki/Troubleshooting/GPU).
On Void you can choose active Kernels (https://kernel.org/category/releases.html) like 5.4 (https://github.com/void-ppc/void-packages/tree/master/srcpkgs/linux5.4/patches) / 5.10 / 5.15 / 5.18.
All needed patches on Void are included. Means you don't need "amdgpu.aspm=0" anymore. Apart from Kernel 5.15.x, IIRC.

Edit: Already added in Kernel 5.15.54 (https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.54). 5.16 and 5.17 are already EOL.

I’ll update my config soon. Thank you!
Title: Re: Necessary firmware for Navi14
Post by: MPC7500 on August 06, 2022, 07:44:47 am
And one more thing. When you blacklist the AST GPU on boot, then you don't need a xorg config file at all.
You only need the config file when you're using the AST GPU (for high resolution (https://wiki.raptorcs.com/wiki/Troubleshooting/GPU#Display_stuck_at_default_low_resolution_with_AST_HDMI_GPU)) or if you don't blacklist the amdgpu or AST GPU.

BUT on Void you have to blacklist the other GPU otherwise it won't work. Anyway it's the better solution to blacklist one of the GPUs.
Title: Re: Necessary firmware for Navi14
Post by: r34per on November 29, 2022, 05:28:21 pm
Is the general consensus that navi14 firmware is too big for the bootkernfw? I've tried omitting various files to try getting the size down to no avail. With how my monitors are set up I can pretty much only use the HDMI port on my rx5300 or the onboard hdmi port of the blackbird, and it's a bit of a pain having to constantly climb under my desk to switch the ports when I need to use the boot menu. I just leave the onboard vga disabled just use the serial console on openbmc from my laptop when I need to get into the menu now, but of course being able to just use my rx5300 would be most ideal because I switch between void linux and fedora rather often.
Title: Re: Necessary firmware for Navi14
Post by: MPC7500 on November 29, 2022, 10:04:44 pm
I have a HDMI Switch.
Title: Re: Necessary firmware for Navi14
Post by: power9mm on December 30, 2022, 03:53:29 pm
And one more thing. When you blacklist the AST GPU on boot, then you don't need a xorg config file at all.
You only need the config file when you're using the AST GPU (for high resolution (https://wiki.raptorcs.com/wiki/Troubleshooting/GPU#Display_stuck_at_default_low_resolution_with_AST_HDMI_GPU)) or if you don't blacklist the amdgpu or AST GPU.

BUT on Void you have to blacklist the other GPU otherwise it won't work. Anyway it's the better solution to blacklist one of the GPUs.

so i can just blacklist the ast in the bootloader and not have to flash firmware to use a pcie gpu when the OS boots?
Title: Re: Necessary firmware for Navi14
Post by: MPC7500 on December 30, 2022, 04:35:34 pm
You only have to flash the firmware when you want the GPU also in Petitboot.
You could instead use the AST til Petitboot and then switch to the AMD GPU (and blacklist the AST).
Title: Re: Necessary firmware for Navi14
Post by: power9mm on December 30, 2022, 09:33:13 pm
do i need to worry about placing the jumper for the AST or is blacklisting it in bootloader for the OS all i need to do?
Title: Re: Necessary firmware for Navi14
Post by: MPC7500 on December 30, 2022, 09:45:27 pm
Jumper or blacklist. Blacklistng has some advantages.
Title: Re: Necessary firmware for Navi14
Post by: markr87 on January 01, 2023, 10:47:06 am
@MPC7500 If you blacklist the AST can you interact with Petitboot?
Title: Re: Necessary firmware for Navi14
Post by: Hasturtium on January 01, 2023, 01:13:51 pm
@MPC7500 If you blacklist the AST can you interact with Petitboot?

Yes - if you flash the correct firmware to Skiroot's BOOTKERNFW section. But knowing which subset of the multiple megabytes of modern Radeon firmware to load into the ~1.8MB sector allocated for storing that firmware was why I created this thread back in late July of 2022... and I still don't know the answer there. So now I just toggle inputs between an HDMI to the BMC video and DisplayPort to the Radeon as needed.
Title: Re: Necessary firmware for Navi14
Post by: MPC7500 on January 01, 2023, 01:43:57 pm
@MPC7500 If you blacklist the AST can you interact with Petitboot?

Yes. Blacklisting AST is post-Petitboot.
Title: Re: Necessary firmware for Navi14
Post by: power9mm on January 29, 2023, 01:53:22 pm
"modprobe.blacklist=ast video=offb:off amdgpu.aspm=0" when i add this in the bootloader for opensuse leap i get no video whatsoever and it just hangs at boot
Title: Re: Necessary firmware for Navi14
Post by: MPC7500 on January 29, 2023, 02:11:04 pm
Weird. Some time ago I tried Leap 15.1 with no issue.
Title: Re: Necessary firmware for Navi14
Post by: power9mm on January 29, 2023, 02:38:28 pm
perhaps opensuse requires different commands...?
Title: Re: Necessary firmware for Navi14
Post by: power9mm on January 29, 2023, 02:48:40 pm
this is what i get when i switch to displayport, and it just hangs here. GPU is amd vega 64. ive had this happen on both tumbleweed and leap.
Title: Re: Necessary firmware for Navi14
Post by: power9mm on January 29, 2023, 09:32:04 pm
so it looks like the X display manager fails to start
Title: Re: Necessary firmware for Navi14
Post by: power9mm on January 29, 2023, 09:41:31 pm
what i can find..
Title: Re: Necessary firmware for Navi14
Post by: ClassicHasClass on January 30, 2023, 10:40:46 am
What about starting X directly from the command line (usually `startx` or some such: I don't run Fedora with a display manager at all)?
Title: Re: Necessary firmware for Navi14
Post by: power9mm on January 30, 2023, 12:21:16 pm
well, i installed fedora 37, and i'm still getting the same-ish issue of it just hanging at boot. not sure if its my gpu (amd vega 64) or theres something i'm messing up, but i add those commands and update grub so I'm not sure.
Title: Re: Necessary firmware for Navi14
Post by: MPC7500 on January 30, 2023, 01:47:12 pm
Wait. When you're blacklisting the AST GPU you have to switch to the AMD GPU as well.
Means, after you are hitting enter in Petitboot, you have to switch to the port where the AMD GPU is connected, immediately.

Otherwise, the OS don't recognize the AMD GPU.

If you still stay on the AST port after blacklisting this GPU, you will get exactly this picture. It is logical that the Display Manager cannot start then.
Title: Re: Necessary firmware for Navi14
Post by: power9mm on January 30, 2023, 04:39:26 pm
I tried that, also tried without an hdmi connected at all and i'd get a blank black screen when the system would switch to DP outpout.
Title: Re: Necessary firmware for Navi14
Post by: power9mm on January 30, 2023, 06:29:19 pm
If i'm unable to get the gpu to work via this method would i be able to use a jumper on the AST and have the gpu function without flashing firmware?
Title: Re: Necessary firmware for Navi14
Post by: MPC7500 on January 30, 2023, 06:45:55 pm
This will give the same result. But try it. If you set the jumper you will get a black screen at the beginning and the keyboard will not work, IIRC until the OS is loaded.

AST is connected via HDMI?
AMD via DP?

If yes, boot to petitboot.
Switch to DP.
Press enter
Title: Re: Necessary firmware for Navi14
Post by: power9mm on January 30, 2023, 07:03:21 pm
I dont have a jumper on hand atm unless i want to pull one off the board which im not going to do. This is what i got when i tried running startx under leap.

I went back to leap after i determined it wasn't a distro specific issue.

worse case scenario, i can flash amd firmware and use the jumper, correct? Would've really preferred not to do that but i'm at a loss at this point
Title: Re: Necessary firmware for Navi14
Post by: power9mm on January 31, 2023, 06:11:59 pm
update: got it to work, had to do the xorg conf file in mentioned in the previous page.