Trying to run KDE 6 Plasma with Wayland....

Can you edit post #226,adding a "line spacing" between a "root@fourteen-pkgbase" and the other ? thanks.

I usually refrain from altering records, in this case I created separate code blocks and faked the appearance of command prompts at the end of each block.
 
install textproc/gsed from packages, bro, then the patches for the nvidia driver will get applied correctly... ?

Just read your own error messages, the gsed sources failed to download!

Istantanea_2024-08-07_02-14-13.png
 
This is the original file to patch :

View attachment 19917

This is how the file looks after that I have applied the patch :

View attachment 19918

and this is the error I get :

View attachment 19919
The patched file /usr/ports/graphics/nvidia-drm-61-kmod/files/patch-nvidia-drm-conftest.h should look like this.

C:
--- nvidia-drm-conftest.h.orig    2024-02-22 01:03:15 UTC
+++ nvidia-drm-conftest.h
@@ -85,7 +85,11 @@
 
 /* For nv_drm_gem_prime_force_fence_signal */
 #ifndef spin_is_locked
+#if ((__FreeBSD_version >= 1500000) && (__FreeBSD_version < 1500018)) || (__FreeBSD_version < 1401501)
 #define spin_is_locked(lock) mtx_owned(lock.m)
+#else
+#define spin_is_locked(lock) mtx_owned(lock)
+#endif
 #endif
 
 #ifndef rwsem_is_locked
 
The patched file /usr/ports/graphics/nvidia-drm-61-kmod/files/patch-nvidia-drm-conftest.h should look like this.

C:
--- nvidia-drm-conftest.h.orig    2024-02-22 01:03:15 UTC
+++ nvidia-drm-conftest.h
@@ -85,7 +85,11 @@
 
 /* For nv_drm_gem_prime_force_fence_signal */
 #ifndef spin_is_locked
+#if ((__FreeBSD_version >= 1500000) && (__FreeBSD_version < 1500018)) || (__FreeBSD_version < 1401501)
 #define spin_is_locked(lock) mtx_owned(lock.m)
+#else
+#define spin_is_locked(lock) mtx_owned(lock)
+#endif
 #endif
 
 #ifndef rwsem_is_locked
Code:
root@marietto:/usr/ports/graphics/nvidia-drm-61-kmod # make

===>  Patching for nvidia-drm-61-kmod-560.28.03_1

===>  Applying FreeBSD patches for nvidia-drm-61-kmod-560.28.03_1 from /usr/ports/graphics/nvidia-drm-61-kmod/files

patch: **** malformed patch at line 12: #endif

===>  FAILED Applying FreeBSD patch-nvidia-drm-conftest.h_

===> Cleanly applied FreeBSD patch(es)  patch-nvidia-drm-conftest.h

===> FAILED to apply cleanly FreeBSD patch(es)  patch-nvidia-drm-conftest.h_

*** Error code 1

ohhh it patches even the patch file that I have renamed,this one : patch-nvidia-drm-conftest.h_ ; it shouldn't. This should not happen. I have renamed it for a reason.

Anyway :

Code:
root@marietto:/usr/ports/graphics/nvidia-drm-61-kmod/files # mv patch-nvidia-drm-conftest.h_ patch-nvidia-drm-conftest.no

root@marietto:/usr/ports/graphics/nvidia-drm-61-kmod # make install

===>  Patching for nvidia-drm-61-kmod-560.28.03_1

===>  Applying FreeBSD patches for nvidia-drm-61-kmod-560.28.03_1 from /usr/ports/graphics/nvidia-drm-61-kmod/files

Ignoring previously applied (or reversed) patch.

1 out of 1 hunks ignored--saving rejects to nvidia-drm-conftest.h.rej

===>  FAILED Applying FreeBSD patch-nvidia-drm-conftest.h

===> FAILED to apply cleanly FreeBSD patch(es)  patch-nvidia-drm-conftest.h

*** Error code 1

UPDATE :

Nothing to do :
Code:
root@marietto:/usr/ports/graphics/nvidia-drm-61-kmod/files # mv *.no ..

