Solved xorg with amdgpu: no screens found

Hello dear FreeBSD community, I would ask of you a little bit of help in getting Xorg to work with amdgpu.

The setup:
  • FreeBSD 14-CURRENT on amd64 architecture (would use RELEASE if it turns out there are no GPU compatibility issues)
  • GPU AMD Radeon RX 6600 (Navi 23)
  • Monitor connected via DisplayPort
  • Installed graphics/drm-kmod, which pulls in graphics/drm-510-kmod (CURRENT may have no advantage over RELEASE at this point, since it does not use graphics/drm-515-kmod). Added amdgpu to kld_list. Checked that the module loads in boot output and with kldstat(8).
The issue: amdgpu kernel module loads, amdgpu loads in X, but no devices (screens) are detected. I get working X with vesa.



X11 configuration:

display.conf for forcing specific display driver. Setting BusID was mandatory to get amdgpu to load, as far as I can discern from the logs (attached).

Code:
Section "Device"
    Identifier "Card0"
    Driver "amdgpu"
    #Driver "vesa"
    BusID "pci0:3:0:0"
EndSection

In order to use vesa, I had to remove the BusID specification and unload the amdgpu kernel module.

I tried with the following to, perhaps, get X to detect the display in display.conf. It is probably totally useless. I've tested without it as well.

Code:
Section "Screen"
    Identifier "Screen0"
    Device "Card0"
    SubSection "Display"
        Modes "1920x1080"
    EndSubSection
EndSection

I also have an active InputClass keyboard section, which most likely does not matter.

The logs are attached, but I'd point out some key things:

Without setting bus ID, there are issues:
Code:
[    68.703] (II) AMDGPU(0): [KMS] Kernel modesetting enabled.
[    68.703] (EE) AMDGPU(0): [drm] Failed to open DRM device for pci:0000:03:00.0: No such file or directory
[    68.703] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    68.703] (EE) Screen 0 deleted because of no matching config section.
[    68.703] (II) UnloadModule: "amdgpu"

When the bus ID is set, I get:
Code:
[   108.350] (II) AMDGPU: Driver for AMD Radeon:
    All GPUs supported by the amdgpu kernel driver
[   108.350] (--) Using syscons driver with X support (version 2.0)
[   108.350] (--) using VT number 9

[   108.476] (EE) No devices detected.
[   108.476] (EE)
Fatal server error:
[   108.476] (EE) no screens found(EE)
 

Attachments

  • Xorg-amdgpu-busid.txt
    3.7 KB · Views: 76
  • Xorg-vesa.txt
    61.4 KB · Views: 66
  • Xorg-amdgpu-nobusid.txt
    4.1 KB · Views: 67
Those/that driver may be out of date or something. You might find it useful to switch the console driver to vt and using kernel modesetting for video. Be sure to update your xorg.conf configuration to reflect the correct device driver, too.
 
have you tried radeonkms? kldunload whatever amdgpu you loaded, then kldload radeonkms then startx?
 
You might find it useful to switch the console driver to vt
There's nothing to 'switch', vt(4) is the default and has been for quite some time.

Installed graphics/drm-kmod, which pulls in graphics/drm-510-kmod (CURRENT may have no advantage over RELEASE at this point, since it does not use graphics/drm-515-kmod).
The graphics/drm-kmod doesn't take -CURRENT into account. Just remove it and install graphics/drm-515-kmod.

Code:
.  if ${OSVERSION} < 1300000
RUN_DEPENDS+=	${KMODDIR}/drm.ko:graphics/drm-fbsd12.0-kmod
_DRM_ARCHS=	amd64 i386
.  elif ${OSVERSION} >= 1301000
RUN_DEPENDS+=	${KMODDIR}/drm.ko:graphics/drm-510-kmod
_DRM_ARCHS=	aarch64 amd64 i386 powerpc64 powerpc64le
.  else
There's nothing for $OSVERSION > 1400000

If I remember correctly somebody recently mentioned that 13-STABLE will be getting the required kernel changes to make graphics/drm-515-kmod available for it.
 
Thanks everyone for your answers.

vt(4) is, indeed, running by default, as confirmed by this command:
Code:
% sysctl kern.vty
kern.vty: vt

have you tried radeonkms? kldunload whatever amdgpu you loaded, then kldload radeonkms then startx?
Not yet, since the GPU is pretty new, but doesn't hurt to try.

