X fails with AMD integrated graphics, "/dev/dri/card0: No such file or directory"

I am trying to get X running on an AMD board with integrated graphics. I increased the graphics memory from 64MB to 256MB.

This is a fresh install of FreeBSD 11.2, there is no xorg.conf file and I try using startx.
Code:
rh@lark2:~ % pciconf -lv | grep -B 4 VGA
vgapci0@pci0:0:1:0:     class=0x030000 card=0x86231043 chip=0x98301002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Kabini [Radeon HD 8400 / R3 Series]'
    class      = display
    subclass   = VGA
rh@lark2:~ % uname -a
FreeBSD lark2.hodges.org 11.2-RELEASE FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:32:14 UTC 2018     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
rh@lark2:~ % kldstat
Id Refs Address            Size     Name
 1   37 0xffffffff80200000 2036810  kernel
 2    1 0xffffffff8223a000 af98     aesni.ko
 3    1 0xffffffff82245000 1e0d8    geom_eli.ko
 4    1 0xffffffff82264000 381080   zfs.ko
 5    2 0xffffffff825e6000 a380     opensolaris.ko
 6    1 0xffffffff82f64000 e0810    radeonkms.ko
 7    1 0xffffffff83045000 3f8cc    drm2.ko
 8    4 0xffffffff83085000 1ed0     iicbus.ko
 9    1 0xffffffff83087000 e58      iic.ko
10    1 0xffffffff83088000 1570     iicbb.ko
X seems to quit at "(EE) open /dev/dri/card0: No such file or directory"
Code:
[    63.871] 
X.Org X Server 1.18.4
Release Date: 2016-07-19
[    63.871] X Protocol Version 11, Revision 0
[    63.871] Build Operating System: FreeBSD 11.2-RELEASE-p9 amd64 
[    63.871] Current Operating System: FreeBSD lark2.hodges.org 11.2-RELEASE FreeBSD 11.2-RELEASE #0
 r335510: Fri Jun 22 04:32:14 UTC 2018     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC
 amd64
[    63.871] Build Date: 07 February 2019  09:44:50AM
[    63.871]  
[    63.871] Current version of pixman: 0.34.0
[    63.871]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[    63.871] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    63.872] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Mar  4 13:20:24 2019
[    63.909] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[    63.909] (==) No Layout section.  Using the first Screen section.
[    63.909] (==) No screen section available. Using defaults.
[    63.909] (**) |-->Screen "Default Screen Section" (0)
[    63.909] (**) |   |-->Monitor "<default monitor>"
[    63.909] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[    63.910] (==) Automatically adding devices
[    63.910] (==) Automatically enabling devices
[    63.910] (==) Not automatically adding GPU devices
[    63.931] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    64.025] (==) FontPath set to:
        /usr/local/share/fonts/misc/,
        /usr/local/share/fonts/TTF/,
        /usr/local/share/fonts/OTF/,
        /usr/local/share/fonts/Type1/,
        /usr/local/share/fonts/100dpi/,
        /usr/local/share/fonts/75dpi/
[    64.025] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[    64.025] (II) The server relies on devd to provide the list of input devices.
        If no devices become available, reconfigure devd or disable AutoAddDevices.