root@marietto:/usr/ports/graphics/nvidia-drm-61-kmod # make clean

===>  Cleaning for nvidia-drm-61-kmod-560.28.03_1

root@marietto:/usr/ports/graphics/nvidia-drm-61-kmod # make

===>  License NVIDIA accepted by the user

===>   nvidia-drm-61-kmod-560.28.03_1 depends on file: /usr/local/sbin/pkg - found

===> Fetching all distfiles required by nvidia-drm-61-kmod-560.28.03_1 for building

===>  Extracting for nvidia-drm-61-kmod-560.28.03_1

=> SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-560.28.03.tar.xz.

=> SHA256 Checksum OK for freebsd-drm-kmod-drm_v6.1.92_0_GH0.tar.gz.

===>  Patching for nvidia-drm-61-kmod-560.28.03_1

===>  Applying FreeBSD patches for nvidia-drm-61-kmod-560.28.03_1 from /usr/ports/graphics/nvidia-drm-61-kmod/files

Ignoring previously applied (or reversed) patch.

3 out of 3 hunks ignored--saving rejects to nvidia-drm-freebsd-lkpi.c.rej

===>  FAILED Applying FreeBSD patch-nvidia-drm-freebsd-lkpi.c

===> Cleanly applied FreeBSD patch(es)  patch-nvidia-drm-conftest.h

===> FAILED to apply cleanly FreeBSD patch(es)  patch-nvidia-drm-freebsd-lkpi.c

*** Error code 1
 
I see that I should apply also this patch :


okkey...
It is the one I've pointed as D45400.
But latest main branch of ports tree already has it. If not, it means your ports tree is older than the point it landed.

And another thing to mention for patches in files/ directory.
Basically, ports framework attemps to apply ALL PATCHES THERE.
The (by default) exceptions are
  • patches with its filename starting with extra-
  • patches with its filenames ending with .orig
and all others are blindly applied.
So renaming
/usr/ports/graphics/nvidia-drm-61-kmod/files/patch-nvidia-drm-conftest.h
to
/usr/ports/graphics/nvidia-drm-61-kmod/files/patch-nvidia-drm-conftest.h_
and regenerate
/usr/ports/graphics/nvidia-drm-61-kmod/files/patch-nvidia-drm-conftest.h
is a bad idea. It is promised to fail for the one attempted later.

Some more insights, includes prediction from my experiences.

Historically, patch(1) keeps original (unpatched) file as fname.orig (when the original filename was fname). And applying patches uploaded on Bugzilla (or Phablicator) is a common thing. So attempting to apply patches under files/ directory named *.orig would be considered hazardous.

And for names starting with extra-, this is reserved for coditionally applicable patches. Each ports Makefile is responsible to handle it for cases it should be applied.
 
Should I patch files graphics/nvidia-drm-kmod/Makefile and graphics/nvidia-drm-kmod/Makefile.common ? I see that mine are different from the ones showed here :


my Makefile :

Code:
PORTNAME=       nvidia-drm-61-kmod
PORTREVISION=   1
CATEGORIES=     graphics

BUILD_DEPENDS+= ${KMODDIR}/drm.ko:graphics/drm-61-kmod
RUN_DEPENDS+=   ${KMODDIR}/drm.ko:graphics/drm-61-kmod
CONFLICTS_INSTALL=      nvidia-drm-510-kmod nvidia-drm-515-kmod

.include "${.CURDIR}/../drm-61-kmod/Makefile.version"
.include "${.CURDIR}/../nvidia-drm-kmod/Makefile.common"

.include <bsd.port.mk>

patched Makefile should be like this :

Code:
PORTNAME=    nvidia-drm-kmod
PORTVERSION=    ${NVIDIA_DISTVERSION}
CATEGORIES=    graphics kld

MAINTAINER=    ashafer@badland.io
COMMENT=    NVIDIA DRM Kernel Module
WWW=        https://www.nvidia.com/object/unix.html

USES=        metaport

