Am 23/03/2024 um 20:41 schrieb Andrei Borzenkov:
On 23.03.2024 22:28, Peter Maffter via openSUSE Users wrote:
I used the nVidia compile command from From: Bjoern Voigt via openSUSE Users <users@lists.opensuse.org> Date: Tue, 21 Nov 2023 11:37:52 +0100 Subject: Re: nVidia: build error with kernel 6.6.1
I have no idea what it means. Show the full command and the complete output.
BV> I think, it's not a good idea to use the driver from BV> https://download.nvidia.com/ if you usually use the RPM Nvidia driver. BV> At least in the past some additional steps were necessary to switch back BV> to the RPM Nvidia driver later. BV> BV> If I have a problem with the Nvidia sources, I use the following steps BV> (I use version 545.29.02 here, but 390.157 should work similar): BV> BV> 1. cd /usr/src/kernel-modules/nvidia-545.29.02-default BV> 2. Apply the patches BV> 3. Compile the driver (here for Kernel version 6.6.1-1-default): BV> vers=6.6.1-1-default; make clean modules KERNEL_UNAME=$vers; make BV> modules_install KERNEL_UNAME=$vers; make clean KERNEL_UNAME=$vers; BV> depmod $vers BV> BV> If the kernel is updated, the recompilation is done automatically. If BV> the Nvidia RPM is updated, you have to check, if the new Nvidia RPM BV> driver needs patches too. /usr/src/kernel-modules/nvidia-390.157-default # vers=6.8.1-1-default;make clean modules KERNEL_UNAME=$vers;make modules_install KERNEL_UNAME=$vers; make clean KERNEL_UNAME=$vers;depmod $vers rm -f -r conftest make[1]: Entering directory '/usr/src/linux-6.8.1-1' make[2]: Entering directory '/usr/src/linux-6.8.1-1-obj/x86_64/default' make[2]: Leaving directory '/usr/src/linux-6.8.1-1-obj/x86_64/default' make[1]: Leaving directory '/usr/src/linux-6.8.1-1' make[1]: Entering directory '/usr/src/linux-6.8.1-1' make[2]: Entering directory '/usr/src/linux-6.8.1-1-obj/x86_64/default' warning: the compiler differs from the one used to build the kernel The kernel was built by: gcc (SUSE Linux) 13.2.1 20240206 [revision 67ac78caf31f7cb3202177e6428a46d829b70f23] You are using: cc (SUSE Linux) 13.2.1 20240206 [revision 67ac78caf31f7cb3202177e6428a46d829b70f23] CONFTEST: INIT_WORK CONFTEST: remap_pfn_range CONFTEST: hash__remap_4k_pfn CONFTEST: follow_pfn CONFTEST: vmap CONFTEST: set_pages_uc CONFTEST: list_is_first CONFTEST: set_memory_uc CONFTEST: set_memory_array_uc CONFTEST: change_page_attr CONFTEST: pci_get_class CONFTEST: pci_choose_state CONFTEST: vm_insert_page CONFTEST: acpi_device_id CONFTEST: acquire_console_sem CONFTEST: console_lock CONFTEST: kmem_cache_create CONFTEST: on_each_cpu CONFTEST: smp_call_function CONFTEST: acpi_evaluate_integer CONFTEST: ioremap_cache CONFTEST: ioremap_wc CONFTEST: acpi_walk_namespace CONFTEST: pci_domain_nr [...the complete output is really a lot of stuff...] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-modeset.o: warning: objtool: .rodata+0x4de70: data relocation to !ENDBR: _nv002687kms+0x2e0 /usr/src/kernel-modules/nvidia-390.157-default/nvidia-modeset.o: warning: objtool: .rodata+0x4de78: data relocation to !ENDBR: _nv002687kms+0x32 /usr/src/kernel-modules/nvidia-390.157-default/nvidia-modeset.o: warning: objtool: .rodata+0x4de80: data relocation to !ENDBR: _nv002687kms+0x358 CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm.o CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-drv.o CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-utils.o CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-crtc.o CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-encoder.o CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-connector.o CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-gem.o CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-fb.o CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-modeset.o CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-prime-fence.o In file included from /usr/src/linux-6.8.1-1/include/linux/srcu.h:21, from /usr/src/linux-6.8.1-1/include/linux/notifier.h:16, from /usr/src/linux-6.8.1-1/arch/x86/include/asm/uprobes.h:13, from /usr/src/linux-6.8.1-1/include/linux/uprobes.h:49, from /usr/src/linux-6.8.1-1/include/linux/mm_types.h:16, from /usr/src/linux-6.8.1-1/include/linux/mmzone.h:22, from /usr/src/linux-6.8.1-1/include/linux/gfp.h:7, from /usr/src/linux-6.8.1-1/include/linux/xarray.h:15, from /usr/src/linux-6.8.1-1/include/linux/radix-tree.h:21, from /usr/src/linux-6.8.1-1/include/linux/idr.h:15, from /usr/src/linux-6.8.1-1/include/drm/drm_device.h:7, from /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-priv.h:35, from /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-prime-fence.c:31: In function ‘__nv_drm_fence_context_destroy’, inlined from ‘__nv_drm_gem_fence_context_free’ at /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-prime-fence.c:418:5: /usr/src/linux-6.8.1-1/include/linux/workqueue.h:625:9: warning: call to ‘__warn_flushing_systemwide_wq’ declared with attribute warning: Please avoid flushing system-wide workqueues. [-Wattribute-warning] 625 | __warn_flushing_systemwide_wq(); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-prime-fence.c:325:5: note: in expansion of macro ‘flush_scheduled_work’ 325 | flush_scheduled_work(); | ^~~~~~~~~~~~~~~~~~~~ CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-linux.o CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-helper.o CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nv-pci-table.o CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-gem-nvkms-memory.o CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm/nvidia-drm-gem-user-memory.o LD [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm.o ld -r -o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-interface.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-frontend.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-instance.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-gpu-numa.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-acpi.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-chrdev.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-cray.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-dma.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-gvi.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-i2c.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-mempool.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-mmap.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-p2p.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-pat.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-procfs.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-usermap.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-vm.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-vtophys.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/os-interface.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/os-mlock.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/os-pci.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/os-registry.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/os-usermap.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-modeset-interface.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-pci-table.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-kthread-q.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-kthread-q-selftest.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-memdbg.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-ibmnpu.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv-report-err.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nv_uvm_interface.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia/nvlink_linux.o ld -r -o /usr/src/kernel-modules/nvidia-390.157-default/nvidia-modeset/nv-modeset-interface.o /usr/src/kernel-modules/nvidia-390.157-default/nvidia-modeset/nvidia-modeset-linux.o MODPOST /usr/src/kernel-modules/nvidia-390.157-default/Module.symvers CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia.mod.o LD [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia.ko BTF [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia.ko Skipping BTF generation for /usr/src/kernel-modules/nvidia-390.157-default/nvidia.ko due to unavailability of vmlinux CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-uvm.mod.o LD [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-uvm.ko BTF [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-uvm.ko Skipping BTF generation for /usr/src/kernel-modules/nvidia-390.157-default/nvidia-uvm.ko due to unavailability of vmlinux CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-modeset.mod.o LD [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-modeset.ko BTF [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-modeset.ko Skipping BTF generation for /usr/src/kernel-modules/nvidia-390.157-default/nvidia-modeset.ko due to unavailability of vmlinux CC [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm.mod.o LD [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm.ko BTF [M] /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm.ko Skipping BTF generation for /usr/src/kernel-modules/nvidia-390.157-default/nvidia-drm.ko due to unavailability of vmlinux make[2]: Leaving directory '/usr/src/linux-6.8.1-1-obj/x86_64/default' make[1]: Leaving directory '/usr/src/linux-6.8.1-1' make[1]: Entering directory '/usr/src/linux-6.8.1-1' make[2]: Entering directory '/usr/src/linux-6.8.1-1-obj/x86_64/default' INSTALL /usr/lib/modules/6.8.1-1-default/kernel/drivers/video/nvidia.ko INSTALL /usr/lib/modules/6.8.1-1-default/kernel/drivers/video/nvidia-uvm.ko INSTALL /usr/lib/modules/6.8.1-1-default/kernel/drivers/video/nvidia-modeset.ko INSTALL /usr/lib/modules/6.8.1-1-default/kernel/drivers/video/nvidia-drm.ko DEPMOD /usr/lib/modules/6.8.1-1-default Warning: modules_install: missing 'System.map' file. Skipping depmod. make[2]: Leaving directory '/usr/src/linux-6.8.1-1-obj/x86_64/default' make[1]: Leaving directory '/usr/src/linux-6.8.1-1' rm -f -r conftest make[1]: Entering directory '/usr/src/linux-6.8.1-1' make[2]: Entering directory '/usr/src/linux-6.8.1-1-obj/x86_64/default' CLEAN /usr/src/kernel-modules/nvidia-390.157-default CLEAN /usr/src/kernel-modules/nvidia-390.157-default/Module.symvers make[2]: Leaving directory '/usr/src/linux-6.8.1-1-obj/x86_64/default' make[1]: Leaving directory '/usr/src/linux-6.8.1-1'
make[2]: Leaving directory '/usr/src/linux-6.8.1-1-obj/x86_64/default' make[1]: Leaving directory '/usr/src/linux-6.8.1-1' make[1]: Entering directory '/usr/src/linux-6.8.1-1' make[2]: Entering directory '/usr/src/linux-6.8.1-1-obj/x86_64/default' INSTALL /usr/lib/modules/6.8.1-1-default/kernel/drivers/video/nvidia.ko INSTALL /usr/lib/modules/6.8.1-1-default/kernel/drivers/video/nvidia-uvm.ko INSTALL /usr/lib/modules/6.8.1-1-default/kernel/drivers/video/nvidia-modeset.ko INSTALL /usr/lib/modules/6.8.1-1-default/kernel/drivers/video/nvidia-drm.ko DEPMOD /usr/lib/modules/6.8.1-1-default Warning: modules_install: missing 'System.map' file. Skipping depmod.
bor@tw:~> ll /usr/lib/modules/6.8.1-1-default/System.map -rw-r--r-- 1 root root 7603403 Mar 19 10:32 /usr/lib/modules/6.8.1-1-default/System.map bor@tw:~>
ll /usr/lib/modules/6.8.1-1-default/System.map -rw-r--r-- 1 root root 7603403 Mar 19 08:32 /usr/lib/modules/6.8.1-1-default/System.map BR