drm-61-kmod not compiling anymore?

I noticed that graphics/drm-61-kmod was updated in ports to 6.1.128 . However, it looks like it's a broken port to me. Running a simple doas make reinstall clean ends up with:

Code:
...
m.o i915_gem_shrinker.o i915_gem_stolen.o i915_gem_throttle.o i915_gem_tiling.o i915_gem_ttm.o i915_gem_ttm_move.o i915_gem_ttm_pm.o i915_gem_userptr.o i915_gem_wait.o i915_ioc32.o i915_debugfs.o i915_debugfs_params.o intel_display_debugfs.o intel_gt_debugfs.o intel_gt_engines_debugfs.o intel_gt_pm_debugfs.o intel_guc_debugfs.o intel_guc_log_debugfs.o intel_huc_debugfs.o intel_pipe_crc.o intel_sseu_debugfs.o intel_uc_debugfs.o intel_fbdev.o i915_gpu_error.o
:> export_syms
awk -f /usr/src/sys/conf/kmod_syms.awk i915kms.ko  export_syms | xargs -J% objcopy % i915kms.ko
objcopy --strip-debug i915kms.ko
===>  Staging for drm-61-kmod-6.1.128.1402000
===>   Generating temporary packing list
===> dmabuf (install)
install -T release -o root -g wheel -m 444   dmabuf.ko /usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> ttm (install)
install -T release -o root -g wheel -m 444   ttm.ko /usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> drm (install)
install -T release -o root -g wheel -m 444   drm.ko /usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> amd (install)
===> amd/amdgpu (install)
install -T release -o root -g wheel -m 444   amdgpu.ko /usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> radeon (install)
install -T release -o root -g wheel -m 444   radeonkms.ko /usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> i915 (install)
install -T release -o root -g wheel -m 444   i915kms.ko /usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
====> Compressing man pages (compress-man)
===>  Building packages for drm-61-kmod-6.1.128.1402000
===>   Building drm-61-kmod-6.1.128.1402000
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/drm-61-kmod
[16:22]fmc000@tu45b-freebsd /u/p/g/drm-61-kmod [1]>

The problem seems to be in linuxkpi_video.ko :

Code:
[16:21]fmc000@tu45b-freebsd /u/p/g/drm-61-kmod> doas make package
===>  Building packages for drm-61-kmod-6.1.128.1402000
===>   Building drm-61-kmod-6.1.128.1402000
pkg-static: Unable to access file /usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/linuxkpi_video.ko:No such file or directory
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/drm-61-kmod
[16:23]fmc000@tu45b-freebsd /u/p/g/drm-61-kmod [1]>

Anyone else with the same issue?
 
Yes, it does fail for me in poudriere amd64 14.2 too. However, I still use graphics/drm-515-kmod.

I opened up a PR, PR 284737.
Code:
===========================================================================
=======================<phase: stage          >============================
===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Staging for drm-61-kmod-6.1.128.1402000
===>   Generating temporary packing list
===> dmabuf (install)
install -T release -o root -g wheel -m 444   dmabuf.ko /wrkdirs/usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> ttm (install)
install -T release -o root -g wheel -m 444   ttm.ko /wrkdirs/usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> drm (install)
install -T release -o root -g wheel -m 444   drm.ko /wrkdirs/usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> amd (install)
===> amd/amdgpu (install)
install -T release -o root -g wheel -m 444   amdgpu.ko /wrkdirs/usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> radeon (install)
install -T release -o root -g wheel -m 444   radeonkms.ko /wrkdirs/usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> i915 (install)
install -T release -o root -g wheel -m 444   i915kms.ko /wrkdirs/usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
====> Compressing man pages (compress-man)
===========================================================================
=======================<phase: package        >============================
===== env: 'PKG_NOTES=build_timestamp ports_top_git_hash ports_top_checkout_unclean port_git_hash port_checkout_unclean built_by' 'PKG_NOTE_build_timestamp=2025-02-11T15:33:44+0000' 'PKG_NOTE_ports_top_git_hash=302ba582a' 'PKG_NOTE_ports_top_checkout_unclean=no' 'PKG_NOTE_port_git_hash=0fb561611' 'PKG_NOTE_port_checkout_unclean=no' 'PKG_NOTE_built_by=poudriere-git-3.4.2' NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Building packages for drm-61-kmod-6.1.128.1402000
===>   Building drm-61-kmod-6.1.128.1402000
pkg-static: Unable to access file /wrkdirs/usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/linuxkpi_video.ko:No such file or directory
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/drm-61-kmod
=>> Cleaning up wrkdir
===>  Cleaning for drm-61-kmod-6.1.128.1402000
build of graphics/drm-61-kmod | drm-61-kmod-6.1.128.1402000 ended at Tue Feb 11 18:38:03 +03 2025
build time: 00:04:19
!!! build failure encountered !!!
 
