Author Topic: Graphics Card install  (Read 52179 times)

MauryG5

  • Hero Member
  • *****
  • Posts: 760
  • Karma: +22/-1
    • View Profile
Graphics Card install
« on: November 30, 2019, 04:39:07 am »
Hi everyone, I would like to use my graphics card on my Blackbird system but I didn't understand some passages. They tell me to take the files with the .BIN extension and put them in / lib / firmware / amdgpu but the problem is that I don't know where to take this line or directory, I didn't understand what the / lib / firmware / amdgpu line is exactly, how to put all the .BIN files downloaded. Does anyone know how to proceed? Thanks

nglevin

  • Newbie
  • *
  • Posts: 16
  • Karma: +4/-0
    • View Profile
Re: Graphics Card install
« Reply #1 on: November 30, 2019, 11:55:40 am »
I don't really know what you're working with, where you are or what instructions you're following. I am also not an expert on this subject. However, with help from the IRC channel, I do have an AMD GPU working with my Blackbird. To help everyone:

Which walkthrough/instructions are you following? Link?

Which distro of Linux are you using? (Typically the Linux distro will have a set of packages available with GPU drivers that you can set up, which can save you significant work in getting that part set up, or at least get you 90% of the way there. Some like Debian will separate that package from the default set of package repositories, as Debian does with "non-free" packages.)

Are you comfortable with using gnome-terminal or xterm?
« Last Edit: November 30, 2019, 11:02:34 pm by nglevin »

MauryG5

  • Hero Member
  • *****
  • Posts: 760
  • Karma: +22/-1
    • View Profile
Re: Graphics Card install
« Reply #2 on: November 30, 2019, 02:03:42 pm »
Hi, thanks for the reply, I'm using Fedora 31, recognize my AMD 5700 XT Navi 10 card, I just have to activate it and make it work because at the moment I still haven't managed to make it work and I still have to use the Blackbird HDMI video output . As an ambitious use of GNOME and I like it a lot, I am very well. Raptor told me to take the binaries that are currently related to my GPU and put them all in lib / firmware / amdgpu, only I don't know where to find this path, I didn't understand how to do ...

madscientist159

  • Raptor Staff
  • *****
  • Posts: 47
  • Karma: +11/-0
    • View Profile
Re: Graphics Card install
« Reply #3 on: November 30, 2019, 04:02:39 pm »
In situations like this it can also be helpful to post dmesg output from the failed driver load, if you can get it.  Most Linux drivers are pretty clear about what firmware file(s) they are missing for the installed hardware, and that can help people here figure out the proper instructions.
« Last Edit: November 30, 2019, 04:04:55 pm by madscientist159 »

kmarek

  • Newbie
  • *
  • Posts: 14
  • Karma: +4/-0
    • View Profile
Re: Graphics Card install
« Reply #4 on: November 30, 2019, 04:25:21 pm »
linux-firmware on Fedora 31 has navi10 .bin files. You're likely not missing firmware files.

MauryG5

  • Hero Member
  • *****
  • Posts: 760
  • Karma: +22/-1
    • View Profile
Re: Graphics Card install
« Reply #5 on: November 30, 2019, 06:10:01 pm »
I also imagined that Fedora 31 already had something pre-installed since the card is recognized perfectly, the problem is that I don't know how to activate it, I can't understand how to make it operational ... Raptor says that from the next firmware of the Blackbird, it will be possible to activate it but they also say that we have to wait for the Q1 of 2020 which I think is a bit long to wait and so I wanted to understand if it was possible to do it already without the need to wait for the new firmware ...

nglevin

  • Newbie
  • *
  • Posts: 16
  • Karma: +4/-0
    • View Profile
Re: Graphics Card install
« Reply #6 on: November 30, 2019, 06:43:32 pm »
I also imagined that Fedora 31 already had something pre-installed since the card is recognized perfectly, the problem is that I don't know how to activate it, I can't understand how to make it operational ...
You need to share some logs before we can help triage this.

madscientist159's suggestion to share dmesg output (tutorial) which you can pipe to a file, and share with us via a link with a service like dpaste would be a good start.

Quote
Raptor says that from the next firmware of the Blackbird, it will be possible to activate it but they also say that we have to wait for the Q1 of 2020 which I think is a bit long to wait and so I wanted to understand if it was possible to do it already without the need to wait for the new firmware ...

Slow down a bit. It sounds like you're talking about the bootloader, aka petitboot, which starts before you load Linux. It sounds like you really want to get the GPU working on Fedora. These are two different problems.


For yourself and future visitors, there is a Wiki for troubleshooting GPU problems on Talos and Blackbird hardware. That's a good place to check for specific issues you come across, and tips to diagnose.

I've found that this page is a little Debian/Ubuntu focused at the moment, owing to many users of Raptor hardware being users of Debian, though the advice should be applicable for all Linux distros.
« Last Edit: November 30, 2019, 11:01:57 pm by nglevin »