.include "${.CURDIR}/../../x11/nvidia-driver/Makefile.version"
.include <bsd.port.pre.mk>

.if ${OPSYS} != FreeBSD
IGNORE=         not supported on anything but FreeBSD (missing linuxkpi functionality)
.else
.  if ${OSVERSION} >= 1302000 && ${OSVERSION} < 1400097
RUN_DEPENDS+=  ${KMODDIR}/nvidia-drm.ko:graphics/nvidia-drm-510-kmod
.  elif ${OSVERSION} >= 1400097 && (${ARCH} == i386 || ${ARCH} == aarch64)
RUN_DEPENDS+=  ${KMODDIR}/nvidia-drm.ko:graphics/nvidia-drm-510-kmod
.  elif ${OSVERSION} >= 1400097 && ${OSVERSION} < 1400508
RUN_DEPENDS+=  ${KMODDIR}/nvidia-drm.ko:graphics/nvidia-drm-515-kmod
.  elif ${OSVERSION} >= 1400508
RUN_DEPENDS+=  ${KMODDIR}/nvidia-drm.ko:graphics/nvidia-drm-61-kmod
.  endif
.endif

.include <bsd.port.post.mk>

I don't even have any Makefile.common.
 
This is the error that I'm getting now,after having applied / created the patches to Makefile and Makefile.common :

Code:
root@marietto:/usr/ports/graphics/nvidia-drm-61-kmod # make

===>  License NA accepted by the user
===>   nvidia-drm-kmod-560.28.03 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by nvidia-drm-kmod-560.28.03 for building
===>  Extracting for nvidia-drm-kmod-560.28.03
===>  Patching for nvidia-drm-kmod-560.28.03
===>  Applying FreeBSD patches for nvidia-drm-kmod-560.28.03 from /usr/ports/graphics/nvidia-drm-61-kmod/files
patch: **** can't cd to /usr/ports/graphics/nvidia-drm-61-kmod/work/nvidia-drm-kmod-560.28.03: No such file or directory
===>  FAILED Applying FreeBSD patch-nvidia-drm-conftest.h
===> FAILED to apply cleanly FreeBSD patch(es)  patch-nvidia-drm-conftest.h
*** Error code 1
 
Should I patch files graphics/nvidia-drm-kmod/Makefile and graphics/nvidia-drm-kmod/Makefile.common ? I see that mine are different from the ones showed here :


my Makefile :

Code:
PORTNAME=       nvidia-drm-61-kmod
PORTREVISION=   1
CATEGORIES=     graphics

BUILD_DEPENDS+= ${KMODDIR}/drm.ko:graphics/drm-61-kmod
RUN_DEPENDS+=   ${KMODDIR}/drm.ko:graphics/drm-61-kmod
CONFLICTS_INSTALL=      nvidia-drm-510-kmod nvidia-drm-515-kmod

.include "${.CURDIR}/../drm-61-kmod/Makefile.version"
.include "${.CURDIR}/../nvidia-drm-kmod/Makefile.common"

.include <bsd.port.mk>

patched Makefile should be like this :

Code:
PORTNAME=    nvidia-drm-kmod
PORTVERSION=    ${NVIDIA_DISTVERSION}
CATEGORIES=    graphics kld

MAINTAINER=    ashafer@badland.io
COMMENT=    NVIDIA DRM Kernel Module
WWW=        https://www.nvidia.com/object/unix.html

USES=        metaport

.include "${.CURDIR}/../../x11/nvidia-driver/Makefile.version"
.include <bsd.port.pre.mk>

