nvidia-drm.modeset=1, desktop not showing.

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:



if [ "$EUID" -ne 0 ]
  then echo "Please run as root"
  exit 1

videoid="10de 1c82"
audioid="10de 0fb9"

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


sleep 2

virsh start win10

sleep 5

while [ `pidof qemu-system-x86_64` ];do
	sleep 2;

virsh destroy win10

sleep 2


Should i use this parameter or i am doing something wrong? If this is correct, how can i have my desktop rendering? Thank you :)

Please run nvidia-bug-report.sh as root in the failure case and attach the resulting .gz file to your post. Hovering the mouse over an existing post of yours will reveal a paperclip icon.