MauryG5

  • Hero Member
  • *****
  • Posts: 760
  • Karma: +22/-1
    • View Profile
Re: Graphics Card install
« Reply #7 on: December 01, 2019, 07:40:41 am »
Maybe I didn't know how to explain myself. I don't know the procedure you're talking about, unfortunately I'm not a Linux expert, I'm just learning to use it now. I need to understand simply how I can activate my AMD Radeon 5700 XT GPU, which the system recognizes perfectly (including 3D acceleration). I need to figure out how to tell the system, which has to use that to give me the video output, thus activating me, both the HDMI output and the others present in the graphics card. My problem is only this ... If there is also the procedure for Ubuntu it is fine as well, I have also installed the one in another HD, I am mainly interested in Fedora but if you know it for Ubuntu, it's ok anyway, meanwhile I begin to understand how to use the GPU ... Thanks

kmarek

  • Newbie
  • *
  • Posts: 14
  • Karma: +4/-0
    • View Profile
Re: Graphics Card install
« Reply #8 on: December 01, 2019, 09:46:30 am »
You may not be able to use the embedded GPU and the AMD GPU at the same time. There may be DMA issues in having both enabled at the same time.

See: https://wiki.raptorcs.com/wiki/POWER9_Hardware_Compatibility_List/PCIe_Devices#AMD
See: https://wiki.raptorcs.com/wiki/Troubleshooting/GPU#Workaround_1:_Disable_on-board_VGA

Note, as the second link says, it may be necessary to disable the embedded GPU by putting a jumper cap on a specific place on the motherboard. Reference page 37 of the Blackbird manual: https://wiki.raptorcs.com/w/images/c/ce/C1P9S01_users_guide_version_1_0.pdf

There isn't a spare jumper there, so if you don't have one (maybe from the back of a junk IDE hard drive), then you may need to buy some: https://www.amazon.com/dp/B00N552DWK/

Hopefully you don't need to disable onboard. More on that later.

That being said, there's a couple of other notes regardless:

Many AMD GPUs do not honor PCIe device resets, so you might have something working one boot, and not have output after a reboot (vs shutdown and fresh power up). Newer versions of the amdgpu driver have a workaround to reset the card, but for a lot of cards, this seems to work exactly twice. This is probably not what's causing your card to no work in Fedora 31 right now, but this may be interfering with some of your tests if you're rebooting every time. Personally, I'm "avoiding" the issue by configuring skiboot to go through a full power cycle when requested to reboot (run in bootloader):
Code: [Select]
nvram -p ibm,skiboot --update-config fast-reset=0
Xorg (typically your display server) does some really weird things when multiple GPUs are active. Usually I find that having displays on both GPUs causes both GPUs to need to render the whole desktop (to then show only the part that they are displaying), but doing this usually limits your performance or features to that of the lesser card. Someone on IRC said they had an AMD GPU working with the embedded AST GPU, but they were missing gamma (display brightness) in having both enabled. Since you're using GNOME, you might be using Wayland, which may behave differently (I'm not well versed in Wayland).

You need firmware in your bootloader if you want your bootloader to display, but it may not play nicely with your Linux OS, anyway. Your bootloader probably doesn't display out your AMD GPU. I'm guessing you're using the embedded HDMI because of this. The bootloader is itself another Linux environment with the amdgpu driver, and will want firmware to actually enable the card. The firmware is not already included because it's not open source/auditable and because there isn't enough space to generically include all GPU firmware. Raptor might be telling you to copy the amdgpu firmware into the bootloader to get the bootloader to display, which isn't necessary to get your Linux OS to display. However, AMD cards do not accept firmware more than once (with resets being a possible exception). The specific issue I ran into after installing firmware is:
- the bootloader would display on a fresh boot
- Fedora's amdgpu would reset the card and load their more up to date firmware
- I'd reboot and the bootloader (having an older amdgpu driver that doesn't reset the card) would fail to load the firmware and panic.
Some of us are avoiding these sorts of issues by not installing GPU firmware into the bootloader. I use serial console when I need to interact with my bootloader (serial console will work regardless of functioning GPU, too).

We'll learn more from dmesg (the command that shows Linux kernel logs).

Please:

If Fedora boots and you have a desktop on the embedded GPU, please open a terminal (search "terminal" in GNOME) and run:
Code: [Select]
dmesgand copy-paste the output here into a code block.

If Fedora boots, but finally ends up at a black screen or something, switch to a virtual terminal by pressing ctrl-alt-F2 (ctrl-alt-F1 will go back to the first desktop on Fedora, or ctrl-alt-F7 on Ubuntu). When you're at a virtual terminal, log in and run:
Code: [Select]
dmesg | fpaste then go to the link it outputs on another computer, and copy the output from the link (link is only valid for a day).