drm-61-kmod and drm-510-kmod are not supported anymore on FreeBSD 14.2 so, I recommend to stick with drm-515-kmod.
When drm-61-kmod got unsupported on 14.2? I never heard this, can you please show the source? Thanks. I don't use 6.1 because I don't like seeing errors (?) while my system loads the drm module 6.1 in vtty, it doesn't occur with 5.15 and i feel like it's stable.

It is fixed now by the way! Thanks.


Code:
===========================================================================
=======================<phase: stage          >============================
===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Staging for drm-61-kmod-6.1.128.1402000
===>   Generating temporary packing list
===> dmabuf (install)
install -T release -o root -g wheel -m 444   dmabuf.ko /wrkdirs/usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> ttm (install)
install -T release -o root -g wheel -m 444   ttm.ko /wrkdirs/usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> drm (install)
install -T release -o root -g wheel -m 444   drm.ko /wrkdirs/usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> amd (install)
===> amd/amdgpu (install)
install -T release -o root -g wheel -m 444   amdgpu.ko /wrkdirs/usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> radeon (install)
install -T release -o root -g wheel -m 444   radeonkms.ko /wrkdirs/usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
===> i915 (install)
install -T release -o root -g wheel -m 444   i915kms.ko /wrkdirs/usr/ports/graphics/drm-61-kmod/work/stage/boot/modules/
====> Compressing man pages (compress-man)
===========================================================================
=======================<phase: package        >============================
===== env: 'PKG_NOTES=build_timestamp ports_top_git_hash ports_top_checkout_unclean port_git_hash port_checkout_unclean built_by' 'PKG_NOTE_build_timestamp=2025-02-11T15:55:04+0000' 'PKG_NOTE_ports_top_git_hash=44fa9863b' 'PKG_NOTE_ports_top_checkout_unclean=no' 'PKG_NOTE_port_git_hash=44fa9863b' 'PKG_NOTE_port_checkout_unclean=no' 'PKG_NOTE_built_by=poudriere-git-3.4.2' NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Building packages for drm-61-kmod-6.1.128.1402000
===>   Building drm-61-kmod-6.1.128.1402000
===========================================================================
=>> Cleaning up wrkdir
===>  Cleaning for drm-61-kmod-6.1.128.1402000
build of graphics/drm-61-kmod | drm-61-kmod-6.1.128.1402000 ended at Tue Feb 11 18:55:18 +03 2025
build time: 00:00:13
 
drm-61-kmod and drm-510-kmod are not supported anymore on FreeBSD 14.2
Partially correct. 6.1 requires a minimal version of 1400508 and is thus supported on 1402000. Only 5.10 isn't, maximum version is 1401501.

Code:
.if ${OPSYS} == FreeBSD && !( ${OSVERSION} >= 1500008 || ( ${OSVERSION} >= 1400508 && ${OSVERSION} < 1500000 ))
IGNORE=		not supported on older than 14-STABLE 1400508, no kernel support
.endif

Code:
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1401501
IGNORE=		not supported on FreeBSD 14.2 and higher
.endif
IGNORE_FreeBSD_15=	not supported anymore
 
graphics/drm-61-kmod: Fix package (or github commit) probably is the cause relief: that is the commit done just after the version update.
Commit message:
Code:
We don't ship linuxkpi_video.ko anymore but use the one from base.

Fixes:        9d80f2d792fd ("graphics/drm-61-kmod: Update to v6.1.128")
PR:        284737

Try refreshing your source code or just delete the reference /%%KMODDIR%%/linuxkpi_video.ko as stated in the diff.
 
