Shutting Down VM causes Log Out

Hello all,

Using Ubuntu MATE and through Virtual Machine Manager I was able to successfully pass through the iGPU of my 11600k to a VM. As the title alludes, once I shutdown the VM I am logged out completely with all my windows closed. Anyone have any thoughts on this?

WWED

I don’t know if this is related, but double-check Virtualization settings in BIOS. Additionally make sure Memory Protection is enabled. Both of those are under Security on my laptop, but may be somewhere else.

Virtualization is for sure. Will check on the memory one. Haven’t heard of that yet

The only time I messed with it it seemed to prevent signals from crossing between VMs and the underlying system. In my case it was running shutdown in a VM would shut down the whole box. I don’t know if it ties into your issue, but it might be worth a shot.

1 Like

I’ve had this problem when the passed-through GPU wasn’t properly hidden from my host. Do you have a dedicated GPU for your host or are you sharing the iGPU and doing single GPU passthrough?

1 Like

3080ti as my primary. Trying to keep my 2nd pcie slot clear.

I haven’t tried this with an Intel iGPU but here is my “scorched earth” approach to isolating a GPU for pass through:

  1. Make sure the vfio_pci.ids= are set appropriately in the kernel command line
  2. Add vfio_pci.disable_vga=1 to the command line
  3. Make sure vfio_pci loads early…
    How exactly to do this will vary by operating system; in Debian/Ubuntu I add these lines to my /etc/initramfs-tools/modules file:
    • vfio
    • vfio_iommu_type1
    • vfio_pci
    • vfio_virqfd
  4. Make sure PCI Express Graphics is set to the primary display output in the BIOS, otherwise you might have to add video=efifb:off to the command line
  5. Add module_blacklist= to the command line with the appropriate Linux drivers that you want to prevent loading, e.g.:
    • nouveau for NVIDIA
    • amdgpu for AMD
    • I don’t know what it is for Intel and my only system with an Intel iGPU is offline right now… maybe i915?

Don’t forget to update the initramfs (in Debian/Ubuntu, update-initramfs -k all -u) and grub configuration (in Debian/Ubuntu, update-grub).

Obviously this only works if you have two different brands of GPU. And it’s probably overkill… you may not need all these steps and there may be lighter-touch ways to accomplish the same results. But if this “fixes” the problem you at least have a known-good place to start and work backward from. Good luck!

ETA: I think the alternative approach is to hide the passed-through GPU from the display manager instead of trying to hide it from the operating system, so keep that in mind if you’re looking for another angle to crack this nut.

2 Likes

Ooph, whenever I mess with initramfs I always f it up and ruin my setup

Thanks for the advice

is there a file I would update or is this all in grub at boot. The later is difficult for me.

1 Like

Another way is to blacklist the PCIe devices manually. You can test if it helps first by writing 1 tothe remove character device assosicated with it under sysfs