Hi, with nvidia-drm.modeset=1 is the system using the nvidia driver to render the console?
Without this parameter my ttys remains black when i shut down a virtual machine with gpu passthrough but,
with it, if i try to use the desktop via startx, the desktop is not rendering, loading but now showing.
This is my script:
#!/bin/bash
clear
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit 1
fi
videoid="10de 1c82"
audioid="10de 0fb9"
videobusid="0000:01:00.0"
audiobusid="0000:01:00.1"
function __unbind() {
modprobe vfio-pci
modprobe -r nvidia_uvm
sleep 1
modprobe -r nvidia_drm
sleep 1
modprobe -r nvidia_modeset
sleep 1
modprobe -r nvidia
sleep 1
# Kill the console to free the GPU
echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
# Detach the GPU from drivers and attach to vfio.
echo $videoid > /sys/bus/pci/drivers/vfio-pci/new_id
echo $audioid > /sys/bus/pci/drivers/vfio-pci/new_id
echo $videobusid > /sys/bus/pci/devices/$videobusid/driver/unbind
echo $audiobusid > /sys/bus/pci/devices/$audiobusid/driver/unbind
echo $videobusid > /sys/bus/pci/drivers/vfio-pci/bind
echo $audiobusid > /sys/bus/pci/drivers/vfio-pci/bind
}
function __bind() {
modprobe -r vfio_pci
sleep 1
modprobe -r vfio_iommu_type1
sleep 1
modprobe -r vfio
sleep 1
modprobe nvidia
sleep 5
# Re-Bind EFI-Framebuffer and Re-bind to virtual consoles
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/bind
echo 1 > /sys/class/vtconsole/vtcon0/bind
echo 1 > /sys/class/vtconsole/vtcon1/bind
}
__unbind
sleep 2
virsh start win10
sleep 5
while [ `pidof qemu-system-x86_64` ];do
sleep 2;
done
virsh destroy win10
sleep 2
__bind
Should i use this parameter or i am doing something wrong? If this is correct, how can i have my desktop rendering? Thank you :)