Solved question about linux.ko and linux_common.ko in freebsd14.2 ?

dear all :
i have install freebsd14.2 with nvidia k2000 in my machine. i have find below ko file has been load when system boot.
4 1 0xffffffff83880000 107330 nvidia-modeset.ko
5 1 0xffffffff83a00000 1fcfa10 nvidia.ko
6 2 0xffffffff83988000 30a80 linux.ko
7 3 0xffffffff839b9000 c2a8 linux_common.ko

i have used mate GUI dekstop. can you tell me who load linux.ko and linux_common.ko. i just want to play freebsd . not linux , i don't want any linux ko can be autoload . thanks.
 
i have used mate GUI dekstop. can you tell me who load linux.ko and linux_common.ko.
The NVidia driver loads them as dependencies. Not because the driver actually needs them to function (it works fine without), but because the Linux compatibility is enabled by default on the driver. Turn off LINUX and the NVidia driver won't load them as dependencies anymore.

Code:
===> The following configuration options are available for nvidia-driver-570.144.1402000:
     ACPI_PM=on: ACPI Power Management support
     DOCS=on: Build and/or install documentation
     LINUX=on: Linux compatibility support
     WBINVD=off: Flush CPU caches directly with WBINVD
===> Use 'make config' to modify these settings
 
dear all :
i have install freebsd14.2 with nvidia k2000 in my machine. i have find below ko file has been load when system boot.
4 1 0xffffffff83880000 107330 nvidia-modeset.ko
5 1 0xffffffff83a00000 1fcfa10 nvidia.ko
6 2 0xffffffff83988000 30a80 linux.ko
7 3 0xffffffff839b9000 c2a8 linux_common.ko

i have used mate GUI dekstop. can you tell me who load linux.ko and linux_common.ko. i just want to play freebsd . not linux , i don't want any linux ko can be autoload . thanks.

I feel the same, allways compile the nvidia driver from ports and take out the linux support like SirDice says
they sit on :

Code:
/usr/ports/x11/nvidia-driver
/usr/ports/x11/nvidia-driver-304
/usr/ports/x11/nvidia-driver-340
/usr/ports/x11/nvidia-driver-390
/usr/ports/x11/nvidia-driver-470
 
The NVidia driver loads them as dependencies. Not because the driver actually needs them to function (it works fine without), but because the Linux compatibility is enabled by default on the driver. Turn off LINUX and the NVidia driver won't load them as dependencies anymore.

Code:
===> The following configuration options are available for nvidia-driver-570.144.1402000:
     ACPI_PM=on: ACPI Power Management support
     DOCS=on: Build and/or install documentation
     LINUX=on: Linux compatibility support
     WBINVD=off: Flush CPU caches directly with WBINVD
===> Use 'make config' to modify these settings
Dear sirdice:
you mean if i want to disable linux.ko , i must reinstall nvidia k2000 driver with ports , then use make config disable linux ? right ? i can not use ports in china , much more tar don't download it, i will ports failed. do we have other way to disable linux ? thanks.
 
i can not use ports in china , much more tar don't download it, i will ports failed.
Have you tried actually downloading from the nvidia-driver port (make fetch) ?

If fetching from the port is not possible, does the source code archive [1] download from the China nVIDIA website not work either?


It should be enough when the archive is placed under /usr/ports/distfiles to satisfy the build conditions.

[1] NVIDIA-FreeBSD-x86_64-570.144.tar.xz
 
Have you tried actually downloading from the nvidia-driver port (make fetch) ?

If fetching from the port is not possible, does the source code archive [1] download from the China nVIDIA website not work either?


It should be enough when the archive is placed under /usr/ports/distfiles to satisfy the build conditions.

[1] NVIDIA-FreeBSD-x86_64-570.144.tar.xz
Dear t-daemon :
morning. thanks for your help . now i have try ports , but get error in below
root@work2:/usr/ports/x11/nvidia-driver-470 # make install clean
===> Patching for nvidia-driver-470-470.161.03_1
===> nvidia-driver-470-470.161.03_1 depends on executable: gsed - not found
===> gsed-4.9 depends on file: /usr/local/bin/makeinfo - not found
===> texinfo-7.1_2,1 depends on executable: help2man - not found
===> texinfo-7.1_2,1 depends on executable: help2man - not found
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/print/texinfo
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/print/texinfo
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/textproc/gsed
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/textproc/gsed
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/x11/nvidia-driver-470
*** Error code 1

Stop.
make: stopped in /usr/ports/x11/nvidia-driver-470
root@work2:/usr/ports/x11/nvidia-driver-470 #


