You are not logged in.

#1 2023-11-20 19:22:20

stolichniaskitnik
Member
Registered: 2017-09-29
Posts: 34

[SOLVED] Issues with nvidia-470xx-dkms on a VM with PCI passthrough

Hello,

I've setup an archlinux VM with the latest iso and the linux kernel which is hosted on my proxmox hyp.
I have an nvidia gtx 660 Ti and according to this list the relevant driver should be nvidia-470xx-dkms.
The reason for this setup is I want to transcode some videos with nvenc, which again according to the nvidia archwiki should be supported on my card.

After setting up the driver I don't see any nvidia relevant module being loaded and the nvidia-smi command complains it can't find a driver:

[root@transcoder ~]# lsmod | grep -i nvid
[root@transcoder ~]# 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.

[root@transcoder ~]# 

The GPU is however recognized as a PCI device and also see it in the kernel log and I have all the following packages configured:

[root@transcoder ~]# lspci | grep -i VGA
00:02.0 VGA compatible controller: Device 1234:1111 (rev 02)
00:10.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 660 Ti] (rev a1)
[root@transcoder ~]# dmesg | grep -i nvidia
[    3.704283] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:10.1/sound/card0/input7
[    3.704348] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:10.1/sound/card0/input8
[    3.704389] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:10.1/sound/card0/input9
[    3.704431] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:10.1/sound/card0/input10
[root@transcoder ~]# pacman -Q | grep nv
lib32-nvidia-470xx-utils 470.223.02-1
lib32-opencl-nvidia-470xx 470.223.02-1
libxnvctrl-470xx 470.223.02-1
nvidia-470xx-dkms 470.223.02-1
nvidia-470xx-settings 470.223.02-1
nvidia-470xx-utils 470.223.02-1
opencl-nvidia-470xx 470.223.02-1
[root@transcoder ~]# 

I also had a look into 1.10 in the troubleshooting wiki but I don't see any nvidia* devices within /dev/:

[root@transcoder ~]# modprobe nvidia
modprobe: FATAL: Module nvidia not found in directory /lib/modules/6.6.1-arch1-1
[root@transcoder ~]# modprobe nvidia-dmks
modprobe: FATAL: Module nvidia-dmks not found in directory /lib/modules/6.6.1-arch1-1
[root@transcoder ~]# modprobe nvidia-470xx-dkms
modprobe: FATAL: Module nvidia-470xx-dkms not found in directory /lib/modules/6.6.1-arch1-1
[root@transcoder ~]# modprobe nvidia-470xx
modprobe: FATAL: Module nvidia-470xx not found in directory /lib/modules/6.6.1-arch1-1
[root@transcoder ~]# find /dev/ | grep -i nvidia
[root@transcoder ~]# nvidia-modprobe 
[root@transcoder ~]# find /dev/ | grep -i nvidia
[root@transcoder ~]# lsmod | grep -i nvidia
[root@transcoder ~]# 

This is a vanilla install with very few modifications.
Below I've shared the pacstrap used to setup the guest, the HOOKS in mkinitcpio from which kms has been removed and lvm2 added.
After amending mkinitcpio.conf of course I have regenrated the initramfs and reconfigured grub, however the issue still does persists.

[root@transcoder ~]# head -1 /var/log/pacman.log 
[2023-11-20T15:38:50+0000] [PACMAN] Running 'pacman -r /mnt -Sy --config=/etc/pacman.conf --cachedir=/mnt/var/cache/pacman/pkg --noconfirm base base-devel linux linux-firmware git vim ffmpeg moreutils rsync grub'
[root@transcoder ~]# grep ^HOOKS /etc/mkinitcpio.conf
HOOKS=(base udev autodetect modconf keyboard keymap consolefont block lvm2 filesystems fsck)
[root@transcoder ~]# 

Last edited by stolichniaskitnik (2023-11-25 16:55:04)

Offline

#2 2023-11-20 21:48:30

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,232

Re: [SOLVED] Issues with nvidia-470xx-dkms on a VM with PCI passthrough

For dkms packages to build the module the headers of the kernel in question need to be installed. Is that the case? I.e. you need linux-headers so nvidia-470xx-dkms can build the kernel module for the kernel.

Offline

#3 2023-11-25 16:53:30

stolichniaskitnik
Member
Registered: 2017-09-29
Posts: 34

Re: [SOLVED] Issues with nvidia-470xx-dkms on a VM with PCI passthrough

Thanks Videl, and sorry fr the delay.. Oh well, that was silly of me, but yes that was part of the issue.
After installing linux-headers and reinstalling the nvidia drivers the smi command no longer threw any errors.

Unfortunately the nvidia-smi command now spits out: no device found when ran eventho all the modules and everything seems to be loaded and the driver properly installed.
However when seaerching the web for my issue this seems to be more related with PCI passthrough on the proxmox side, rather than on the guest OS.

That being said as I believe the arch portion here is resolved, I can solve this topic.

Offline

Board footer

Powered by FluxBB