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

amdgpu: crash when loading amdgpu if unsupported iGPU is present but not used #340

Open
dublet opened this issue Jan 13, 2025 · 2 comments

Comments

@dublet
Copy link

dublet commented Jan 13, 2025

Describe the bug
I recently upgraded to FreeBSD 14.2 from 14.1 and found that my amdgpu driver would crash upon loading.

My CPU is an AMD Ryzen 9600X
My GPU is an AMD Radeon PRO W6400.

This combination worked fine before the upgrade. After suspecting some foul play and downgrading drm-kmod etc, I found some of the bugs here about not supporting Raphael GPUs and it sparked a little light.

Looking at the output of fwget -v, there were at least two matched to amd:

Trying to match device 0x7422 in class video and vendor amd with pci_video_amd
Trying to match device 0x13c0 in class video and vendor amd with pci_video_amd

Now, the built in GPU is not used, nothing is plugged in. Previously I guess this iGPU was ignored, however now it crashes, seemingly as it detects an unsupported GPU and refuses to proceed.

By disabling the iGPU in the BIOS, I was able to get the amdgpu driver to load again and resume my activities.

I appreciate it would not be able to detect that there is nothing plugged in, but it seems relatively poor form to crash on the unsupported GPU when there is a perfectly good supported one sitting there as well to make use of.

FreeBSD version
Output of uname -aKU:

FreeBSD bender 14.2-RELEASE FreeBSD 14.2-RELEASE releng/14.2-n269506-c8918d6c7412 GENERIC amd64 1402000 1402000

PCI Info

pciconf -lv

Paste the output of pciconf -lv

vgapci0@pci0:3:0:0:     class=0x030000 rev=0x00 hdr=0x00 vendor=0x1002 device=0x7422 subvendor=0x1002 subdevice=0x0e44
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Navi 24 [Radeon PRO W6400]'
    class      = display
    subclass   = VGA

DRM KMOD version

# pkg query -x '%n %v' 'drm.*kmod'
drm-61-kmod 6.1.92.1401000_3
drm-kmod 20220907_3

To Reproduce
Steps to reproduce the behavior:

  1. Acquire a Ryzen 9000 series CPU equipped with iGPU and AMD Radeon GPU
  2. Leave the iGPU enabled in the BIOS, but have nothing plugged in
  3. Try and start X

Workaround:

Disable the iGPU forcibly in the BIOS.

Screenshots

No screenshots are possible as the screen goes blank and locks up.

Additional context
Add any other context about the problem here.

@thesunexpress
Copy link

As mentioned in #330 (comment) some weeks ago

Perhaps we need / have to document a way to target one GPU over the other, instead of having to rely on a physical BIOS tweak, as pertaining to DRM-KMOD specifically. I suspect there might be a way in /boot/loader.conf to prefer attaching to one PCIe device over the other (and disabling the other...). Maybe we can do it by spoofing a PCI-passthrough via pptdevs="a/b/c" -- where the device a/b/c is the one you want to block out / disable. I believe there is a way to force Xorg to target only one GPU device, thus allowing you to ignore the iGPU on the CPU.

For reference, I have a 7950X3D (also crazy fast) with an NVidia RTX 3070, where I have left the iGPU enabled in BIOS, and have no issues -- and I never load the amdgpu driver anyways.

That 9600X is fast isn't it?! I can't wait to get my hands on a 9950X3D. The 9700X is ridiculously quick already.

How are you liking the Radeon Pro W6400? It is high on my list to acquire...

@dublet
Copy link
Author

dublet commented Jan 14, 2025

The most user friendly thing to do would be a pseudocode approach of:

collect all GPUs available
if amount of GPUs > 1:
   filter out the unsupported GPUs
if remaining GPU is unsupported:
   still crash as before
continue along with remaining supported GPU

The W6400 is great for my purposes, which is to drive a couple of 4k screens at 60Hz with some of the lowest relative power consumption going, the only wrinkles have been the FreeBSD support for RNA2, and this issue.

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

2 participants