When drm-61-kmod got unsupported on 14.2? I never heard this, can you please show the source?
I got the messages when I was building the nvidia-driver from source that both nvidia-drm-61-kmod, and nvidia-drm-510-kmod are not supported, and I should switch to the nvidia-515-drm-kmod, but like SirDice said, it is partially true.
 
I got the messages when I was building the nvidia-driver from source that both nvidia-drm-61-kmod, and nvidia-drm-510-kmod are not supported, and I should switch to the nvidia-515-drm-kmod, but like SirDice said, it is partially true.
I couldn't saw a mention about it in pkg-message files of the nvidia drm ports, btw, I never used nvidia so I don't know the situation in nvidia drm ports.
 
I got the messages when I was building the nvidia-driver from source that both nvidia-drm-61-kmod, and nvidia-drm-510-kmod are not supported, and I should switch to the nvidia-515-drm-kmod, but like SirDice said, it is partially true.
I don't know any commits to restrict graphics/nvidia-drm-61-kmod to be unsupported.

I'm running x11/nvidia-driver 565.77 with graphics/nvidia-drm-61-kmod (by overriding version) on Quadro P1000 (notebook), stable/14 at commit 51b3a9dacfeec79759fa497d9fe8e87dde2c45be, amd64.

Not yet tried builds with latest graphics/drm-61-kmod (as a dependency of graphics/nvidia-drm-61-kmod) as my poudriere jail just finished builds for prior to the commit.
 
The update of drm-61-kmod should be build from ports on FreeBSD 1.42 or it will be in kmod repos, please?
Be patient for kmod repo to finish build for the update.
The time it finishes would be depending on the load of build servers and possibly depends on official repo for dependencies to finish. Possibly delays a week or longer after commit. Sometime soon after commit, though. It depends.

If pkgs to be available just the moment the commit becomes visible, ports repo should be completely separated into for committers only and for any others. And let public (non-committers-only) repo to be updated just the time corresponding pkg is built for ALL NON-RESTRICTED-TIER1-ARCHS.
I think it's nonsense. Being patient for builds to be finished would be better.
 
I'm running x11/nvidia-driver 565.77 with graphics/nvidia-drm-61-kmod (by overriding version) on Quadro P1000 (notebook), stable/14 at commit 51b3a9dacfeec79759fa497d9fe8e87dde2c45be, amd64.
Yesterday I build nvidia-drm-61-kmod with a checksum error so, the build failed.
After going into /usr/ports/graphics/nvidia-drm-61-kmod, typing in make makesum as root, and building it again, it worked.
Is there a difference performance wise between nvidia-drm-515-kmod and nvidia-drm-61-kmod?

While checking the Makefile of nvidia-drm-kmod this line seems to apply to my system (14.2-RELEASE):
. elif ${OSVERSION} >= 1400508
RUN_DEPENDS+= ${KMODDIR}/nvidia-drm.ko:graphics/nvidia-drm-61-kmod
. endif

It looks like nvidia-drm-kmod helps to pick up an appropriate kmod module depending on the OSVERSION in use.
So, why is nvidia-drm-515-kmod there, but the only one not picked up by nvidia-drm-kmods Makefile?
 
Yesterday I build nvidia-drm-61-kmod with a checksum error so, the build failed.
After going into /usr/ports/graphics/nvidia-drm-61-kmod, typing in make makesum as root, and building it again, it worked.
Is there a difference performance wise between nvidia-drm-515-kmod and nvidia-drm-61-kmod?

While checking the Makefile of nvidia-drm-kmod this line seems to apply to my system (14.2-RELEASE):
. elif ${OSVERSION} >= 1400508
RUN_DEPENDS+= ${KMODDIR}/nvidia-drm.ko:graphics/nvidia-drm-61-kmod
. endif

It looks like nvidia-drm-kmod helps to pick up an appropriate kmod module depending on the OSVERSION in use.
So, why is nvidia-drm-515-kmod there, but the only one not picked up by nvidia-drm-kmods Makefile?
OSVERSION 1400508 (precisely, between 1400500 through 1400599 theoretically) means stable/14 after 14.0-Release and before 14.1-Release.
As OSVERSION for stable branches starts current Release (1400000 for 14.0, 1401000 for 14.1 and 1402000 for 14.2) + 500.
So 14.0 was defaulted with graphics/nvidia-drm-515-kmod, while 14.1 and later (including main [aka -Current]) is defaulted with graphics/nvidia-drm-61-kmod. This logic matches with graphics/drm-kmod.

