4 ms·
Because it's (well, at least 6 months ago was, now it could have improved) the only solution to reuse the GPU without rebooting X. With a practical example: 1
by jbmorgado 10y ago
Because it's (well, at least 6 months ago was, now it could have improved) the only solution to reuse the GPU without rebooting X.
With a practical example:
1 - You boot up your Linux base system.
2 - You fire up KVM with GPU PCI passthrough with a Windows guest to play some games.
3 - You shutdown windows.
Now you can't use the GPU anymore, the module was assigned by KVM and you can't - for instance - run a CUDA simulation in the Linux host. You need to reboot X (you don't need to reboot the system).
The workaround/solution is to fire up KVM with GPU PCI passthrough to another guest (This time a Linux guest) and in there you will have full access to the GPU to do CUDA computations (or whatever else you want).
- pavanky 10y agoAh I see, that makes more sense. If you had two NVIDIA GPUs while one of them was passed through to a guest then I think that problem may still exist. However if you only have one nvidia gpu (and have a different kind of gpu for display), then I think simply running "sudo rmmod vfio" "sudo modprobe nvidia" would work.
- pYQAJ6Zm 10y ago>Now you can't use the GPU anymore, the module was assigned by KVM and you can't - for instance - run a CUDA simulation in the Linux host. Maybe we had different setups, so this wouldn’t apply – I used to unbind the device with the following script, and then load the `nvidia` module; the device was then available on the host: for dev in "0000:01:00.0" "0000:01:00.1"; do if [ -e /sys/bus/pci/devices/${dev}/driver ]; then echo "${dev}" > /sys/bus/pci/devices/${dev}/driver/unbind fi done