[SOLVED] can't install NVIDIA driver, Error! Bad return status for module build on kernel: 5.15.74-1-pve (x86_64)

kerimdk

Member
Oct 7, 2022
18
1
8
Hello guys , when i'm trying to install NVIDIA driver by running
$ dkms install -m NVIDIA -v 510.85.03
i'm getting the following error:
Code:
dkms install -m nvidia -v 510.85.03

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
'make' -j20 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=5.15.74-1-pve IGNORE_CC_MISMATCH='' modules......(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.15.74-1-pve (x86_64)
Consult /var/lib/dkms/nvidia/510.85.03/build/make.log for more information.

here's my system and kernel information:
Code:
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

dmseg Linux version 5.15.74-1-pve (build@proxmox) (gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 SMP PVE 5.15.74-1 (Mon, 14 Nov 2022 20:17:15 +0100) ()
Code:
$lscpu
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Model name:                      Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
Virtualization:                  VT-x

lspci | grep VGA 03:00.0 VGA compatible controller: NVIDIA Corporation GP108 [GeForce GT 1030] (rev a1) 09:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 30)

so what to do to install nvidia driver?
note that i've successfully installed the NVIDIA-Linux-x86_64-510.85.03-vgpu-kvm.run driver on my server and enabled the iommu.
 
Last edited:
not completely sure what you want to accomplish, you say:
note that i've successfully installed the NVIDIA-Linux-x86_64-510.85.03-vgpu-kvm.run driver on my server and enabled the iommu.
but still want to install the nvidia driver? what for?

also to see why the compilation has failed check:
Code:
Consult /var/lib/dkms/nvidia/510.85.03/build/make.log for more information.
 
here's the output of compilation has failed
Code:
cat make.log
DKMS make.log for nvidia-510.85.03 for kernel 5.15.74-1-pve (x86_64)
Mon 21 Nov 2022 10:10:26 AM CET
make[1]: Entering directory '/usr/src/linux-headers-5.15.74-1-pve'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Debian 10.2.1-6) 10.2.1 20210110
  You are using:           cc (Debian 10.2.1-6) 10.2.1 20210110
  SYMLINK /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-kernel.o
 CONFTEST: hash__remap_4k_pfn
 CONFTEST: set_pages_uc
 CONFTEST: list_is_first
 CONFTEST: set_memory_uc
 CONFTEST: set_memory_array_uc
 CONFTEST: set_pages_array_uc
 CONFTEST: acquire_console_sem
 CONFTEST: console_lock
 CONFTEST: ioremap_cache
 CONFTEST: ioremap_wc
 CONFTEST: acpi_walk_namespace
 CONFTEST: sg_alloc_table
 CONFTEST: pci_get_domain_bus_and_slot
 CONFTEST: get_num_physpages
 CONFTEST: efi_enabled
 CONFTEST: pde_data
 CONFTEST: PDE_DATA
 CONFTEST: proc_remove
 CONFTEST: pm_vt_switch_required
 CONFTEST: xen_ioemu_inject_msi
 CONFTEST: phys_to_dma
 CONFTEST: get_dma_ops
 CONFTEST: dma_attr_macros
 CONFTEST: dma_map_page_attrs
 CONFTEST: write_cr4
 CONFTEST: of_get_property
 CONFTEST: of_find_node_by_phandle
 CONFTEST: of_node_to_nid
 CONFTEST: pnv_pci_get_npu_dev
 CONFTEST: of_get_ibm_chip_id
 CONFTEST: node_end_pfn
 CONFTEST: pci_bus_address
 CONFTEST: pci_stop_and_remove_bus_device
 CONFTEST: pci_remove_bus_device
 CONFTEST: register_cpu_notifier
 CONFTEST: cpuhp_setup_state
 CONFTEST: dma_map_resource
 CONFTEST: backlight_device_register
 CONFTEST: get_backlight_device_by_name
 CONFTEST: timer_setup
 CONFTEST: pci_enable_msix_range
 CONFTEST: kernel_read_has_pointer_pos_arg
 CONFTEST: kernel_write
 CONFTEST: kthread_create_on_node
 CONFTEST: of_find_matching_node
 CONFTEST: dev_is_pci
 CONFTEST: dma_direct_map_resource
 CONFTEST: tegra_get_platform
 CONFTEST: tegra_bpmp_send_receive
 CONFTEST: flush_cache_all
 CONFTEST: vmf_insert_pfn
 CONFTEST: jiffies_to_timespec
 CONFTEST: ktime_get_raw_ts64
 CONFTEST: ktime_get_real_ts64
 CONFTEST: full_name_hash
 CONFTEST: hlist_for_each_entry
 CONFTEST: pci_enable_atomic_ops_to_root
 CONFTEST: vga_tryget
 CONFTEST: pgprot_decrypted
 CONFTEST: cc_mkdec
 CONFTEST: iterate_fd
 CONFTEST: seq_read_iter
 CONFTEST: sg_page_iter_page
 CONFTEST: unsafe_follow_pfn
 CONFTEST: drm_gem_object_get
 CONFTEST: drm_gem_object_put_unlocked
 CONFTEST: set_close_on_exec
 CONFTEST: add_memory_driver_managed
 CONFTEST: device_property_read_u64
 CONFTEST: devm_of_platform_populate
 CONFTEST: of_dma_configure
 CONFTEST: of_property_count_elems_of_size
 CONFTEST: of_property_read_variable_u8_array
 CONFTEST: i2c_new_client_device
 CONFTEST: i2c_unregister_device
 CONFTEST: of_get_named_gpio
 CONFTEST: devm_gpio_request_one
 CONFTEST: gpio_direction_input
 CONFTEST: gpio_direction_output
 CONFTEST: gpio_get_value
 CONFTEST: gpio_set_value
 CONFTEST: gpio_to_irq
 CONFTEST: icc_get
 CONFTEST: icc_put
 CONFTEST: icc_set_bw
 CONFTEST: dma_set_coherent_mask
 CONFTEST: acpi_bus_get_device
 CONFTEST: get_task_ioprio
 CONFTEST: vfio_register_notifier
 CONFTEST: mdev_parent_dev
 CONFTEST: mdev_dev
 CONFTEST: mdev_get_type_group_id
 CONFTEST: mdev_uuid
 CONFTEST: mdev_from_dev
 CONFTEST: mdev_set_iommu_device
 CONFTEST: pci_irq_vector_helpers
 CONFTEST: kvmalloc
 CONFTEST: is_export_symbol_gpl_of_node_to_nid
 CONFTEST: is_export_symbol_gpl_sme_active
 CONFTEST: is_export_symbol_present_swiotlb_map_sg_attrs
 CONFTEST: is_export_symbol_present_swiotlb_dma_ops
 CONFTEST: is_export_symbol_present___close_fd
 CONFTEST: is_export_symbol_present_close_fd
 CONFTEST: is_export_symbol_present_get_unused_fd
 CONFTEST: is_export_symbol_present_get_unused_fd_flags
 CONFTEST: is_export_symbol_present_nvhost_get_default_device
 CONFTEST: is_export_symbol_present_nvhost_syncpt_unit_interface_get_byte_offset
 CONFTEST: is_export_symbol_present_nvhost_syncpt_unit_interface_get_aperture
 CONFTEST: is_export_symbol_present_tegra_dce_register_ipc_client
 CONFTEST: is_export_symbol_present_tegra_dce_unregister_ipc_client
 CONFTEST: is_export_symbol_present_tegra_dce_client_ipc_send_recv
 CONFTEST: is_export_symbol_present_dram_clk_to_mc_clk
 CONFTEST: is_export_symbol_present_get_dram_num_channels
 CONFTEST: is_export_symbol_present_tegra_dram_types
 CONFTEST: file_operations
 CONFTEST: file_inode
 CONFTEST: kuid_t
 CONFTEST: dma_ops
 CONFTEST: swiotlb_dma_ops
 CONFTEST: noncoherent_swiotlb_dma_ops
 CONFTEST: vm_fault_has_address
 CONFTEST: backlight_properties_type
 CONFTEST: vm_insert_pfn_prot
 CONFTEST: vmf_insert_pfn_prot
 CONFTEST: address_space_init_once
 CONFTEST: vm_ops_fault_removed_vma_arg
 CONFTEST: vmbus_channel_has_ringbuffer_page
 CONFTEST: device_driver_of_match_table
 CONFTEST: device_of_node
 CONFTEST: node_states_n_memory
 CONFTEST: kmem_cache_has_kobj_remove_work
 CONFTEST: sysfs_slab_unlink
 CONFTEST: proc_ops
 CONFTEST: timespec64
 CONFTEST: vmalloc_has_pgprot_t_arg
 CONFTEST: acpi_fadt_low_power_s0
 CONFTEST: mm_has_mmap_lock
 CONFTEST: pci_channel_state
 CONFTEST: pci_dev_has_ats_enabled
 CONFTEST: mt_device_gre
 CONFTEST: remove_memory_has_nid_arg
 CONFTEST: mdev_parent
 CONFTEST: vfio_info_add_capability_has_cap_type_id_arg
 CONFTEST: vfio_device_gfx_plane_info
 CONFTEST: vm_fault_t
 CONFTEST: vfio_device_migration_has_start_pfn
 CONFTEST: mdev_parent_ops_has_open_device
 CONFTEST: dom0_kernel_present
 CONFTEST: nvidia_vgpu_kvm_build
 CONFTEST: nvidia_grid_build
 CONFTEST: nvidia_grid_csp_build
 CONFTEST: get_user_pages
 CONFTEST: get_user_pages_remote
 CONFTEST: pm_runtime_available
 CONFTEST: drm_available
 CONFTEST: pci_class_multimedia_hd_audio
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-pci.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-acpi.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-cray.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-dma.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-i2c.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-mmap.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-p2p.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-pat.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-procfs.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-procfs-utils.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-usermap.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-vm.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-vtophys.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/os-interface.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/os-mlock.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/os-pci.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/os-registry.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/os-usermap.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-modeset-interface.o
  CC [M]  /var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-pci-table.o
