From 49a531af244f1d5db97be913f651cd1dc9bbc417 Mon Sep 17 00:00:00 2001 From: rc14193 <62862738+rc14193@users.noreply.github.com> Date: Mon, 29 Jan 2024 22:03:51 -0500 Subject: [PATCH 1/4] Improve readme readability --- GPU_passthrough/readme.md | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/GPU_passthrough/readme.md b/GPU_passthrough/readme.md index de3e54e..0f3bbe8 100644 --- a/GPU_passthrough/readme.md +++ b/GPU_passthrough/readme.md @@ -4,39 +4,44 @@ Intel VT-d & VT-x – Intel Compatible list All AMD CPUs from Bulldozer onwards should be compatible. 2) Get device IDs: -lspci -nn +`lspci -nn` 3) Enable IOMMU in GRUB (check Intel or AMD commands below - choose the right one) nano /etc/default/grub -GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt" -GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on" -save and exit -5) run the command "update-grub" -now reboot +`GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt"` -6) Enable VFIO Modules -nano /etc/modules +`GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on"` + +Save and exit + +4) run the command `"update-grub"` now reboot + +5) Enable VFIO Modules +`nano /etc/modules` Add the following modules: +``` vfio vfio_iommu_type1 vfio_pci vfio_virqfd +``` Then, save and exit -Next run: -update-initramfs -u -k all -and reboot +6) `update-initramfs -u -k all` and reboot 7) GPU Isolation From the Host (amend the below to include the IDs of the device you want to isolate) -echo "options vfio-pci ids=10de:1381,10de:0fbc disable_vga=1" > /etc/modprobe.d/vfio.conf + +`echo "options vfio-pci ids=10de:1381,10de:0fbc disable_vga=1" > /etc/modprobe.d/vfio.conf` 8) Blacklist GPU drivers (here are all that you would ever need) +``` echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf echo "blacklist nvidia" >> /etc/modprobe.d/blacklist.conf echo "blacklist nvidiafb" >> /etc/modprobe.d/blacklist.conf echo "blacklist nvidia_drm" >> /etc/modprobe.d/blacklist.conf +``` 9) Create a new VM and add the GPU via hardware menu You may need to set it as primary GPU From 885ccf9ad4c55563f6aae88b7ed726b2e4640698 Mon Sep 17 00:00:00 2001 From: rc14193 <62862738+rc14193@users.noreply.github.com> Date: Mon, 29 Jan 2024 22:08:12 -0500 Subject: [PATCH 2/4] Add IOMMU verify line from video --- GPU_passthrough/readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GPU_passthrough/readme.md b/GPU_passthrough/readme.md index 0f3bbe8..9265a90 100644 --- a/GPU_passthrough/readme.md +++ b/GPU_passthrough/readme.md @@ -13,6 +13,8 @@ nano /etc/default/grub `GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on"` +Verify that IOMMU is enabled by running `dmesg | grep -e DMAR -e IOMMU` and looking for a line indicating it is enabled + Save and exit 4) run the command `"update-grub"` now reboot From 4062f01df1d1e79619ed6ed79c15cf6cf85025cc Mon Sep 17 00:00:00 2001 From: rc14193 <62862738+rc14193@users.noreply.github.com> Date: Mon, 29 Jan 2024 22:10:25 -0500 Subject: [PATCH 3/4] Add modules verify line from video --- GPU_passthrough/readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GPU_passthrough/readme.md b/GPU_passthrough/readme.md index 9265a90..b83220e 100644 --- a/GPU_passthrough/readme.md +++ b/GPU_passthrough/readme.md @@ -32,7 +32,9 @@ Then, save and exit 6) `update-initramfs -u -k all` and reboot -7) GPU Isolation From the Host (amend the below to include the IDs of the device you want to isolate) +Verify the modules are enabled with `dmesg | grep -i vfio` and checking the driver version line is present + +8) GPU Isolation From the Host (amend the below to include the IDs of the device you want to isolate) `echo "options vfio-pci ids=10de:1381,10de:0fbc disable_vga=1" > /etc/modprobe.d/vfio.conf` From e0fcbf354cbb4195c64bf1954cd7f72f272f7fda Mon Sep 17 00:00:00 2001 From: rc14193 <62862738+rc14193@users.noreply.github.com> Date: Mon, 29 Jan 2024 22:21:56 -0500 Subject: [PATCH 4/4] Add reboot note after blacklist --- GPU_passthrough/readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GPU_passthrough/readme.md b/GPU_passthrough/readme.md index b83220e..46c047b 100644 --- a/GPU_passthrough/readme.md +++ b/GPU_passthrough/readme.md @@ -47,6 +47,9 @@ echo "blacklist nvidiafb" >> /etc/modprobe.d/blacklist.conf echo "blacklist nvidia_drm" >> /etc/modprobe.d/blacklist.conf ``` +Reboot your machine, be sure to use the web gui because with the gpu passed through you will no longer get video out. +The start up will begin but then appear to hang even though proxmox has started fine. + 9) Create a new VM and add the GPU via hardware menu You may need to set it as primary GPU You may need to add a ROM BAR