Issue with nvidia driver install for passthrough

lpereira

New Member
Nov 20, 2022
10
0
1
I'm a newbie trying to install NVIDIA drivers to use the graphic card for transcoding in plex.
I was able to follow this guide https://www.youtube.com/watch?v=-HCzLhnNf-A and https://www.reddit.com/r/homelab/comments/b5xpua/the_ultimate_beginners_guide_to_gpu_passthrough/, however I'm stuck when I try to install the driver for my NVIDIA.

First I'm not sure If I choosen the device correctly to passthrough
Code:
root@pve:~# lspci -nnv | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
root@pve:~# lspci -nnv | grep NVIDIA
01:00.0 3D controller [0302]: NVIDIA Corporation GK107M [GeForce GT 740M] [10de:0fdf] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation GK107 HDMI Audio Controller [10de:0e1b] (rev ff) (prog-if ff)

I picked the 3D controller but it seems not working
Code:
administrator@plex:~$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

Currently my NVIDIA is this (without any kernel in use)
Code:
00:10.0 3D controller: NVIDIA Corporation GK107M [GeForce GT 740M] (rev a1)
    Subsystem: ASUSTeK Computer Inc. GK107M [GeForce GT 740M]
    Physical Slot: 16
    Flags: fast devsel, IRQ 11
    Memory at fd000000 (32-bit, non-prefetchable) [size=16M]
    Memory at e0000000 (64-bit, prefetchable) [size=256M]
    Memory at f0000000 (64-bit, prefetchable) [size=32M]
    I/O ports at e000 [size=128]
    Expansion ROM at fe400000 [disabled] [size=512K]
    Capabilities: <access denied>
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

Code:
sudo ./NVIDIA-Linux-x86_64-418.113.run

produces the error

Code:
-> Installing DKMS kernel module:
ERROR: Failed to run `/usr/sbin/dkms build -m nvidia -v 418.113 -k 5.15.0-53-generic`:
Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
'make' -j4 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=5.15.0-53-generic IGNORE_CC_MISMATCH='' modules...(bad exit status: 2)
ERROR (dkms apport): binary package for nvidia: 418.113 not found
Error! Bad return status for module build on kernel: 5.15.0-53-generic (x86_64)
Consult /var/lib/dkms/nvidia/418.113/build/make.log for more information.
-> error.
ERROR: Failed to install the kernel module through DKMS. No kernel module was installed; please try installing again without DKMS, or check the DKMS logs for more information.
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

Just one more thing, I only added one PCI Device (did not added the NVIDIA audio controller, only added the 3D controller above ) because it would not run the VM otherwise with the error:
Code:
()
kvm: ../hw/pci/pci.c:1487: pci_irq_handler: Assertion `0 <= irq_num && irq_num < PCI_NUM_PINS' failed.
TASK ERROR: start failed: QEMU exited with code 1

1668979619010.png

I also did try to follow this installation guide and everything worked good, but seems the driver is not yet in use :/
https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes/index.html

Can someone help me, I'm stuck :(
 
Last edited:
I would like to bump this post. I am having similar issues. The driver install finishes and tells me the driver is installed but when i run nvidia-smi i get the same response OP is getting.
 
I'm a newbie trying to install NVIDIA drivers to use the graphic card for transcoding in plex.
I was able to follow this guide https://www.youtube.com/watch?v=-HCzLhnNf-A and https://www.reddit.com/r/homelab/comments/b5xpua/the_ultimate_beginners_guide_to_gpu_passthrough/, however I'm stuck when I try to install the driver for my NVIDIA.

First I'm not sure If I choosen the device correctly to passthrough
Code:
root@pve:~# lspci -nnv | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
root@pve:~# lspci -nnv | grep NVIDIA
01:00.0 3D controller [0302]: NVIDIA Corporation GK107M [GeForce GT 740M] [10de:0fdf] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation GK107 HDMI Audio Controller [10de:0e1b] (rev ff) (prog-if ff)

I picked the 3D controller but it seems not working
Code:
administrator@plex:~$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

Currently my NVIDIA is this (without any kernel in use)
Code:
00:10.0 3D controller: NVIDIA Corporation GK107M [GeForce GT 740M] (rev a1)
    Subsystem: ASUSTeK Computer Inc. GK107M [GeForce GT 740M]
    Physical Slot: 16
    Flags: fast devsel, IRQ 11
    Memory at fd000000 (32-bit, non-prefetchable) [size=16M]
    Memory at e0000000 (64-bit, prefetchable) [size=256M]
    Memory at f0000000 (64-bit, prefetchable) [size=32M]
    I/O ports at e000 [size=128]
    Expansion ROM at fe400000 [disabled] [size=512K]
    Capabilities: <access denied>
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

Code:
sudo ./NVIDIA-Linux-x86_64-418.113.run

produces the error

Code:
-> Installing DKMS kernel module:
ERROR: Failed to run `/usr/sbin/dkms build -m nvidia -v 418.113 -k 5.15.0-53-generic`:
Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
'make' -j4 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=5.15.0-53-generic IGNORE_CC_MISMATCH='' modules...(bad exit status: 2)
ERROR (dkms apport): binary package for nvidia: 418.113 not found
Error! Bad return status for module build on kernel: 5.15.0-53-generic (x86_64)
Consult /var/lib/dkms/nvidia/418.113/build/make.log for more information.
-> error.
ERROR: Failed to install the kernel module through DKMS. No kernel module was installed; please try installing again without DKMS, or check the DKMS logs for more information.
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

Just one more thing, I only added one PCI Device (did not added the NVIDIA audio controller, only added the 3D controller above ) because it would not run the VM otherwise with the error:
Code:
()
kvm: ../hw/pci/pci.c:1487: pci_irq_handler: Assertion `0 <= irq_num && irq_num < PCI_NUM_PINS' failed.
TASK ERROR: start failed: QEMU exited with code 1

View attachment 43463

I also did try to follow this installation guide and everything worked good, but seems the driver is not yet in use :/
https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes/index.html

Can someone help me, I'm stuck :(
Did you get the issue resolved since last year?
 

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!