(EE) no screens found(EE) whyle trying to enable the nvidia driver on Debian 11 emulated with bhyve

root@marietto:/etc/modprobe.d# nano nvidia.conf

options nvidia NVreg_ResmanDebugLevel=0
options NVreg_RegistryDwords=“OverrideMaxPerf=0x1”

root@marietto:/etc/modprobe.d# sudo update-initramfs -u

libkmod: ERROR …/libkmod/libkmod-config.c:657 kmod_config_
parse: /etc/modprobe.d/nvidia.conf line 2: ignoring bad lin
e starting with ‘options’

Did you already check if the gpu works correctly in a bare metal setup? Ruling out that your not trying to use a dead gpu…

In case the nvidia module can’t be found, it’s likely the driver compilation failed, please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

The correct syntax for the modprobe config is

options nvidia NVreg_ResmanDebugLevel=0 NVreg_RegistryDwords=“OverrideMaxPerf=0x1”

Hello. My gpu works correctly in bare metal and also inside a vm that I’ve created under linux with qemu + kvm. First of all I’ve found what’s the working configuration on Linux and then I’ve used it on Freebsd with bhyve and I’ve seen that it does not work. In addition today I’ve removed the GTX 1060 totally from the PC and it’s place has been taken by the RTX 2080 ti. Now I have one only graphic card on my system. And it does not work the same. It didn’t matter that I’ve moved the RTX 2080 ti on the slot 2.

dmesg-log (91.7 KB)
lspci-log (791 Bytes)
xorg.conf (1.4 KB)

ok. options nvidia NVreg_ResmanDebugLevel=0 NVreg_RegistryDwords=“OverrideMaxPerf=0x1” has been accepted…but I’m using the driver 470,not the 460. The 460 does not work as I’ve shown above. I will try again to reinstall 460.

below I have attached the logs of the same configuration that works on linux but not on freebsd…

Xorg.0.log (5.5 KB)
xorg.conf (4.3 KB)
lspci-log (1.9 KB)
log-dsm-kvm (447.2 KB)

I tried with Debian 10 and Debian 11,the following procedure,but it never worked. I don’t know why : (under Linux,with qemu + kvm). Instead,it worked with debian 11 + cuda 11 and nvidia driver 470,as u have probably seen the messages that I’ve posted before this.

wget https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda-repo-debian10-11-2-local_11.2.2-460.32.03-1_amd64.deb

sudo dpkg -i cuda-repo-debian10-11-2-local_11.2.2-460.32.03-1_amd64.deb

sudo apt-key add /var/cuda-repo-debian10-11-2-local/7fa2af80.pub

sudo add-apt-repository contrib

sudo apt-get update

sudo apt-get -y install cuda

nano /root/.bashrc

export PATH="/usr/local/cuda/bin:$PATH"

export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"

source .bashrc

REBOOT

nvidia-smi

unable to determine the device handle for gpu 0000:05:00.0 : unknown error.

Instead,the instructions below worked like a charm on debian 11. I’m so sure that there is a bug on the cuda packages 11.2.2 when they are installed on debian 10 and even 11.

wget https://developer.download.nvidia.com/compute/cuda/11.4.1/local_installers/cuda-repo-debian10-11-4-local_11.4.1-470.57.02-1_amd64.deb
sudo dpkg -i cuda-repo-debian10-11-4-local_11.4.1-470.57.02-1_amd64.deb
sudo apt-key add /var/cuda-repo-debian10-11-4-local/7fa2af80.pub
sudo add-apt-repository contrib
apt-get update
apt-get cuda
apt-get install cuda

cuda 11.2 also contains driver 460, if it doesn’t install, I’dd guess the kernel is too new so it doesn’t compile.
The option OverrideMaxPerf is broken/ignored by drivers 470 and up.

nope. I’ve installed cuda 11.2 and the driver 460 on debian 10 and 11. It does not work in both cases. Cuda 11.2 and driver 460 have been created for debian 10 and I’ve used debian 10. They don’t work. I don’t remember if I have added the OverrideMaxPerf on Debian 10 + cuda 11.2 + driver 460,but I can do it now.

Please run nvidia-bug-report.sh as root with the 460 drivers installed and attach the resulting nvidia-bug-report.log.gz file to your post.

wait a moment. I’d thought to do that,but I’m not sure that it will be accepted if I use the debian packages,do u agree ? nvidia takes care only of the official .run installers. do u agree ? If I use deb packages they could easily tell me to ask to the debian developers.

point 3 of the rules :

  • In case of NVIDIA Linux graphics driver installation problems (when using one of the official .run installers), please attach the NVIDIA installer log file, /var/log/nvidia-installer.log .

instead,right now I tried with this deb package :

cuda-repo-debian10-11-2-local_11.2.2-460.32.03-1_amd64.deb

maybe the bug in inside this deb package and Debian should care about it,not nvidia.

anyway,I’ve added the options you suggested and it still does not work :

the nvidia-bug-report.log is for me to have a look at it, not nvidia.

ohhh ok. now I understand…ok…I’m going to attach it here…I wil send you a personal message,since maybe inside the file there are personal informations…done. check your personal messages.

The driver was correctly installed. To make sure, this is from the debian running on top of kvm? Did you set the hypervisor to hidden there?

yes. it runs on top of qemu and kvm. No,I forgot to hide the hypervisor. BUT,if this cares,why,installing : cuda-repo-debian10-11-4-local_11.4.1-470.57.02-1_amd64.deb,the problem is not present ? I should see the same error,since I keep the hypervisor not hidden in both cases.

Like you mentioned in your early posts, consumer gpu passthrough regulations have changed beginning with v465. Whether this applies to the linux driver or only to the windows driver, is not known to me, infos are scarce.

I know,but I read from nvidia that it is valid only for the Windows driver. Anyway,for sure I can hide it and check.

This problem is fixed. Hiding the hypervisor worked. Now can we come back where we started ? to the earlier problem ? to bhyve. I will go under FreeBSD and I will try if this working vm runs even there.

Since the errors were the same with unhidden kvm and bhyve, I guess there more to hide in bhyve than just the vm bit from cpuid. Here’s the commit to qemu to hide kvm:
https://github.com/qemu/qemu/commit/f522d2acc549dd11f495048330aa5f3f424a7dfa

Instead of hiding things, you could also try to patch bhyve to set the kvm signature, maybe this will fool the nvidia driver 470+ enough.

good suggestions.