[    64.025] (II) Loader magic: 0x816eb0
[    64.025] (II) Module ABI versions:
[    64.025]    X.Org ANSI C Emulation: 0.4
[    64.025]    X.Org Video Driver: 20.0
[    64.025]    X.Org XInput driver : 22.1
[    64.025]    X.Org Server Extension : 9.0
[    64.025] (--) PCI:*(0:0:1:0) 1002:9830:1043:8623 rev 0, Mem @ 0xc0000000/268435456, 0xd0000000/8388608, 0xfeb00000/262144, I/O @ 0x0000f000/256, BIOS @ 0x????????/65536
[    64.026] (II) LoadModule: "glx"
[    64.036] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[    64.175] (II) Module glx: vendor="X.Org Foundation"
[    64.175]    compiled for 1.18.4, module version = 1.0.0
[    64.175]    ABI class: X.Org Server Extension, version 9.0
[    64.175] (==) AIGLX enabled
[    64.175] (==) Matched ati as autoconfigured driver 0
[    64.175] (==) Matched modesetting as autoconfigured driver 1
[    64.175] (==) Matched scfb as autoconfigured driver 2
[    64.175] (==) Matched vesa as autoconfigured driver 3
[    64.175] (==) Assigned the driver to the xf86ConfigLayout
[    64.175] (II) LoadModule: "ati"
[    64.175] (II) Loading /usr/local/lib/xorg/modules/drivers/ati_drv.so
[    64.185] (II) Module ati: vendor="X.Org Foundation"
[    64.185]    compiled for 1.18.4, module version = 18.1.0
[    64.185]    Module class: X.Org Video Driver
[    64.185]    ABI class: X.Org Video Driver, version 20.0
[    64.187] (II) LoadModule: "radeon"
[    64.188] (II) Loading /usr/local/lib/xorg/modules/drivers/radeon_drv.so
[    64.239] (II) Module radeon: vendor="X.Org Foundation"
[    64.239]    compiled for 1.18.4, module version = 18.1.0
[    64.239]    Module class: X.Org Video Driver
[    64.239]    ABI class: X.Org Video Driver, version 20.0
[    64.239] (II) LoadModule: "modesetting"
[    64.239] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[    64.240] (II) Module modesetting: vendor="X.Org Foundation"
[    64.240]    compiled for 1.18.4, module version = 1.18.4
[    64.240]    Module class: X.Org Video Driver
[    64.240]    ABI class: X.Org Video Driver, version 20.0
[    64.240] (II) LoadModule: "scfb"
[    64.240] (II) Loading /usr/local/lib/xorg/modules/drivers/scfb_drv.so
[    64.251] (II) Module scfb: vendor="X.Org Foundation"
[    64.251]    compiled for 1.18.4, module version = 0.0.4
[    64.251]    ABI class: X.Org Video Driver, version 20.0
[    64.251] (II) LoadModule: "vesa"
[    64.251] (II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so
[    64.259] (II) Module vesa: vendor="X.Org Foundation"
[    64.259]    compiled for 1.18.4, module version = 2.4.0
[    64.259]    Module class: X.Org Video Driver
[    64.259]    ABI class: X.Org Video Driver, version 20.0
[    64.259] (II) RADEON: Driver for ATI/AMD Radeon chipsets:
        ATI Radeon Mobility X600 (M24), ATI FireMV 2400,
... (trimmed)
        ARUBA, TAHITI, PITCAIRN, VERDE, OLAND, HAINAN, BONAIRE, KABINI,
        MULLINS, KAVERI, HAWAII
[    64.274] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    64.274] (II) scfb: driver for wsdisplay framebuffer: scfb
[    64.274] (II) VESA: driver for VESA chipsets: vesa
[    64.274] (--) Using syscons driver with X support (version 2.0)
[    64.274] (--) using VT number 9