If Fedora boots but breaks such that you cannot go to a virtual terminal on the embedded card, reboot, press "e" (edit) in bootloader before booting, and add the following to cmdline to temporarily disable using the AMD GPU at all:
Code: [Select]
rd.driver.blacklist=amdgpu modprobe.blacklist=amdgpu rd.driver.blacklist=amdgpudrmfb modprobe.blacklist=amdgpudrmfbthen, instead of dmesg, run the following and paste that output:
Code: [Select]
sudo cat /var/log/messages

If you're having a different issue, please give more details.

We'll suggest a fix if dmesg makes it clear why the GPU doesn't start.

MauryG5

  • Hero Member
  • *****
  • Posts: 760
  • Karma: +22/-1
    • View Profile
Re: Graphics Card install
« Reply #9 on: December 01, 2019, 10:16:12 am »
Hi, I currently use the HDMI video output integrated in the blackbird obviously because it's the only one I can use because if I try to insert the HDMI cable into the 5700 XT output, it doesn't work at the moment. I will try to execute that command and send the result here in the discussion and we'll see what the system says. Thanks

q66

  • Guest
Re: Graphics Card install
« Reply #10 on: December 01, 2019, 10:21:53 am »
you don't need to do any of these complicated things, nor you need to load firmware anywhere, etc.

all you need to do is

1) have your petitboot menu on onboard graphics
2) have the booted OS switch to dedicated graphics - there is no PCIe device reset stuff since the driver was not previously loaded on petitboot screen

to make the final booted OS use the dedicated graphics, you need to add modprobe.blacklist=ast video=offb:off on your kernel command line and that's literally it

kmarek

  • Newbie
  • *
  • Posts: 14
  • Karma: +4/-0
    • View Profile
Re: Graphics Card install
« Reply #11 on: December 01, 2019, 10:28:13 am »
q66:

PCIe device resets will still affect reboots. It affects me even having the AST GPU disabled by jumper.

Was going to suggest blacklisting ast once it was clear that it was the issue. Other people have AST and AMD working at same time. Also add:
Code: [Select]
rd.driver.blacklist=astbecause modprobe.blacklist doesn't blacklist from dracut initrd.

I am also not certain that blacklisting it (not jumper disabling) solves DMA issues.

q66

  • Guest
Re: Graphics Card install
« Reply #12 on: December 01, 2019, 10:39:09 am »
AMD GPUs deal fine with reboots as long as the driver/firmware wasn't previously loaded as a different version, I've been using fast reboot for as long as I can remember on both Talos and Blackbird and there have been no issues whatsoever.

Just using `modprobe.blacklist` works fine. Void uses dracut and there have never been any issues with that, nor I experienced them on any other OS. It's a parameter passed on the kernel, and any call to `modprobe` regardless of whether from initramfs or from the target system will not load it unless overridden, and the kernel will not auto-load it either.

DMA issues (assuming you need the 32-bit DMA thing) are a completely unrelated thing and will affect very few people.

Also, RX 5700 cards are extremely problematic on Linux right now (even on x86). To get anywhere near having a remotely stable experience, you need a patched kernel 5.4, LLVM 10 from svn, and mesa from git built against this LLVM, any other configuration will result in frequent hangs (https://gitlab.freedesktop.org/drm/amd/issues/892)

kmarek

  • Newbie
  • *
  • Posts: 14
  • Karma: +4/-0
    • View Profile
Re: Graphics Card install
« Reply #13 on: December 01, 2019, 10:46:56 am »
AMD GPUs deal fine with reboots as long as the driver/firmware wasn't previously loaded as a different version, I've been using fast reboot for as long as I can remember on both Talos and Blackbird and there have been no issues whatsoever.

You and I discussed this on IRC before. RX Vega 64 is still subject to the two reboot issue even if firmware version hasn't changed.

Just using `modprobe.blacklist` works fine. Void uses dracut and there have never been any issues with that, nor I experienced them on any other OS. It's a parameter passed on the kernel, and any call to `modprobe` regardless of whether from initramfs or from the target system will not load it unless overridden, and the kernel will not auto-load it either.

Ah, okay. I probably made a typo when I had issues in the past, then...

Also, RX 5700 cards are extremely problematic on Linux right now (even on x86). To get anywhere near having a remotely stable experience, you need a patched kernel 5.4, LLVM 10 from svn, and mesa from git built against this LLVM, any other configuration will result in frequent hangs (https://gitlab.freedesktop.org/drm/amd/issues/892)

I was unaware.

q66

  • Guest
Re: Graphics Card install
« Reply #14 on: December 01, 2019, 10:52:43 am »
Either way, before trying anything complicated, I'd simply try blacklisting ast (and disabling offb, as the firmware "helpfully" emulates openfirmware framebuffer by default so you'll get output on ast even if the driver is not loaded) and see whether that does anything. 95% chance it will, and if it doesn't, only then I'd try any further steps.

Definitely don't try to load any firmware into BOOTKERNFW or whatever right now. You don't really need any of that *unless* you want the Petitboot screen to show up on dedicated graphics and even then I wouldn't exactly recommend it since the drivers are problematic with that stuff.