.if ${OPSYS} != FreeBSD
IGNORE=         not supported on anything but FreeBSD (missing linuxkpi functionality)
.else
.  if ${OSVERSION} >= 1302000 && ${OSVERSION} < 1400097
RUN_DEPENDS+=  ${KMODDIR}/nvidia-drm.ko:graphics/nvidia-drm-510-kmod
.  elif ${OSVERSION} >= 1400097 && (${ARCH} == i386 || ${ARCH} == aarch64)
RUN_DEPENDS+=  ${KMODDIR}/nvidia-drm.ko:graphics/nvidia-drm-510-kmod
.  elif ${OSVERSION} >= 1400097 && ${OSVERSION} < 1400508
RUN_DEPENDS+=  ${KMODDIR}/nvidia-drm.ko:graphics/nvidia-drm-515-kmod
.  elif ${OSVERSION} >= 1400508
RUN_DEPENDS+=  ${KMODDIR}/nvidia-drm.ko:graphics/nvidia-drm-61-kmod
.  endif
.endif

.include <bsd.port.post.mk>

I don't even have any Makefile.common.
One thing I can say is that you're confusing graphics/nvidia-drm-61-kmod port and graphics/nvidia-drm-kmod port.
The Makefile you've shown first is of graphics/nvidia-drm-61-kmod, and the latter is of graphics/nvidia-drm-kmod.

They are different ports.

graphics/nvidia-drm-kmod is a metaport only for choosing which specific port (in your case, graphics/nvidia-drm-61-kmod) to be installed ON FRESH INSTALLATION.

And graphics/nvidia-drm-61-kmod is the actual port which builds nvidia-drm.ko, which works with x11/nvidia-driver and graphics/drm-61-kmod.

In addidion, graphics/nvidia-drm-kmod has some files commonly used for graphics/nvidia-drm-[510|515|61]-kmod, including Makefile.common.
 
Ok sorry my bad. Here we have a very hot temperature. That's right. I've modified Makefile and Makefile.common inside the dir : /usr/ports/graphics/nvidia-drm-kmod according with how they should be,as shown here :


and I tried to compile nvidia-drm-61-kmod again :

Code:
root@marietto:/usr/ports/graphics/nvidia-drm-61-kmod # make clean
===>  Cleaning for nvidia-drm-61-kmod-560.28.03_1

root@marietto:/usr/ports/graphics/nvidia-drm-61-kmod # make
===>  License NVIDIA accepted by the user
===>   nvidia-drm-61-kmod-560.28.03_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by nvidia-drm-61-kmod-560.28.03_1 for building
===>  Extracting for nvidia-drm-61-kmod-560.28.03_1
=> SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-560.28.03.tar.xz.
=> SHA256 Checksum OK for freebsd-drm-kmod-drm_v6.1.92_0_GH0.tar.gz.
===>  Patching for nvidia-drm-61-kmod-560.28.03_1
===>  Applying FreeBSD patches for nvidia-drm-61-kmod-560.28.03_1 from /usr/ports/graphics/nvidia-drm-61-kmod/files
Ignoring previously applied (or reversed) patch.
3 out of 3 hunks ignored--saving rejects to nvidia-drm-freebsd-lkpi.c.rej
===>  FAILED Applying FreeBSD patch-nvidia-drm-freebsd-lkpi.c
===> Cleanly applied FreeBSD patch(es)  patch-nvidia-drm-conftest.h
===> FAILED to apply cleanly FreeBSD patch(es)  patch-nvidia-drm-freebsd-lkpi.c
*** Error code 1
Stop.
 
This is my patch-nvidia-drm-freebsd-lkpi.c. Do you see some errors inside of it ?