[    64.648] (II) [KMS] drm report modesetting isn't supported.
[    64.648] (EE) open /dev/dri/card0: No such file or directory
[    64.648] (WW) Falling back to old probe method for modesetting
[    64.648] (EE) open /dev/dri/card0: No such file or directory
[    64.648] (WW) Falling back to old probe method for scfb
[    64.648] scfb trace: probe start
[    64.648] (II) scfb(2): using default device
[    64.648] scfb trace: probe done
[    64.648] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    64.648] (EE) Screen 0 deleted because of no matching config section.
[    64.648] (II) UnloadModule: "radeon"
[    64.649] (EE) Screen 0 deleted because of no matching config section.
[    64.649] (II) UnloadModule: "modesetting"
[    64.649] (EE) 
Fatal server error:
[    64.649] (EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
[    64.649] (EE) 
[    64.649] (EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
[    64.649] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    64.649] (EE) 
[    64.649] (EE) Server terminated with error (1). Closing log file.
And there is nothing at /dev/dri.
Code:
rh@lark2:~ % ll /dev/dri
ls: /dev/dri: No such file or directory
While digging for information, I read that there was (is?) a problem with AMD integrated graphics and EFI. I believe that bsdinstall installed my zfs (mirrored, encrypted) with EFI.

Thanks for any help!
 
I've no experience with AMD drivers, but what you need is a kms driver for your APU.
You can install the metaport graphics/drm-kmod it has support for Kabini GPUs.

This driver requires the kernel sources and a portstree to be fetched before you can build it.
# svnlite co https://svn.freebsd.org/base/releng/11.2 /usr/src/
# portsnap fetch extract
# cd /usr/ports/graphics/drm-kmod
Build and install the driver...
# make install

Add the following line to /etc/rc.conf
kld_list="/boot/modules/amdgpu.ko"

If you have any driver related options in xorg.conf, remove them entirely.
Reboot.

If the driver doesn't work, replace amdgpu.ko with radeonkms.ko in the kld_list.
That is because there are Kabini driver files in the modern amdgpu driver and the legacy radeonkms.
Try ls /boot/modules | more to get an idea.
I can't test it, just try what works for you.

If UEFI is a problem as well, the bootcode can easily be changed.
Good luck.
 
It looks like I already have the latest drm-kmod.
Code:
root@lark2:/home/rh # cd /usr/ports/graphics/drm-kmod
root@lark2:/usr/ports/graphics/drm-kmod # make install
===>   drm-kmod-g20181126 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by drm-kmod-g20181126 for building
===>  Extracting for drm-kmod-g20181126
===>  Patching for drm-kmod-g20181126
===>  Configuring for drm-kmod-g20181126
===>  Staging for drm-kmod-g20181126
===>   drm-kmod-g20181126 depends on file: /boot/modules/drm.ko - found
===>   Generating temporary packing list
====> Compressing man pages (compress-man)
===>  Installing for drm-kmod-g20181126
===>  Checking if drm-kmod is already installed
===>   drm-kmod-g20181126 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of drm-kmod
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/drm-kmod
root@lark2:/usr/ports/graphics/drm-kmod # pkg install drm-kmod
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01    
Fetching packagesite.txz: 100%    6 MiB 519.3kB/s    00:13    
Processing entries: 100%
FreeBSD repository update completed. 32373 packages processed.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent version of packages are already installed
I put the amdgpu module in /etc/rc.conf and the module complained about missing firmware.
Code:
[drm] amdgpu kernel modesetting enabled.
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm] initializing kernel modesetting (KABINI 0x1002:0x9830 0x1043:0x8623 0x00).
[drm] register mmio base: 0xFEB00000
[drm] register mmio size: 262144
[drm] doorbell mmio base: 0xD0000000
[drm] doorbell mmio size: 8388608
[drm] PCI I/O BAR is not found.
[drm] probing mlw for device 1002:9830 = 0
[drm] BIOS signature incorrect 0 0
[drm] PCI I/O BAR is not found. Using MMIO to access ATOM BIOS
ATOM BIOS: AMD
[drm] GPU post is not needed
drmn0: VRAM: 256M 0x0000000000000000 - 0x000000000FFFFFFF (256M used)
drmn0: GTT: 1024M 0x0000000010000000 - 0x000000004FFFFFFF
[drm] Detected VRAM RAM=256M, BAR=256M
[drm] RAM width 128bits UNKNOWN
[TTM] Zone  kernel: Available graphics memory: 8204228 kiB
[TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[TTM] Initializing pool allocator
[drm] amdgpu: 256M of VRAM memory ready
[drm] amdgpu: 1024M of GTT memory ready.
i_size_write unimplemented
[drm] GART: num cpu pages 262144, num gpu pages 262144
[drm] PCIE GART of 1024M enabled (table at 0x0000000000040000).
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
[drm] amdgpu: irq initialized.
[drm] Internal thermal controller without fan control
[drm] amdgpu: dpm initialized
[drm] Connector DVI-D-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.DVI-D-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector VGA-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.VGA-1
[drm]   - kern.vt.fb.default_mode
[drm] AMDGPU Display Connectors
[drm] Connector 0:
[drm]   DVI-D-1
[drm]   HPD1
[drm]   DDC: 0x194c 0x194c 0x194d 0x194d 0x194e 0x194e 0x194f 0x194f
[drm]   Encoders:
[drm]     DFP1: INTERNAL_UNIPHY
[drm] Connector 1:
[drm]   HDMI-A-1
[drm]   HPD2
[drm]   DDC: 0x1950 0x1950 0x1951 0x1951 0x1952 0x1952 0x1953 0x1953
[drm]   Encoders:
[drm]     DFP2: INTERNAL_UNIPHY
[drm] Connector 2:
[drm]   VGA-1
[drm]   DDC: 0x1970 0x1970 0x1971 0x1971 0x1972 0x1972 0x1973 0x1973
[drm]   Encoders:
[drm]     CRT1: INTERNAL_KLDSCP_DAC1
radeon/kabini_pfp.bin: could not load firmware image, error 2
radeon/kabini_pfp.bin: could not load firmware image, error 2
radeon/kabini_me.bin: could not load firmware image, error 2
radeon/kabini_me.bin: could not load firmware image, error 2
radeon/kabini_ce.bin: could not load firmware image, error 2
radeon/kabini_ce.bin: could not load firmware image, error 2
radeon/kabini_mec.bin: could not load firmware image, error 2
radeon/kabini_mec.bin: could not load firmware image, error 2
radeon/kabini_rlc.bin: could not load firmware image, error 2
radeon/kabini_rlc.bin: could not load firmware image, error 2
drmn0: fence driver on ring 0 use gpu addr 0x0000000010000010, cpu addr 0x0xfffff80022a4a010
i_size_write unimplemented
drmn0: fence driver on ring 1 use gpu addr 0x0000000010000020, cpu addr 0x0xfffff80022a4a020
i_size_write unimplemented
drmn0: fence driver on ring 2 use gpu addr 0x0000000010000030, cpu addr 0x0xfffff80022a4a030
i_size_write unimplemented
drmn0: fence driver on ring 3 use gpu addr 0x0000000010000040, cpu addr 0x0xfffff80022a4a040
i_size_write unimplemented
drmn0: fence driver on ring 4 use gpu addr 0x0000000010000050, cpu addr 0x0xfffff80022a4a050
i_size_write unimplemented
drmn0: fence driver on ring 5 use gpu addr 0x0000000010000060, cpu addr 0x0xfffff80022a4a060
i_size_write unimplemented
drmn0: fence driver on ring 6 use gpu addr 0x0000000010000070, cpu addr 0x0xfffff80022a4a070
i_size_write unimplemented
drmn0: fence driver on ring 7 use gpu addr 0x0000000010000080, cpu addr 0x0xfffff80022a4a080
i_size_write unimplemented
drmn0: fence driver on ring 8 use gpu addr 0x0000000010000090, cpu addr 0x0xfffff80022a4a090
i_size_write unimplemented
radeon/kabini_sdma.bin: could not load firmware image, error 2
radeon/kabini_sdma.bin: could not load firmware image, error 2
radeon/kabini_sdma1.bin: could not load firmware image, error 2
radeon/kabini_sdma1.bin: could not load firmware image, error 2
drmn0: fence driver on ring 9 use gpu addr 0x00000000100000a0, cpu addr 0x0xfffff80022a4a0a0
i_size_write unimplemented
drmn0: fence driver on ring 10 use gpu addr 0x00000000100000b0, cpu addr 0x0xfffff80022a4a0b0
i_size_write unimplemented
radeon/kabini_uvd.bin: could not load firmware image, error 2
radeon/kabini_uvd.bin: could not load firmware image, error 2
[drm] Found UVD firmware Version: 1.64 Family ID: 9
drmn0: fence driver on ring 11 use gpu addr 0x000000000028cd30, cpu addr 0x0xfffff800b028cd30
i_size_write unimplemented
radeon/kabini_vce.bin: could not load firmware image, error 2
radeon/kabini_vce.bin: could not load firmware image, error 2
[drm] Found VCE firmware Version: 50.10 Binary ID: 2
drmn0: fence driver on ring 12 use gpu addr 0x00000000100000d0, cpu addr 0x0xfffff80022a4a0d0
i_size_write unimplemented
drmn0: fence driver on ring 13 use gpu addr 0x00000000100000e0, cpu addr 0x0xfffff80022a4a0e0
i_size_write unimplemented
[drm:gfx_v7_0_ring_test_ring] amdgpu: ring 0 test failed (scratch(0xC040)=0xCAFEDEAD)
[drm:amdgpu_init] hw_init of IP block <gfx_v7_0> failed -22
drmn0: amdgpu_init failed
[drm:uvd_v4_2_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v4_2_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v4_2_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v4_2_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v4_2_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v4_2_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v4_2_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v4_2_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v4_2_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v4_2_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v4_2_start] UVD not responding, giving up!!!
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 2
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 3
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 4
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 5
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 2
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 3
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 4
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 5
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 2
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 3
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 4
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 5
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 2
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 3
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 4
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 5
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 2
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 3
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 4
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 5
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 2
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 3
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 4
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[drm:dce_v8_0_set_pageflip_interrupt_state] invalid pageflip crtc 5
[drm:amdgpu_irq_disable_all] error disabling interrupt (-22)
[TTM] Finalizing pool allocator
[TTM] Zone  kernel: Used memory at exit: 0 kiB
[TTM] Zone   dma32: Used memory at exit: 0 kiB
[drm] amdgpu: ttm finalized
drmn0: Fatal error during GPU init
[drm] amdgpu: finishing device.
[TTM] Memory type 2 has not been initialized
device_attach: drmn0 attach returned 22
re0: link state changed to DOWN
re0: link state changed to UP
When I try startx, I get:
Code:
module_register: cannot register drmn from drm2.ko; already loaded from drm.ko
Module drmn failed to register: 17
KLD radeonkms.ko: depends on drmn - not available or version mismatch
linker_load_file: Unsupported file type
I will replace amdgpu with radeonkms in rc.conf and follow up in another post.

Thanks,
-Richard
 
My rc.conf now has kld_list="/boot/modules/radeonkms.ko". When the module loaded, the screen went blank for a long time. And now, startx gives me the basic X screen (three terminals and a clock). So I think things are going well, now.

The module still has a lot of complaints. Do I need to fix anything?
Code:
[drm] radeon kernel modesetting enabled.
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm] initializing kernel modesetting (KABINI 0x1002:0x9830 0x1043:0x8623 0x00).
[drm] register mmio base: 0xFEB00000
[drm] register mmio size: 262144
[drm] doorbell mmio base: 0xD0000000
[drm] doorbell mmio size: 8388608
[drm:radeon_device_init] Unable to find PCI I/O BAR
[drm:radeon_atombios_init] Unable to find PCI I/O BAR; using MMIO for ATOM IIO
ATOM BIOS: AMD
drmn0: VRAM: 256M 0x0000000000000000 - 0x000000000FFFFFFF (256M used)
drmn0: GTT: 2048M 0x0000000010000000 - 0x000000008FFFFFFF
[drm] Detected VRAM RAM=256M, BAR=256M
[drm] RAM width 128bits DDR
[TTM] Zone  kernel: Available graphics memory: 8204228 kiB
[TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[TTM] Initializing pool allocator
[drm] radeon: 256M of VRAM memory ready
[drm] radeon: 2048M of GTT memory ready.
[drm] Loading kabini Microcode
radeon/kabini_pfp.bin: could not load firmware image, error 2
radeon/kabini_pfp.bin: could not load firmware image, error 2
radeon/kabini_me.bin: could not load firmware image, error 2
radeon/kabini_me.bin: could not load firmware image, error 2
radeon/kabini_ce.bin: could not load firmware image, error 2
radeon/kabini_ce.bin: could not load firmware image, error 2
radeon/kabini_mec.bin: could not load firmware image, error 2
radeon/kabini_mec.bin: could not load firmware image, error 2
radeon/kabini_rlc.bin: could not load firmware image, error 2
radeon/kabini_rlc.bin: could not load firmware image, error 2
radeon/kabini_sdma.bin: could not load firmware image, error 2
radeon/kabini_sdma.bin: could not load firmware image, error 2
[drm] Internal thermal controller without fan control
[drm] radeon: dpm initialized
radeon/bonaire_uvd.bin: could not load firmware image, error 2
radeon/bonaire_uvd.bin: could not load firmware image, error 2
[drm] Found UVD firmware Version: 1.64 Family ID: 9
radeon/BONAIRE_vce.bin: could not load firmware image, error 2
radeon/BONAIRE_vce.bin: could not load firmware image, error 2
[drm] Found VCE firmware/feedback version 40.2.2 / 15!
[drm] GART: num cpu pages 524288, num gpu pages 524288
[drm] PCIE GART of 2048M enabled (table at 0x000000000030E000).
drmn0: WB enabled
drmn0: fence driver on ring 0 use gpu addr 0x0000000010000c00 and cpu addr 0x0xfffff80027ac3c00
drmn0: fence driver on ring 1 use gpu addr 0x0000000010000c04 and cpu addr 0x0xfffff80027ac3c04
drmn0: fence driver on ring 2 use gpu addr 0x0000000010000c08 and cpu addr 0x0xfffff80027ac3c08
drmn0: fence driver on ring 3 use gpu addr 0x0000000010000c0c and cpu addr 0x0xfffff80027ac3c0c
drmn0: fence driver on ring 4 use gpu addr 0x0000000010000c10 and cpu addr 0x0xfffff80027ac3c10
drmn0: fence driver on ring 5 use gpu addr 0x0000000000078d30 and cpu addr 0x0xfffff800c0078d30
drmn0: fence driver on ring 6 use gpu addr 0x0000000010000c18 and cpu addr 0x0xfffff80027ac3c18
drmn0: fence driver on ring 7 use gpu addr 0x0000000010000c1c and cpu addr 0x0xfffff80027ac3c1c
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
[drm] radeon: irq initialized.
[drm] ring test on 0 succeeded in 3 usecs
[drm] ring test on 1 succeeded in 3 usecs
[drm] ring test on 2 succeeded in 3 usecs
[drm] ring test on 3 succeeded in 4 usecs
[drm] ring test on 4 succeeded in 4 usecs
[drm:uvd_v1_0_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v1_0_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v1_0_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v1_0_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v1_0_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v1_0_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v1_0_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v1_0_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v1_0_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v1_0_start] UVD not responding, trying to reset the VCPU!!!
[drm:uvd_v1_0_start] UVD not responding, giving up!!!
drmn0: failed initializing UVD (-1).
[drm:vce_v1_0_start] VCE not responding, trying to reset the ECPU!!!
[drm:vce_v1_0_start] VCE not responding, trying to reset the ECPU!!!
[drm:vce_v1_0_start] VCE not responding, trying to reset the ECPU!!!
[drm:vce_v1_0_start] VCE not responding, trying to reset the ECPU!!!
[drm:vce_v1_0_start] VCE not responding, trying to reset the ECPU!!!
[drm:vce_v1_0_start] VCE not responding, trying to reset the ECPU!!!
[drm:vce_v1_0_start] VCE not responding, trying to reset the ECPU!!!
[drm:vce_v1_0_start] VCE not responding, trying to reset the ECPU!!!
[drm:vce_v1_0_start] VCE not responding, trying to reset the ECPU!!!
[drm:vce_v1_0_start] VCE not responding, trying to reset the ECPU!!!
[drm:vce_v1_0_start] VCE not responding, giving up!!!
drmn0: failed initializing VCE (-1).
[drm:cik_ib_test] radeon: fence wait timed out.
[drm:radeon_ib_ring_tests] radeon: failed testing IB on GFX ring (-60).
[drm:radeon_device_init] ib ring test failed (-60).
[drm] hw_i2c forced on, you may experience display detection problems!
[drm] Connector DVI-D-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.DVI-D-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector VGA-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.VGA-1
[drm]   - kern.vt.fb.default_mode
[drm] Radeon Display Connectors
[drm] Connector 0:
[drm]   DVI-D-1
[drm]   HPD1
[drm]   DDC: 0x6530 0x6530 0x6534 0x6534 0x6538 0x6538 0x653c 0x653c
[drm]   Encoders:
[drm]     DFP1: INTERNAL_UNIPHY
[drm] Connector 1:
[drm]   HDMI-A-1
[drm]   HPD2
[drm]   DDC: 0x6540 0x6540 0x6544 0x6544 0x6548 0x6548 0x654c 0x654c
[drm]   Encoders:
[drm]     DFP2: INTERNAL_UNIPHY
[drm] Connector 2:
[drm]   VGA-1
[drm]   DDC: 0x65c0 0x65c0 0x65c4 0x65c4 0x65c8 0x65c8 0x65cc 0x65cc
[drm]   Encoders:
[drm]     CRT1: INTERNAL_KLDSCP_DAC1
[drm] fb mappable at 0xC0722000
[drm] vram apper at 0xC0000000
[drm] size 7680000
[drm] fb depth is 24
[drm]    pitch is 6400
VT: Replacing driver "efifb" with new "fb".
start FB_INFO:
type=11 height=1200 width=1600 depth=32
cmsize=16 size=7680000
pbase=0xc0722000 vbase=0xfffff800c0722000
name=drmn0 flags=0x0 stride=6400 bpp=32
cmap[0]=0 cmap[1]=7f0000 cmap[2]=7f00 cmap[3]=c4a000
end FB_INFO
drmn0: fb0: radeondrmfb frame buffer device
[drm] Initialized radeon 2.49.0 20080528 for drmn0 on minor 0

Thanks,
-Richard
 
I missed your previous post , so I deleted my message ...
So I think things are going well, now.
Yes, if you see the x-clock , most things are going well now :)
Now you can e.g. install xfce4 and type startxfce4 ....
-----edit: ----
in kldstat on 1 of my machines I see something like:
radeonkmsfw_RS780_pfp.ko
radeonkmsfw_RS780_me.ko
radeonkmsfw_RS600_rlc.ko
... I sometimes unload radeonkms because gives me only better resolution but not necessarily better graphics
 