The graphics/drm-kmod doesn't take -CURRENT into account. Just remove it and install graphics/drm-515-kmod.
That's a pretty neat observation. 😮 I will try.
Honestly, I installed graphics/drm-515-kmod initially, but the system froze on boot message about loading kernel modules. Some dependencies from graphics/drm-kmod might have been missing. I will try to install graphics/drm-515-kmod while keeping the dependencies of the graphics/drm-kmod metaport.
 
The graphics/drm-kmod doesn't take -CURRENT into account. Just remove it and install graphics/drm-515-kmod
This solved the issue, namely, installing graphics/drm-515-kmod while keeping the dependencies of graphics/drm-kmod. The installation forced the removal of graphics/drm-kmod and graphics/drm-510-kmod, but it works.

During the boot process, the console font switched to a significantly smaller size after a brief black screen period (probably the sign of a proper driver load). After removing the bus ID specification from the Xorg configuration I got a working X server with a desktop environment. I haven't yet tested if manually specifying the driver name is still required at all.

Although the graphical interface works, VT seems to respond with a crash dump during the boot process:
Code:
VT: Replacing driver "efifb" with new "fb".
taskqueue_drain with the following non-sleepable locks held:
exclusive sleep mutex vtdev (vtdev) r = 0 (0xffffffff816aaef8) locked @ /usr/src/sys/dev/vt/vt_core.c:3057

I've provided the dmesg(8) output in case someone would like to investigate. There's also a partial Xorg log of the working run.

I am marking the thread as solved. Thank you all for help.
 

Attachments

  • dmesg-amdgpu-515.txt
    21.5 KB · Views: 90
  • xorg-amdgpu-515-nobusid.txt
    44.9 KB · Views: 64
Is there any way to add gpu-firmware-amd-kmod to 13.2 Release or do I need to wait for the official 14 Release to be available? I have a system with an RX 6400 I would like to start using.

I tried adding drm-515-kmod but that didn't work. I don't want to use Stable or Current. But if I can't use the RX 6400 on Release I will just wait until the next release.
 
Is there any way to add gpu-firmware-amd-kmod to 13.2 Release or do I need to wait for the official 14 Release to be available? I have a system with an RX 6400 I would like to start using.

I tried adding drm-515-kmod but that didn't work. I don't want to use Stable or Current. But if I can't use the RX 6400 on Release I will just wait until the next release.
Just use latest packages... RX 6400 is Beige Goby, which is available in graphics/gpu-firmware-amd-kmod.
 
Switched to latest and installed but it doesn't work. I did notice that only drm-510-kmod is available on 13.2 Release. If I try and install 515 it is not found. Could this be why?

I noticed in the Xorg crash log it says radeon module does not exist. And no drivers available. Also no screens found.
 
Switched to latest and installed but it doesn't work. I did notice that only drm-510-kmod is available on 13.2 Release. If I try and install 515 it is not found. Could this be why?

I noticed in the Xorg crash log it says radeon module does not exist. And no drivers available. Also no screens found.
Yeah, the packaging of drivers seems kind of sloppy these days. You might want to re-read this thread of mine from about a year ago: Thread sienna_cichlid-driver.86670. It contains troubleshooting hints, I'd suggest applying them to your card. Just keep in mind, my card was an RX 6900 XT, yours is an RX 6400, so there are some details to pay attention to and change so that the process works for you.

And going by your info, it sounds like the packaging issues are still not resolved - files don't get put into correct places by the meta-packages. 😒
 
It's really no big deal. I'll wait till next official release and go from there. If it's not resolved at that time I'll dive into troubleshooting. I have plenty of other systems to test until then to keep me busy. I am installing 13.2 i386 on a Dell D610 at the moment. Lots of fun.
 
Hey, I tried 14 current (Jun 1) and loaded drm-515-kmod. I get an x session but anything with mesa or accel locks the system up. I just had to try. It doesn't fully work yet. Looked at your post but it just doesn't fully work yet. Still fantastic to be able to launch x. Icewm works, but plasma and gnome and anything accelerated fails. I tried launching Firefox, full lockup. I tried glxgears and xrandr. It just locks up. 😆

EDIT: some log data

Code:
Sddm.log

Failed to write xauth file
Could not start Display server on vt 9

Xorg.0.log
LoadModule: "fb"

Just one line from each log. But as you can see it's not able to use the card properly.

EDIT 2: I installed and ran hw-probe but when I ran it the system locked up. Bummer.
 
Back
Top