amdgpu and DRI problem

Good evening,
I recently installed FreeBSD for second time in my life, and I experienced trouble with DRI.
I can't find it anywhere, so I will ask here.
Is amdgpu_dri.so provided by any package or port? I've tried to launch linux-enemyterritory and I'm only able to run it in swrast mode because of this:
Code:
libGL error: MESA-LOADER: failed to retrieve device information
libGL error: unable to load driver: amdgpu_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: amdgpu
libGL error: pci id for fd 8: 1002:7340, driver (null)
pci id for fd 9: 1002:7340, driver (null)
libGL error: failed to create dri screen
libGL error: failed to load driver: radeonsi
Using 4/4/4 Color bits, 24 depth, 0 stencil display.
GL_RENDERER: llvmpipe (LLVM 7.0, 128 bits)
WARNNING: GL extensions string too long (5771), truncated to 4096
Initializing OpenGL extensions [...]
Similar problem occurred with wined3d:
Code:
libGL error: pci id for fd 12: 1002:7340, driver (null)
libGL error: No driver found
libGL error: failed to load driver: (null)
libGL error: pci id for fd 12: 1002:7340, driver (null)
pci id for fd 13: 1002:7340, driver (null)
libGL error: failed to create dri screen
libGL error: failed to load driver: radeonsi [...]
I'm using FreeBSD 13.0-CURRENT with latest drm-devel-kmod and xf86-video-amdgpu.
 
Last edited by a moderator:
I configured Xorg for DRI3, and I find out that 64bit libGL has no problem with 3d acceleration. But 32bit apps (while DRI3) now crashes amdgpu driver.
 
Hello, pan-te

how do you have setup your gpu?

The fast right way would be:

1. Install graphics/drm-kmod from ports
2. Write the entry (kld_list="amdgpu") in /etc/rc.conf
3. Add your $USER to the video group. ( pw groupmod video -M $USER)
4. Done
---
Extra:

x11-drivers/xf86-video-amdgpu is not strictly needed but also should work for you if you want to use it too.

4. Install x11-drivers/xf86-video-amdgpuxf86-video-amdgpu
5. Create an amdgpu.conf in /usr/local/share/X11/xorg.conf.d with (This is an example for an one card setup)

Code:
Section "Device"

    Identifier "Card0"

    Driver     "amdgpu"

EndSection

I recommend you as a newbie to take the releases (Unless you have to use it because you have a newer graphics card.), the -current images are experimental and some things can break fast from time to time. Also you need to maintain such a system from source.

BTW: For me wine32 is working fine also had no problem with linux stuff in the past.
 
Last edited by a moderator:
i think the probelm is that mantainer forgot to compile admgpu_dri in it , so you can compile it from port!
compile these package from port
mesa-dri
mesa-libs
 
amdgpu.dri.so gets shipped by x11-drivers/xf86-video-amdgpu via pkg and ports, sits in /usr/local/lib/xorg/modules/drivers and is working fine:

Code:
[    34.517] (II) LoadModule: "amdgpu"
[    34.517] (II) Loading /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so
[    34.564] (II) Module amdgpu: vendor="X.Org Foundation"
[    34.564]     compiled for 1.20.9, module version = 19.1.0
[    34.564]     Module class: X.Org Video Driver
[    34.564]     ABI class: X.Org Video Driver, version 24.1
[    34.564] (II) AMDGPU: Driver for AMD Radeon:
    All GPUs supported by the amdgpu kernel driver
 
Last edited by a moderator:
amdgpu.dri.so gets shipped by x11-drivers/xf86-video-amdgpu via pkg and ports, sits in /usr/local/lib/xorg/modules/drivers and is working fine:

Code:
[    34.517] (II) LoadModule: "amdgpu"
[    34.517] (II) Loading /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so
[    34.564] (II) Module amdgpu: vendor="X.Org Foundation"
[    34.564]     compiled for 1.20.9, module version = 19.1.0
[    34.564]     Module class: X.Org Video Driver
[    34.564]     ABI class: X.Org Video Driver, version 24.1
[    34.564] (II) AMDGPU: Driver for AMD Radeon:
    All GPUs supported by the amdgpu kernel driver
Upgrading system from source isn't painful. I decided for 13.0-CURRENT branch because of lacking support for NAVI14 GPUs.
With BSD-native, 64bit applications, I didn't experience any problems. All kernel modules related with amdgpu are loading flawlessly. Maybe with older GPU, which uses radeonkms, 3d acceleration with linux compatibility should work.
With propertly set up Xorg and amdgpu loaded:

zandronum x86_64 (linux compat mode):
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/sadlikd/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/sadlikd/.drirc: No such file or directory.
libGL error: MESA-LOADER: failed to retrieve device information
libGL: using driver amdgpu for 12
libGL: OpenDriver: trying /usr/lib64/dri/tls/amdgpu_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/amdgpu_dri.so
libGL: dlopen /usr/lib64/dri/amdgpu_dri.so failed (/usr/lib64/dri/amdgpu_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: amdgpu_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: amdgpu
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/sadlikd/.drirc: No such file or directory.
libGL error: pci id for fd 12: 1002:7340, driver (null)
libGL: OpenDriver: trying /usr/lib64/dri/tls/radeonsi_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/radeonsi_dri.so
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/sadlikd/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/sadlikd/.drirc: No such file or directory.
pci id for fd 13: 1002:7340, driver (null)
libGL error: failed to create dri screen
libGL error: failed to load driver: radeonsi
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/sadlikd/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/sadlikd/.drirc: No such file or directory.
Support for non power 2 textures enabled.
Occlusion query enabled.
Resolution: 1360 x 768

dhewm3 x86_64 (native):
Initializing OpenGL subsystem
libGL: Can't open configuration file /usr/local/etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/sadlikd/.drirc: No such file or directory.
libGL: using driver amdgpu for 14
libGL: Can't open configuration file /usr/local/etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/sadlikd/.drirc: No such file or directory.
libGL: pci id for fd 14: 1002:7340, driver radeonsi
libGL: MESA-LOADER: dlopen(/usr/local/lib/dri-devel/radeonsi_dri.so)
libGL: Can't open configuration file /usr/local/etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/sadlikd/.drirc: No such file or directory.
libGL: Can't open configuration file /usr/local/etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/sadlikd/.drirc: No such file or directory.
libGL: Can't open configuration file /usr/local/etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/sadlikd/.drirc: No such file or directory.
/usr/local/share/libdrm/amdgpu.ids version: 1.0.0
libGL: Using DRI3 for screen 0
Using 8 color bits, 24 depth, 8 stencil display
OpenGL vendor: AMD
OpenGL renderer: Radeon RX 5500 XT (NAVI14, DRM 3.35.0, 13.0-CURRENT, LLVM 10.0.1)
OpenGL version: 4.6 (Compatibility Profile) Mesa 21.0.0-devel (git-7d8d99ea129)
As You can see, dhewm3 works fine.
 
I'm using FreeBSD 13.0-CURRENT with latest drm-devel-kmod and xf86-video-amdgpu.
That seems to be the whole point - do not use 13.0 before it is ready. Use 12.2.

Another point is that DRM will be removed from base stating from v 13.x. In the future, the DRM should be installed from ports. Also, considering that, it could be a good practice to remove the DRM from 12.2 base by inserting WITHOUT_MODULES=drm drm2 into /etc/make.conf before building the kernel.
 
reinstall mesa-dri or compile mesa-dri
from port , /usr/ports/graphic/mesa-dri
before you do it xi recommend you update your ports to the last version,
compile xf86-video-amdgpu from port
 
Back
Top