Hi,
I have had same issue but with INTEL card, so we could change the tittle as: "X fails with AMD / INTEL integrated graphics, "/dev/dri/card0: No such file or directory" :) !!!

laptop specs:
Code:
root@freebsd:~ # inxi -Fx
System:    Host: freebsd Kernel: FreeBSD 12.1-RELEASE-p6 amd64 bits: 64 compiler: clang v: 8.0.1 Console: tty 0
           OS: FreeBSD 12.1-RELEASE-p6
Machine:   Type: Notebook System: TOSHIBA product: SATELLITE L50-C v: PSKXEE-01200NEN serial: 9F157840C
           Mobo: FF50 model: 06F5 serial: QC030RBF3700988 BIOS: INSYDE v: 5.10 rev: 5.10 date: 07/30/2015
Battery:   ID-1: BAT0 charge: N/A condition: N/A/0.0 Wh model: Intel SR 1 SR Real Battery status: N/A
CPU:       Topology: Quad Core model: Intel Pentium N3700 bits: 64 type: MCP arch: N/A L2 cache: N/A
           features: lm nx pae sse sse2 sse3 ssse3 vmx
           Speed: 1600 MHz min/max: 480/1601 MHz Core speeds (MHz): No speed data found for 4 cores.
Graphics:  Device-1: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics driver: vgapci
           bus ID: 0:0:2.0
           Display: server: X.Org 1.20.8 driver: intel resolution: 1366x768~60Hz
           Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:     Device-1: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio driver: hdac
           bus ID: 0:0:27.0