And if you want to override version for x11/nvidia-driver (and x11/linux-nvidia-libs, too), you need to specify DISTVERSION and disable checksum with defining NO_CHECKSUM (or re-create distinfo as you did).

FYI: I have
Code:
NVIDIA_OVERRIDE_VERSION= 565.77

.if ${.CURDIR:M/usr/ports/x11/nvidia-driver} && defined (NVIDIA_OVERRIDE_VERSION)
  DISTVERSION=    ${NVIDIA_OVERRIDE_VERSION}
  NO_CHECKSUM=    YES
.endif

.if ${.CURDIR:M/usr/ports/x11/linux-nvidia-libs} && defined (NVIDIA_OVERRIDE_VERSION)
  DISTVERSION=    ${NVIDIA_OVERRIDE_VERSION}
  NO_CHECKSUM=    YES
.endif

.if ${.CURDIR:M/usr/ports/graphics/nvidia-drm-*-kmod} && defined (NVIDIA_OVERRIDE_VERSION)
  DISTVERSION=    ${NVIDIA_OVERRIDE_VERSION}
  NO_CHECKSUM=    YES
.endif

.if ${.CURDIR:M/usr/ports/graphics/nvidia-drm-kmod} && defined (NVIDIA_OVERRIDE_VERSION)
  DISTVERSION=    ${NVIDIA_OVERRIDE_VERSION}
  NO_CHECKSUM=    YES
.endif
in my /etc/make.conf. This works fine for x11/nvidia-driver and x11/linux-nvidia-libs.

But these are not sufficient for graphics/nvidia-drm*-kmod ports.
You need to edit /usr/ports/x11/nvidia-driver/Makefile.version to match the version you want. Not sure why it is needed for me and Austin (the maintainer of graphics/nvidia-drm*-kmod), though.
I intentionally keep the above for the time the cause is pointed.
 
Did build it from ports without any errors
Code:
Feb 12 16:02:02 Testsystem pkg-static[4412]: drm-61-kmod-6.1.92.1402000_3 deinstalled
Feb 12 16:02:04 Testsystem pkg-static[4473]: drm-61-kmod-6.1.128.1402000 installed

Restarted and everything is OK.
 
Did build it from ports without any errors
Code:
Feb 12 16:02:02 Testsystem pkg-static[4412]: drm-61-kmod-6.1.92.1402000_3 deinstalled
Feb 12 16:02:04 Testsystem pkg-static[4473]: drm-61-kmod-6.1.128.1402000 installed

Restarted and everything is OK.
You likely have the commit that fixed the issue already. That didn't bump portrevision.
 
But these are not sufficient for graphics/nvidia-drm*-kmod ports.
You need to edit /usr/ports/x11/nvidia-driver/Makefile.version to match the version you want. Not sure why it is needed for me and Austin (the maintainer of graphics/nvidia-drm*-kmod), though.
I intentionally keep the above for the time the cause is pointed.

Interesting, I am still getting familiar with make so, I was not aware of such a method to override the nvidia version inside /etc/make.conf.
As for the nvidia version in x11/nvidia-driver, can I use sed inside /etc/make.conf to change the nvidia version in Makefile.version ?
 
As for the nvidia version in x11/nvidia-driver, can I use sed inside /etc/make.conf to change the nvidia version in Makefile.version ?
As the syntax of /etc/make.conf is the same as usual makefile, it would be technically possible.

But to edit /usr/ports/x11/nvidia-driver/Makefile.version through /etc/make.conf would require to include additional target and dependencies in it. And doing so is discouraged in make.conf(5) manpage.

The relevant part is:
Code:
The  file  make.conf  uses  the    standard  makefile  syntax.   However,
make.conf  should  not  specify    any dependencies to make(1).  Instead,
make.conf is to set make(1) variables that control the actions of other

And note that /etc/make.conf would be read everytime make(1) is invoked (directly or indirectly / recursively).
 
Since this may still affect some people: you may need to update /usr/src/ and bring your ports to the latest version on 14.2, then things will compile fine.

I too was fighting with getting it to compile until everything was back at the latest commit on both - source and ports.
 
Back
Top