I have VM restart issues with Nobara Linux guest on 14.2-RELEASE-p2 host using Nvidia RTX 3060. I'd be happy to help out with testing but I would need a bit more hand-holding instructions. Should I apply this patch on top of the earlier patch posted on this thread?
I have VM restart issues with Nobara Linux guest on 14.2-RELEASE-p2 host using Nvidia RTX 3060. I'd be happy to help out with testing but I would need a bit more hand-holding instructions. Should I apply this patch on top of the earlier patch posted on this thread?
I tried now applying this on top of the other patches and building a world and kernel as per handbook quickstart instructions. My complete diff to the current head of releng/14.2 (ac2cbb46b5f1efa7f7b5d4eb15631337329ec5b2) is attached as nvidiadiff.txt
Sadly it does not seem to work. I ran `vm start nobara` after the reboot and it worked well. Then I shut down the VM from within the VM and ran `vm start nobara` again from host but I get no signal to my display.
The vm is alive. I have ollama server running there and I can connect to it and hear my GPU fans spin up as I perform prompts. But there is no signal to the display.
Let me know if I could help with any further testing or if I understood the assignment incorrectly.
There are some reports that the patch linked from the page introduced at Comment #2 here, but some others report it doesn't work, and some others reports worked if static const char bhyve_id[12] in /usr/src/sys/amd64/vmm/x86.c to some different value.
This makes me confused, but seemingly depending on what the guest OS (including versions, distros, variants) is.
I come to think that if its value alone is the culprit that makes the patch works or not, making it non-constant "variable" and allowing it to be overridden via config files and/or command line switch, with providing info which value to be set for specific OS (i.e. Centos7, Rocky Linux9, Windows10, Window11, ...) in bhyve(8) manpage would help.
But not sure it is allowed to be variable on guest side and, if it's unfortunately not, how to assure it to be constant but variable on base FreeBSD side should be investigated (as I'm not sure it is required to be immutable page or not. I'm not using bhyve).
Inside of the Ubuntu virtual machine I installed nvidida-535-drivers, rebooted and got the following:
Code:
jholloway@ubuntuvm:~$ nvidia-smi
Mon Apr 7 16:16:51 2025
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.183.01 Driver Version: 535.183.01 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 Quadro P4000 Off | 00000000:00:06.0 Off | N/A |
| 46% 35C P8 5W / 105W | 4MiB / 8192MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
+---------------------------------------------------------------------------------------+
So far it is working well. Plex running on the VM detects the card and is performing hardware transcoding as expected. It will even show the transcoding in nvidia-smi if I'm watching something on Plex at the time!
I have encountered one bug it seems where the VM didn't shutdown properly or something and the nvidia driver was unable to find the card. Even turning the VM off and on via the host didn't solve the problem. Fortunately when I rebooted the host and started the VM up again the problem had solved itself. I'm not sure what caused this bug as I have been unable to reproduce it, but I suspect it has something to do with either the Ubuntu VM being reset from either inside the VM, or by being shutoff from the command vm restart ubuntu_vm.
But aside from that hiccup, both the GPU passthrough and the Mellanox passthrough are working well.
I'm using FreeBSD 14.2 to run a Ubuntu virtual machine and have had success with the following:
I have encountered one bug it seems where the VM didn't shutdown properly or something and the nvidia driver was unable to find the card. Even turning the VM off and on via the host didn't solve the problem. Fortunately when I rebooted the host and started the VM up again the problem had solved itself. I'm not sure what caused this bug as I have been unable to reproduce it, but I suspect it has something to do with either the Ubuntu VM being reset from either inside the VM, or by being shutoff from the command vm restart ubuntu_vm.
But aside from that hiccup, both the GPU passthrough and the Mellanox passthrough are working well.
Nice! I haven't had this problem (running with an OEM dell 3090 for over a year now) which is a bit annoying as I can't figure out whats going wrong, I saw corvin mention the issue in a presentation somewhere.
I tried now applying this on top of the other patches and building a world and kernel as per handbook quickstart instructions. My complete diff to the current head of releng/14.2 (ac2cbb46b5f1efa7f7b5d4eb15631337329ec5b2) is attached as nvidiadiff.txt
Sadly it does not seem to work. I ran `vm start nobara` after the reboot and it worked well. Then I shut down the VM from within the VM and ran `vm start nobara` again from host but I get no signal to my display.
The vm is alive. I have ollama server running there and I can connect to it and hear my GPU fans spin up as I perform prompts. But there is no signal to the display.
Let me know if I could help with any further testing or if I understood the assignment incorrectly.
I am running 14.2-RELEASE. I followed the steps in https://dflund.se/~getz/Notes/2024/freebsd-gpu/ with the branch 14.2/nvidia-wip, and replaced the signature with 'KVMKVMKVM\0\0\0'. I pinned two host cpus to guest vcpus and passthroughed the GPU. nvidia-smi works under 535, 550, and 570 drivers:
Code:
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.124.06 Driver Version: 570.124.06 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce GTX 1650 Off | 00000000:00:01.0 Off | N/A |
| 50% 33C P8 7W / 75W | 1MiB / 4096MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.