Network:   Device-1: Intel Wireless 3160 driver: iwm bus ID: 0:1:0.0
           Device-2: Realtek RTL810xE PCI Express Fast Ethernet driver: re port: N/A bus ID: 0:2:0.0
           IF: re0 state: active speed: 100baseTX duplex: full-duplex mac: 2c:60:0c:de:d4:40
Drives:    Local Storage: total: 454.85 GiB used: 18.92 GiB (4.2%)
           ID-1: /dev/ada0 vendor: Samsung model: SSD 860 EVO 500GB RVT04B6Q size: 454.85 GiB
Partition: ID-1: / size: 447.49 GiB used: 18.92 GiB (4.2%) fs: ufs dev: /dev/ada0p2
Swap:      ID-1: swap-1 type: partition size: 3.76 GiB used: 0 KiB (0.0%) dev: /dev/ada0p3
Sensors:   Platform: No Freebsd support. Is a comparable sensors tool available?
Info:      Processes: 99 Uptime: 27m Memory: 7.88 GiB used: 3.61 GiB (45.8%) Init: init (BSD) Compilers: gcc: N/A clang: 8.0.1
           Shell: csh v: 6.20.00 inxi: 3.1.03
#
Solution
Code:
1) pkg install drm-kmod
2) Add extra modules on /etc/rc.conf:   (instead of /boot/loader.conf)

