How can I prevent my display manager from using dedicated GPU?

I have three monitors. Two of them are connected to the motherboard (Intel iGPU), and the third one is connected to my dedicated GPU (nvidia GTX 1060).

TLDR:
Whenever I boot Manjaro (KDE Plasma), it automatically loads SDDM on both the iGPU and the dGPU, so I get an extended desktop on all three monitors. I want to make it so the X server doesn’t use my dGPU at all, so only the two monitors connected to the iGPU (motherboard) are detected and used by Manjaro. I still want to be able to PRIME-offload programs to the dGPU whenever I need it by using the prime-run command.

More details:

I want to be able to do two things:
1. Pass my GPU (and the only monitor connected to it) to a Windows 10 VM with VFIO, so I can play windows-only games and VR.
2. Use the GTX 1060 on the Manjaro host with PRIME render offloading (prime-run) whenever I need it (when the VM is not running of course).

I can already do both of these one at a time. I have managed to successfully pass the GPU to a VM and I can use Windows on the third display, and I can also use the prime-run command to launch programs on the GPU when the VM is not running.

The problem is that currently SDDM is killed by the libvirt hook script whenever I launch the VM. This doesn’t make sense, because SDDM is supposed to be running on the iGPU, and not the dGPU because my two “linux monitors” are plugged into the motherboard. I assume I can’t just simply comment out the line in the hook files that stops the sddm service, because as I said in the tldr, Manjaro automatically loads a desktop on the nvidia monitor when it boots, and I assume I can’t start a VM with GPU-passthrough without stopping the sddm service, if the GPU is already being used by sddm.

My ultimate goal is to have a fully GPU-accelerated Windows 10 VM running on the one monitor that is connected to the 1060, and at the same time, running SDDM and KDE Plasma on the other two monitors that are connected to the integrated intel iGPU. Maybe I could even use a program like Synapse to seamlessly move my mouse between the Win10 VM and Manjaro. It is also important that I want to be able to prime-run programs (aka use the 1060) on the linux host whenever the VM is turned off, without having to reboot my computer.

In theory, this should all be possible, because SDDM is already running on the iGPU, so I should be able to pass the dGPU to a VM without having to shut down SDDM.

I think what’s happening is called Reverse PRIME where the iGPU is the primary GPU and it’s sending images to the monitor connected to the dGPU. I guess what I need to do is disable this feature, but I don’t know how.

This is my qemu startup hook script. The shutdown script is roughly the same but with the opposite commands in the opposite order. http//ix(dot)io/2EDc

1 Like