[Bug 289647] graphics/drm-61-kmod: X11 with nvidia-drm-61-kmod fails to start after commit ac934345a14f
Date: Tue, 16 Sep 2025 20:39:55 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289647
--- Comment #7 from Bjoern A. Zeeb <bz@FreeBSD.org> ---
You have (good case):
hw.dri.0.busid: pci:0000:01:00.0
I have (old cases):
hw.dri.0.busid: pci:0000:00:02.0
hw.dri.0.busid: pci:0000:00:06.0
Difference: for you is that the bus number is non-zero, so that could be the
culprit?
We used to get that number from:
- bsddev = dev->dev->bsddev;
- bus = pci_get_bus(bsddev);
Now we get it via:
+ struct pci_dev *pdev = to_pci_dev(dev->dev);
+ bus = pdev->bus->number;
The latter is set by nvidia-drm in src/nvidia-drm/nvidia-drm-freebsd-lkpi.c
nv_drm_probe_devices -> linux_pci_attach_device -> lkpifill_pci_dev:
pdev->bus->number = pci_get_bus(dev);
So unless it is set on the wrong pdev this makes little sense.
If I am right, in your "bad" case the sysctl would report:
hw.dri.0.busid: pci:0000:00:00.0
If it does not the problem is elsewhere and we'll need to track that down. If
this is the case we'll still need to figure out why we end up on the wrong
(bsd)dev.
It would be easy to do this having an nvidia + ports tree and patching things
and reinstalling, given we roughly seem to know the places to look at.
Hmm, I seem to have an amdgpu at vgapci0@pci0:195:0:0 . It'd be a while as the
machine is doing anything but graphics currently buy I could try to set that
up. Might still work as unlike nvidia amdgpu uses LinuxKPI PCI and not a
mixture of native PCI and LinuxKPI PCI.
--
You are receiving this mail because:
You are the assignee for the bug.