kld_list="linux linux64 cuse fuse  /boot/modules/i915kms.ko /boot/modules/amdgpu.ko acpi_video acpi_toshiba"

3) Correct default xorg.conf (it took vesa driver! ) adding /usr/local/etc/X11/xorg.conf.d/driver-intel.conf
Section "Device"
        Identifier  "Card0"
        Driver      "intel"
        #Driver      "modesetting"   (tested and works same resolution that Intel )
        BusID       "PCI:0:2:0"
EndSection

4) reboot

Thanks a lot
Diego
 
It looks like you are loading the wrong modules.
You just need to install drm-kmod then add "boot/modules/i915kms.ko" to your /etc/rc.conf.
intel driver for a radeon card??

As per grahamperrin's findings, you guys may try to experiment with kld_list="drm", while loading no "radeon" or "radeonkms" or "drm-current-kmod", nothing graphics related, just kld_list="drm".
 
intel driver for a radeon card??

As per grahamperrin's findings, you guys may try to experiment with kld_list="drm", while loading no "radeon" or "radeonkms" or "drm-current-kmod", nothing graphics related, just kld_list="drm".
All of this methods don't help. But I read many questions about it. And set in rc.conf => "amdgpu". After that I reconfigure xorg:
Xorg -configure
Then, new config I'll replace to /etc/X11. Amd driver reading... But then I have this error:
drm report modesetting isn't supported

