FreeBSD 14.4 - Mesa issue with drm-kmod

I have just updated from 14.3 to 14.4 everything went well until I tried to run my preferred wm swayfx. I eventually discovered that I had an issue with MESA in that I am getting this error when running sway from a terminal

Code:
sway --unsupported-gpu
No such file or directory
amdgpu: DRM version is 3.49.0, but this driver is only compatible with 3.54.0 (kernel 6.6+) or later.
MESA: error: amdgpu: ac_query_gpu_info failed.
libEGL warning: egl: failed to create dri2 screen
00:00:00.053 [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen"
No such file or directory
amdgpu: DRM version is 3.49.0, but this driver is only compatible with 3.54.0 (kernel 6.6+) or later.
MESA: error: amdgpu: ac_query_gpu_info failed.
libEGL warning: egl: failed to create dri2 screen
00:00:00.056 [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen"
00:00:00.056 [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to load driver"
00:00:00.056 [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "eglInitialize"
00:00:00.056 [wlr] [render/egl.c:268] Failed to initialize EGL
00:00:00.056 [wlr] [render/egl.c:625] Failed to initialize EGL context
00:00:00.056 [wlr] [render/fx_renderer/fx_renderer.c:282] Could not initialize EGL
00:00:00.056 [sway/server.c:255] Failed to create renderer

It appears that recent Mesa updates (Mesa 24.3+ / 25.x) bumped the minimum required amdgpu kernel interface version for AMD GPUs to 3.54.0 (Linux 6.6).

On FreeBSD 14.x, the maximum supported kernel module version is graphics/drm-61-kmod (Linux 6.1 DRM), which reports DRM version 3.49.0. When Mesa runs, its ac_query_gpu_info check sees 3.49.0 instead of 3.54.0 and fails.

Any ideas how I resolve this, note that I build all my own packages using poudriere and rebuilt these as part of my update process.
 
toddgl maybe the issue is libdrm, there is now two versions, the one that was moved to mesa after 24.x and the old standalone. As far as I can tell, the standalone one is used by a lot of packages.

But in any case the possible solutions are:
  1. Revert mesa on 14.x
  2. Build drm-66-kmod for 14.x if linuxkpi allows it
 
Unfortunately cannot build drm-66-kmod as it gets ignored in poudriere as it tests for FB >= version 15.0

Not sure how I build a old version of mesa in poudriere and which one should I build?


Code:
Trimming IGNORED and blacklisted ports

[00:00:02] Ignoring graphics/drm-66-kmod | drm-66-kmod-6.6.25.1404000_10:
 
Unfortunately cannot build drm-66-kmod as it gets ignored in poudriere as it tests for FB >= version 15.0

Not sure how I build a old version of mesa in poudriere and which one should I build?


Code:
Trimming IGNORED and blacklisted ports

[00:00:02] Ignoring graphics/drm-66-kmod | drm-66-kmod-6.6.25.1404000_10:
Yeah, I've checked the makefile, it requires freebsd build 1500031, drm-66-kmod itself requires LINUX_KPI 60600 (kernel 6.6).

From a cursory check of the source tree, maybe the releng/14.4 version of linuxkpi has the necessary code (the only check I saw was a check on math.h), if you are feeling adventurous edit /usr/ports/graphics/drm-66-kmod/Makefile and replace 1500031 with 1404501 (the the latest kernel for 14.4).

In any case my suggestion is to open a bug for this, and if the above works indicate that doing the change may be an option instead of reverting mesa to a working version .
 
Why not upgrade to 15.1 instead? Why keep using a legacy version for a desktop install? If you want the latest graphics drivers, use the latest FreeBSD version.
 
Why not upgrade to 15.1 instead? Why keep using a legacy version for a desktop install? If you want the latest graphics drivers, use the latest FreeBSD version.
In this case, the issue is that 14.4 is supported, but the mesa port that is deployed for that version does not take into account that not all hardware is supported.

For reference, mesa 26.0.x is the highest version that will work with drm-61-kmod for amdgpu.

Edited to add, that otherwise I agree with your comment.
 
I have just encountered with this issue, preventing me from testing the new update of x11-wm/wayfire v0.11.0.

Code:
II 2026-07-29 02:51:17.468 - [src/main.cpp:410] Starting wayfire: 0.11.0-unknown (Jul 28 2026) branch unknown wlroots-0.20.2
II 2026-07-29 02:51:17.469 - [libseat] [libseat/libseat.c:77] Seat opened with backend 'seatd'
II 2026-07-29 02:51:17.469 - [libseat] [libseat/backend/seatd.c:218] Enabling seat
II 2026-07-29 02:51:17.469 - [backend/session/session.c:117] Successfully loaded libseat session
II 2026-07-29 02:51:17.475 - [backend/backend.c:248] Found 1 GPUs
II 2026-07-29 02:51:17.475 - [backend/drm/backend.c:225] Initializing DRM backend for /dev/dri/card0 (amdgpu)
II 2026-07-29 02:51:17.475 - [backend/drm/drm.c:312] Found 4 DRM CRTCs
II 2026-07-29 02:51:17.475 - [backend/drm/drm.c:270] Found 9 DRM planes
II 2026-07-29 02:51:17.571 - [render/egl.c:205] Supported EGL client extensions: EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_device EGL_EXT_explicit_device EGL_EXT_platform_wayland EGL_KHR_platform_wayland EGL_EXT_platform_x11 EGL_KHR_platform_x11 EGL_EXT_platform_xcb EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless
No such file or directory
amdgpu: DRM version is 3.49.0, but this driver is only compatible with 3.54.0 (kernel 6.6+) or later.
MESA: error: amdgpu: ac_query_gpu_info failed.
libEGL warning: egl: failed to create dri2 screen
EE 2026-07-29 02:51:17.595 - [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen"
No such file or directory
amdgpu: DRM version is 3.49.0, but this driver is only compatible with 3.54.0 (kernel 6.6+) or later.
MESA: error: amdgpu: ac_query_gpu_info failed.
libEGL warning: egl: failed to create dri2 screen
EE 2026-07-29 02:51:17.605 - [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen"
EE 2026-07-29 02:51:17.608 - [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to load driver"
EE 2026-07-29 02:51:17.608 - [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "eglInitialize"
EE 2026-07-29 02:51:17.608 - [render/egl.c:269] Failed to initialize EGL
EE 2026-07-29 02:51:17.608 - [render/egl.c:611] Failed to initialize EGL context
EE 2026-07-29 02:51:17.608 - [render/gles2/renderer.c:499] Could not initialize EGL
II 2026-07-29 02:51:17.608 - [render/vulkan/renderer.c:2595] The vulkan renderer is only experimental and not expected to be ready for daily use
II 2026-07-29 02:51:17.608 - [render/vulkan/renderer.c:2597] Run with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation to enable the validation layer
No such file or directory
amdgpu: DRM version is 3.49.0, but this driver is only compatible with 3.54.0 (kernel 6.6+) or later.
No such file or directory
amdgpu: DRM version is 3.49.0, but this driver is only compatible with 3.54.0 (kernel 6.6+) or later.
II 2026-07-29 02:51:17.620 - [render/vulkan/vulkan.c:253] Vulkan device: 'llvmpipe (LLVM 19.1.7, 256 bits)'
II 2026-07-29 02:51:17.620 - [render/vulkan/vulkan.c:254]   Device type: 'cpu'
II 2026-07-29 02:51:17.620 - [render/vulkan/vulkan.c:255]   Supported API version: 1.4.354
II 2026-07-29 02:51:17.620 - [render/vulkan/vulkan.c:256]   Driver version: 26.1.5
II 2026-07-29 02:51:17.620 - [render/vulkan/vulkan.c:344]   Driver name: llvmpipe (Mesa 26.1.5 (LLVM 19.1.7))
EE 2026-07-29 02:51:17.620 - [render/vulkan/renderer.c:2608] Could not match drm and vulkan device
EE 2026-07-29 02:51:17.620 - [render/wlr_renderer.c:279] Could not initialize renderer
EE 2026-07-29 02:51:17.620 - [src/main.cpp:455] Failed to create renderer
 
Back
Top