Bug 287069 - FreeBSD-14.3-BETA4 loading i915 kernel module fails
Summary: FreeBSD-14.3-BETA4 loading i915 kernel module fails
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 14.3-STABLE
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-25 16:54 UTC by Juan
Modified: 2025-06-13 17:01 UTC (History)
5 users (show)

See Also:


Attachments
/var/log/messages (49.08 KB, text/plain)
2025-05-25 16:54 UTC, Juan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juan 2025-05-25 16:54:56 UTC
Created attachment 260707 [details]
/var/log/messages

After a fresh install from a FreeBSD-14.3-BETA4-amd64-memstick.img,
loading the i915 module results in:

May 25 01:38:59 kiwi kernel: link_elf_obj: symbol linux_kfree_async undefined
May 25 01:38:59 kiwi kernel: linker_load_file: /boot/modules/dmabuf.ko - unsupported file type
May 25 01:38:59 kiwi kernel: KLD drm.ko: depends on dmabuf - not available or version mismatch
May 25 01:38:59 kiwi kernel: linker_load_file: /boot/modules/drm.ko - unsupported file type
May 25 01:38:59 kiwi kernel: KLD i915kms.ko: depends on drmn - not available or version mismatch
May 25 01:38:59 kiwi kernel: linker_load_file: /boot/modules/i915kms.ko - unsupported file type
Comment 1 Marek Zarychta 2025-05-25 17:27:28 UTC
Please try adding the repository for 14.3, it should solve the issue
https://lists.freebsd.org/archives/freebsd-stable/2025-May/002830.html
Comment 2 Juan 2025-05-25 19:10:40 UTC
Added: 

FreeBSD-kmods: {
	url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_latest",
	mirror_type: "srv",
	signature_type: "fingerprints",
	fingerprints: "/usr/share/keys/pkg",
	enabled: yes
}

to /usr/local/etc/pkg/repos/kmods.conf, then:

   # pkg update
   # pkg upgrade

no updated packages were reported, so:

   # pkg remove drm_kmod
   # pkg autoremove
   # pkg install drm_kmod
   # kldins i915kms

same message...
Comment 3 Eric 2025-06-03 16:22:06 UTC
(In reply to Juan from comment #2)

You'll likely need:
[1-0] # pkg query -x  '[%R]\t(%a)  %n %v' '^drm(-|-515-|-61-)kmod'
[FreeBSD-kmods] (1)  drm-61-kmod 6.1.128.1403501_4
[FreeBSD]       (0)  drm-kmod 20250428
[2-0] #

In my experience, using both 
- FreeBSD
- FreeBSD-kmods

a two-step upgrade process works:
# pkg upgrade -r FreeBSD
# pkg upgrade -r FreeBSD-kmods

Your specific steps used could be modified as:
# pkg install drm-kmod
# pkg upgrade -r FreeBSD-kmods

See also:
https://forums.freebsd.org/threads/possible-solution-to-the-drm-kmod-kernel-mismatch-after-upgrade-from-bapt.96058/page-2#post-684836
https://forums.freebsd.org/threads/possible-solution-to-the-drm-kmod-kernel-mismatch-after-upgrade-from-bapt.96058/page-2#post-684777
Comment 4 Eric 2025-06-03 16:35:08 UTC
(In reply to Eric from comment #3)

When having advanced to 14.3-RC1, that'll likely be:
[FreeBSD-kmods] drm-61-kmod-6.1.128.1403000_4

For the FreeBSD-kmods repository you may need to switch to using:
url: pkg+https://pkg.freebsd.org/${ABI}/kmods_latest_${VERSION_MINOR},
Comment 5 Graham Perrin 2025-06-08 07:54:25 UTC
(In reply to Marek Zarychta from comment #1)

Addition is no longer necessary, the FreeBSD-kmods repository is present in 14.3-RELEASE.

<https://github.com/freebsd/freebsd-src/commit/a47542f7151160cb2d9606b4eb91d7d3fb555e92>
Comment 6 Doug White 2025-06-10 03:23:18 UTC
bz@ changed linuxkpi in this commit, staticizing linux_kfree_async:

https://cgit.freebsd.org/src/commit/sys/compat/linuxkpi/common/src/linux_slab.c?h=stable/14&id=ebe210ca703bd584274396b2c0fa1694750f05c1

Anything using the LinuxKPI slab allocator will need to be rebuilt for 14.3. This includes out-of-tree graphics drivers like nvidia.
Comment 7 Paul Ivanov 2025-06-12 08:36:15 UTC
(In reply to Eric from comment #3)
> Your specific steps used could be modified as:
> # pkg install drm-kmod
> # pkg upgrade -r FreeBSD-kmods

Thank you, Eric, this did the trick for me on a recently upgraded 14.2 -> 14.3 machine that had been spitting out 

link_elf_obj: symbol linux_kfree_async undefined
linker_load_file: /boot/modules/dmabuf.ko - unsupported file type
KLD drm.ko: depends on dmabuf - not available or version mismatch
linker_load_file: /boot/modules/drm.ko - unsupported file type
KLD i915kms.ko: depends on drmn - not available or version mismatch
linker_load_file: /boot/modules/i915kms.ko - unsupported file type

when trying to load i915kms, now I'm back in business and, for example, backlight works again.
Comment 8 Pavneet Arora 2025-06-13 17:01:17 UTC
And for me, as I suffered the same error this morning on one of may laptops also in upgrading from 14.2 to 14.3.

Curiously, the other laptop did exhibit the same symptoms even though they are identical models of a similar vintage:

$ pkg query -x  '[%R]\t(%a)  %n %v' '^drm(-|-515-|-61-)kmod'
[FreeBSD-kmods] (0)  drm-515-kmod 5.15.160.1403000_4