You are not logged in.
Pages: 1
Hi,
I am tying to make a Windows VM with KVM with PCI passtrough, and I need some help for doing that.
First, here is my setup :
Laptop : IdeaPad Gaming 3 15ARH05
CPU : AMD Ryzen 5 4600H
GPU : Integrated radeon graphics ; nvidia GTX 1650
Monitors : 1 integrated in the laptop and 1 external monitor plugged with HDMI
Logicial part :
Operating system : Arch linux
Desktop environment : Kde plasma
Display server : X11
My goal (if it's possible) is to make something like this :
When I start my laptop, I would have arch linux running on my 2 monitors, with optimus-manager to handle hybrid graphics
I would have a script that starts Windows in a VM (with KVM) on my external monitor, with the nvidia GPU (without restarting my laptop)
I would have a script which stop the VM and get back to the initial configuration (without restarting my laptop too)
I have 2 problems, the first one is unloading the nvidia drivers and enable VFIO without a restart :
For unloading nvidia drivers without blacklist them in /etc/modprobe.d/blacklist.conf (because I need to acess them in arch linux if the VM is not started), I use `modprobe -r nvidia`, which works fine.
My problem is when I enable VFIO and disable nvidia drivers, commands to check if vfio works fine show nothing (the commands I use are : lsmod | grep vfio , dmesg | grep vfio-pci and dmesg | grep VFIO)
Here is how I enabled VFIO :
added this line to /etc/default/grub :
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on"created /etc/initramfs-tools/modules :
vfio-pci ids=1002:67ef,1002:aae0
vfio
vfio_iommu_type1
vfio_pci
vhost-netupdate grub and initramfs :
sudo grub-update
sudo mkinitcpio -PIs it my VFIO configuration that goes wrong or do I need to blacklist nvidia drivers in modprobe for VFIO works ? (Is it possible to acess to nvidia GPU in arch linux if I blacklist drivers ?)
My second problem is about one thing that I read here (sorry it's not english) that I need to connect two cables from my laptop to my screen, but I have only 1 HDMI port on my laptop (no VGA port), is there any way to solve this problem ?
I read the archwiki on PCI passthrough but I didn't find solutions to my problems.
Last edited by Quentolosse (2023-03-06 18:57:23)
Offline
created /etc/initramfs-tools/modules
…
sudo update-initramfs -u
Is this a Debian/Ubuntu system?
pacman -Qo update-initramfsOffline
Oh sorry, I did this command :
sudo mkinitcpio -P(I updated original post)
Offline
/etc/initramfs-tools would also not exist or be completely irrelevant.
https://wiki.archlinux.org/title/Kernel … le_options
Offline
Ok, thanks you, I'll try as soon as I have enough time. I keep you up to date !
Last edited by Quentolosse (2023-03-01 20:57:15)
Offline
Thanks for your help, I made a little shell script that unload nvidia driver and set vfio driver instead :
#!/bin/bash
systemctl stop sddm.service &&
modprobe -r nvidia_drm nvidia_modeset nvidia &&
modprobe vfio_pci vfio vfio_iommu_type1 vfio_virqfd &&
systemctl start sddm.serviceMy second problem is about one thing that I read that I need to connect two cables from my laptop to my screen, but I have only 1 HDMI port on my laptop (no VGA port), is there any way to solve this problem ?
Can you help me about this problem?
Offline
I'm not gonna read that much french, but that's probably for a different context.
If you have only one monitor, but two GPUs and you want to use both GPUs w/ the same monitor, you'll need to wire both of them to the monitor (and switch the input there) - otherwise not.
So if you intend to use the internal display on your laptop w/ the IGP and the external monitor (HDMI) w/ the nvidia GPU (whether or not it's currently passed through) you need to attach the monitor to the nvidia GPU w/ one cable and that's it.
Offline
Pages: 1