Code:
--- nvidia-drm-freebsd-lkpi.c.orig    2024-02-22 01:03:15 UTC
+++ nvidia-drm-freebsd-lkpi.c
@@ -115,6 +115,7 @@ int nv_drm_probe_devices(void)
      * by the native nvidia.ko by using our devclass.
      */
     for (int i = 0; i < NV_MAX_DEVICES; i++) {
+        struct pci_dev *pdev;
         nv_gpu_info_t gpu_info;
         struct nvidia_softc *sc = devclass_get_softc(nvidia_devclass, i);
         if (!sc) {
@@ -124,11 +125,33 @@ int nv_drm_probe_devices(void)
         nv_state_t *nv = sc->nv_state;
 
         /*
+         * Set the ivars for this device if they are not already populated. This
+         * is the bus specific data, and linuxkpi will try to use it.
+         */
+        if (!device_get_ivars(sc->dev)) {
+            device_t parent = device_get_parent(sc->dev);
+            struct pci_devinfo *dinfo = device_get_ivars(parent);
+            device_set_ivars(sc->dev, dinfo);
+        }
+
+        /*
          * Now we have the state (which gives us the device_t), but what nvidia-drm
          * wants is a pci_dev suitable for use with linuxkpi code. We can use
-         * lkpinew_pci_dev to fill in a pci_dev struct,
+         * lkpinew_pci_dev to fill in a pci_dev struct, or linux_pci_attach on more
+         * recent kernels (introduced by 253dbe7487705).
          */
-        struct pci_dev *pdev = lkpinew_pci_dev(sc->dev);
+#if __FreeBSD_version < 1300093
+        pdev = lkpinew_pci_dev(sc->dev);
+#else
+        pdev = malloc(sizeof(*pdev), M_DEVBUF, M_WAITOK|M_ZERO);
+        if (!pdev) {
+            return -ENOMEM;
+        }
+
+        if (linux_pci_attach_device(sc->dev, NULL, NULL, pdev)) {
+            return -ENOMEM;
+        }
+#endif
         nv_lkpi_pci_devs = pdev;
 
         gpu_info.gpu_id = nv->gpu_id;
@@ -148,7 +171,6 @@ MODULE_DEPEND(nvidia_drm, linuxkpi, 1, 1, 1);
 LKPI_DRIVER_MODULE(nvidia_drm, nv_drm_init, nv_drm_exit);
 LKPI_PNP_INFO(pci, nvidia_drm, nv_module_device_table);
 MODULE_DEPEND(nvidia_drm, linuxkpi, 1, 1, 1);
-MODULE_DEPEND(nvidia_drm, linuxkpi_gplv2, 1, 1, 1);
 MODULE_DEPEND(nvidia_drm, drmn, 2, 2, 2);
 MODULE_DEPEND(nvidia_drm, dmabuf, 1, 1, 1);
 MODULE_DEPEND(nvidia_drm, nvidia, 1, 1, 1);
 
Ok sorry my bad. Here we have a very hot temperature. That's right. I've modified Makefile and Makefile.common inside the dir : /usr/ports/graphics/nvidia-drm-kmod according with how they should be,as shown here :


and I tried to compile nvidia-drm-61-kmod again :

Code:
root@marietto:/usr/ports/graphics/nvidia-drm-61-kmod # make clean
===>  Cleaning for nvidia-drm-61-kmod-560.28.03_1

root@marietto:/usr/ports/graphics/nvidia-drm-61-kmod # make
===>  License NVIDIA accepted by the user
===>   nvidia-drm-61-kmod-560.28.03_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by nvidia-drm-61-kmod-560.28.03_1 for building
===>  Extracting for nvidia-drm-61-kmod-560.28.03_1
=> SHA256 Checksum OK for NVIDIA-FreeBSD-x86_64-560.28.03.tar.xz.
=> SHA256 Checksum OK for freebsd-drm-kmod-drm_v6.1.92_0_GH0.tar.gz.
===>  Patching for nvidia-drm-61-kmod-560.28.03_1
===>  Applying FreeBSD patches for nvidia-drm-61-kmod-560.28.03_1 from /usr/ports/graphics/nvidia-drm-61-kmod/files
Ignoring previously applied (or reversed) patch.
3 out of 3 hunks ignored--saving rejects to nvidia-drm-freebsd-lkpi.c.rej
===>  FAILED Applying FreeBSD patch-nvidia-drm-freebsd-lkpi.c
===> Cleanly applied FreeBSD patch(es)  patch-nvidia-drm-conftest.h
===> FAILED to apply cleanly FreeBSD patch(es)  patch-nvidia-drm-freebsd-lkpi.c
*** Error code 1
Stop.
Again, if you're on current state of (main branch) ports tree (or old tree but applying properly the patch on Phablicator Differential Revision D45400 [same as you mentioned]), patch-nvidia-drm-freebsd-lkpi.c no longer exists. it's renamed to extra-patch-nvidia-drm-freebsd-lkpi.c and applied conditionally only when needed.
 
Ignoring previously applied (or reversed) patch. 3 out of 3 hunks ignored--saving rejects to nvidia-drm-freebsd-lkpi.c.rej
Are you sure that you're not trying to apply a patch that's already there? Or maybe your patch is whitespace damaged? Did you try to apply it using "-l" ?
 
This is my patch-nvidia-drm-freebsd-lkpi.c. Do you see some errors inside of it ?

Code:
--- nvidia-drm-freebsd-lkpi.c.orig    2024-02-22 01:03:15 UTC
+++ nvidia-drm-freebsd-lkpi.c
@@ -115,6 +115,7 @@ int nv_drm_probe_devices(void)
      * by the native nvidia.ko by using our devclass.
      */
     for (int i = 0; i < NV_MAX_DEVICES; i++) {
+        struct pci_dev *pdev;
         nv_gpu_info_t gpu_info;
         struct nvidia_softc *sc = devclass_get_softc(nvidia_devclass, i);
         if (!sc) {
@@ -124,11 +125,33 @@ int nv_drm_probe_devices(void)
         nv_state_t *nv = sc->nv_state;
 
         /*
+         * Set the ivars for this device if they are not already populated. This
+         * is the bus specific data, and linuxkpi will try to use it.
+         */
+        if (!device_get_ivars(sc->dev)) {
+            device_t parent = device_get_parent(sc->dev);
+            struct pci_devinfo *dinfo = device_get_ivars(parent);
+            device_set_ivars(sc->dev, dinfo);
+        }
+
+        /*
          * Now we have the state (which gives us the device_t), but what nvidia-drm
          * wants is a pci_dev suitable for use with linuxkpi code. We can use
-         * lkpinew_pci_dev to fill in a pci_dev struct,
+         * lkpinew_pci_dev to fill in a pci_dev struct, or linux_pci_attach on more
+         * recent kernels (introduced by 253dbe7487705).
          */
-        struct pci_dev *pdev = lkpinew_pci_dev(sc->dev);
+#if __FreeBSD_version < 1300093
+        pdev = lkpinew_pci_dev(sc->dev);
+#else
+        pdev = malloc(sizeof(*pdev), M_DEVBUF, M_WAITOK|M_ZERO);
+        if (!pdev) {
+            return -ENOMEM;
+        }
+
+        if (linux_pci_attach_device(sc->dev, NULL, NULL, pdev)) {
+            return -ENOMEM;
+        }
+#endif
         nv_lkpi_pci_devs = pdev;
 
         gpu_info.gpu_id = nv->gpu_id;
@@ -148,7 +171,6 @@ MODULE_DEPEND(nvidia_drm, linuxkpi, 1, 1, 1);
 LKPI_DRIVER_MODULE(nvidia_drm, nv_drm_init, nv_drm_exit);
 LKPI_PNP_INFO(pci, nvidia_drm, nv_module_device_table);
 MODULE_DEPEND(nvidia_drm, linuxkpi, 1, 1, 1);
-MODULE_DEPEND(nvidia_drm, linuxkpi_gplv2, 1, 1, 1);
 MODULE_DEPEND(nvidia_drm, drmn, 2, 2, 2);
 MODULE_DEPEND(nvidia_drm, dmabuf, 1, 1, 1);
 MODULE_DEPEND(nvidia_drm, nvidia, 1, 1, 1);
As noted on my previous comment, the file should not exist.
 
Ok thanks. I've been able to compile it,but it's not good for FreeBSD 14.1-RELEASE.

Istantanea_2024-08-07_19-10-30.png


Is it supposed to work on FreeBSD 15 ?
 
I've tried to load the old nvidia-drm.ko module (nvidia-drm-515-kmod-550.54.14),but even this it's not good :

Istantanea_2024-08-07_19-27-44.png
 
I've tried to load the old nvidia-drm.ko module (nvidia-drm-515-kmod-550.54.14),but even this it's not good :

View attachment 19941
This is exactly what happenes when attempting to upgrade graphics/nvidia-drm-*-kmod ports to non-default version, which neither ashafer ( the maintainer of graphics/nvidia-drm*-kmod ports) nor I could figure out and fix.

The resulting pkg is built fine and has the predicted name, but acutally, distfile of default x11/nvidia-driver is used to build, thus, results in version mismatch on load.

As I already noted before in this thread, the only workaround is to edit /usr/ports/x11/nvidia-driver/Makefile.version.

The contents should be, to upgrade to 560.28.03, as below.
Makefile:
# NVIDIA Distversion
#
# This will be included from x11/nvidia-driver and the nvidia-drm port
NVIDIA_DISTVERSION ?= 560.28.03
 
Don't focus your attention on post #268. It has been only an experiment. Give a look at post #267,that's the situation that I have now.
 
Don't focus your attention on post #268. It has been only an experiment. Give a look at post #267,that's the situation that I have now.
Kernel modules like nvidia-drm.ko, nvidia-modeset.ko and nvidia.ko works with kernel which the modules are built upon (with the src tree the base is built with). If you are lucky enough, would run on newer kernel if its ABI is 100% kept.

And minimum supported OSVERSION of graphics/nvidia-drm-61-kmod is 1400508 and 14.1-Release fulfills the requirement.

More, the error message in #267 would be exposed by kernel module loader, often seen when some of modules are too old build for running kernel. On the other hand, the error message in #267 is exposed by nvidia-drm.ko, usually means kernel module loader is fine to load it but mismatch occurs within nvidia-drm.ko and nvidia-modeset.ko as I already noted on #269.
 
Just to have the confirm that I have understood well. Is below correct ?

Code:
# cd /usr/ports/x11/linux-nvidia-libs

# nano Makefile
DISTVERSION?= 560.28.03

# cd /usr/ports/x11/nvidia-driver/Makefile

# nano Makefile
DISTVERSION?= 560.28.03

and should I modify these files :

graphics/nvidia-drm-kmod/Makefile
graphics/nvidia-drm-kmod/Makefile.common

according with this review :

https://reviews.freebsd.org/R11:307f75413336d33a6570616e5e2af3b659e2951d   ?

Sorry,I'm confused.
 
Just to have the confirm that I have understood well. Is below correct ?
First of all, NO PORTS Makefile (without filename extention) WHICH CONTAINS SINGLE DISTVERSION?= 560.28.03 LINE ONLY WORKS.
On the other hand, /usr/ports/x11/nvidia-driver/Makefile.version works, because it is included (read) into other "working and valid" Makefile to be shared.

To see what is correct, look into cgit repo and how should the "unpatched" files should be.

/usr/ports/x11/linux-nvidia-libs/Makefile
/usr/ports/x11/nvidia-driver/Makefile

And /usr/ports/graphics/nvidia-drm-kmod/Makefile and /usr/ports/graphics/nvidia-drm-kmod/Makefile.common are not needed to be patched if your ports tree is in sync with ports main branch, as the required changes are already landed (included), as you can see via the link.

Keep in mind to get back to original states of official repo not to be confused. I often, very often refer to cgit repo when I'm trying to modify something. There we can read what the official codes are/were for now and before. All changes are logged.
 
Usually, any given port has a distinfo file, because that's how BSD's organize the compilation process. In the past, I remember seeing some Makefiles on the Linux side of things that tried to hardcode the tarball version. But this is FreeBSD, so OP would do well to get familiar with the Porter's Handbook, and how to look stuff up there, and connect the dots. I do that routinely, BTW.
 
The error is changed :

nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 560.28.03 Thu Jul 18 18:44:20 UTC 2024
link_elf_obj: symbol ___drm_dbg undefined
Warning: memory type debugfsint leaked memory on destroy (2 allocations, 80 bytes leaked).
linker_load_file: /boot/modules/nvidia-drm.ko - unsupported file type
 
Back
Top