/var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-dma.c: In function ‘nv_dma_use_map_resource’:
/var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-dma.c:783:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  783 |     const struct dma_map_ops *ops = get_dma_ops(dma_dev->dev);
      |     ^~~~~
/var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-dma.c: At top level:
/var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-dma.c:991: warning: "IMPORT_SGT_STUBS_NEEDED" redefined
  991 | #define IMPORT_SGT_STUBS_NEEDED 0
      |
/var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-dma.c:985: note: this is the location of the previous definition
  985 | #define IMPORT_SGT_STUBS_NEEDED 1
      |
/var/lib/dkms/nvidia/510.85.03/build/nvidia/os-interface.c:30:10: fatal error: nv-misc.h: No such file or directory
   30 | #include "nv-misc.h"
      |          ^~~~~~~~~~~
compilation terminated.
/var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-mmap.c: In function ‘nv_encode_caching’:
/var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-mmap.c:343:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
  343 |             if (NV_ALLOW_CACHING(memory_type))
      |                ^
/var/lib/dkms/nvidia/510.85.03/build/nvidia/nv-mmap.c:346:9: note: here
  346 |         default:
      |         ^~~~~~~
make[2]: *** [scripts/Makefile.build:297: /var/lib/dkms/nvidia/510.85.03/build/nvidia/os-interface.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1902: /var/lib/dkms/nvidia/510.85.03/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.74-1-pve'
make: *** [Makefile:82: modules] Error 2
 
i just was need to patch the file before installing it with this command ./NVIDIA-Linux-x86_64-510.85.03-vgpu-kvm.run --apply-patch ~/vgpu-proxmox/510.85.03.patch
then install it [B]./NVIDIA-Linux-x86_64-510.85.03-vgpu-kvm-custom.run --dkms [/B] that solved the problem in my case, and i didn't need to re-install it using dkms install -m NVIDIA -v 510.85.03 command.
you can check the status of your gpu with: nvidia-smi
my source: https://gitlab.com/polloloco/vgpu-proxmox
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!