How fix this problem?
 
Xorg -configure
Then, new config I'll replace to /etc/X11. Amd driver reading... But then I have this error:
Great, now remove all that again. You don't need it. Actually, remove that whole /etc/X11 directory. It doesn't belong there anyway.
 
Code:
Fatal server error:
[    26.846] (EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
Add a /usr/local/etc/X11/xorg.conf.d/driver-video.conf:
Code:
Section "Device"
        Identifier  "Card0"
        Driver      "modesetting"
        BusID       "PCI:0:2:0"
EndSection
Not sure if that BusID is correct for you. You might need to figure out the correct one for your system.

It seems you have x11-drivers/xf86-video-ati installed too, remove that one. You can probably remove x11-drivers/xf86-video-amdgpu too, or try setting the driver to radeon instead of modesetting.
 
Hi Xialtal ,

Your card RX560 is a Polaris variant :

Mine is a RXVega which is also a Polaris and it works fine with FBSD13.
I only installed 'drm-fbsd13-kmod' with the driver 'xf86-video-amdgpu' and nothing else , everything works out of the box, I didn't have to create any xorg file or anything else.
Hope it helps.

EDIT1:Forgot to say that the rc.conf contains 'kld_list="amdgpu'

EDIT2: Nope! RXVega it is not a Polaris it is ... Vega ... sorry
 
Back
Top