then, i have download driver from nvidia . below was the error. .
cd NVIDIA-FreeBSD-x86_64-570.144
root@work2:/home/game/document/NVIDIA-FreeBSD-x86_64-570.144 # ls
Makefile mk scripts
NVIDIA_Changelog nvidia_icd.json src
doc nvidia_layers.json x11
firmware nvml
lib obj
root@work2:/home/game/document/NVIDIA-FreeBSD-x86_64-570.144 # make install
===> src (install)
===> src/nvidia (install)
cc -O2 -pipe -DNV_VERSION_STRING=\"570.144\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O2 -fno-strict-aliasing -ffreestanding -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -DNV_SPECTRE_V2=1 -DNV_KERNEL_INTERFACE_LAYER -Werror=undef -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I../common/inc -include /home/game/document/NVIDIA-FreeBSD-x86_64-570.144/src/nvidia/opt_global.h -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -fdebug-prefix-map=./i386=/usr/src/sys/i386/include -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error=tautological-compare -Wno-error=empty-body -Wno-error=parentheses-equality -Wno-error=unused-function -Wno-error=pointer-sign -Wno-error=shift-negative-value -Wno-address-of-packed-member -Wno-format-zero-length -mno-aes -mno-avx -std=gnu99 -c nvidia_acpi.c -o nvidia_acpi.o
<built-in>:1:10: fatal error: '/home/game/document/NVIDIA-FreeBSD-x86_64-570.144/src/nvidia/opt_global.h' file not found
1 | #include "/home/game/document/NVIDIA-FreeBSD-x86_64-570.144/src/nvidia/opt_global.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /home/game/document/NVIDIA-FreeBSD-x86_64-570.144/src/nvidia
*** Error code 1

Stop.
make[1]: stopped in /home/game/document/NVIDIA-FreeBSD-x86_64-570.144/src
*** Error code 1

Stop.
make: stopped in /home/game/document/NVIDIA-FreeBSD-x86_64-570.144
root@work2:/home/game/document/NVIDIA-FreeBSD-x86_64-570.144 #


double ways was failed. i don't know why . please help me. thanks.
 
Dear t-daemon :
morning. thanks for your help . now i have try ports , but get error in below
root@work2:/usr/ports/x11/nvidia-driver-470 # make install clean
===> Patching for nvidia-driver-470-470.161.03_1
===> nvidia-driver-470-470.161.03_1 depends on executable: gsed - not found
===> gsed-4.9 depends on file: /usr/local/bin/makeinfo - not found
===> texinfo-7.1_2,1 depends on executable: help2man - not found
===> texinfo-7.1_2,1 depends on executable: help2man - not found
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/print/texinfo
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/print/texinfo
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/textproc/gsed
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/textproc/gsed
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/x11/nvidia-driver-470
*** Error code 1

Stop.
make: stopped in /usr/ports/x11/nvidia-driver-470
root@work2:/usr/ports/x11/nvidia-driver-470 #


then, i have download driver from nvidia . below was the error. .
cd NVIDIA-FreeBSD-x86_64-570.144
root@work2:/home/game/document/NVIDIA-FreeBSD-x86_64-570.144 # ls
Makefile mk scripts
NVIDIA_Changelog nvidia_icd.json src
doc nvidia_layers.json x11
firmware nvml
lib obj
root@work2:/home/game/document/NVIDIA-FreeBSD-x86_64-570.144 # make install
===> src (install)
===> src/nvidia (install)
cc -O2 -pipe -DNV_VERSION_STRING=\"570.144\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O2 -fno-strict-aliasing -ffreestanding -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG -DNV_SPECTRE_V2=1 -DNV_KERNEL_INTERFACE_LAYER -Werror=undef -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I../common/inc -include /home/game/document/NVIDIA-FreeBSD-x86_64-570.144/src/nvidia/opt_global.h -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -fdebug-prefix-map=./i386=/usr/src/sys/i386/include -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error=tautological-compare -Wno-error=empty-body -Wno-error=parentheses-equality -Wno-error=unused-function -Wno-error=pointer-sign -Wno-error=shift-negative-value -Wno-address-of-packed-member -Wno-format-zero-length -mno-aes -mno-avx -std=gnu99 -c nvidia_acpi.c -o nvidia_acpi.o
<built-in>:1:10: fatal error: '/home/game/document/NVIDIA-FreeBSD-x86_64-570.144/src/nvidia/opt_global.h' file not found
1 | #include "/home/game/document/NVIDIA-FreeBSD-x86_64-570.144/src/nvidia/opt_global.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /home/game/document/NVIDIA-FreeBSD-x86_64-570.144/src/nvidia
*** Error code 1

Stop.
make[1]: stopped in /home/game/document/NVIDIA-FreeBSD-x86_64-570.144/src
*** Error code 1

Stop.
make: stopped in /home/game/document/NVIDIA-FreeBSD-x86_64-570.144
root@work2:/home/game/document/NVIDIA-FreeBSD-x86_64-570.144 #


double ways was failed. i don't know why . please help me. thanks.
For the error building the Nvidia driver from ports, try installing missing dependencies of driver with # make install-missing-packages while you are in ports tree at driver port.
 
For the error building the Nvidia driver from ports, try installing missing dependencies of driver with # make install-missing-packages while you are in ports tree at driver port.
thanks. i have installed nvidia driver 470 from ports and disable linux . yeah the driver work normal . thanks for all.
 
Back
Top