diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/kooking-glass-compiled-for-d700-host.7z b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/kooking-glass-compiled-for-d700-host.7z new file mode 100644 index 0000000..523e400 Binary files /dev/null and b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/kooking-glass-compiled-for-d700-host.7z differ diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/looking-glass-host-drivers-d700e19a.zip b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/looking-glass-host-drivers-d700e19a.zip new file mode 100644 index 0000000..77c67a5 Binary files /dev/null and b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/looking-glass-host-drivers-d700e19a.zip differ diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/mark-c_windows_10+8.x+7_mouse-fix.zip b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/mark-c_windows_10+8.x+7_mouse-fix.zip new file mode 100644 index 0000000..d055f52 Binary files /dev/null and b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/mark-c_windows_10+8.x+7_mouse-fix.zip differ diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/spice-guest-tools-latest.exe b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/spice-guest-tools-latest.exe new file mode 100644 index 0000000..3a594c9 Binary files /dev/null and b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/spice-guest-tools-latest.exe differ diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/virtio-win10-prewhql-0.1-146.zip b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/virtio-win10-prewhql-0.1-146.zip new file mode 100644 index 0000000..f09dce5 Binary files /dev/null and b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Looking Glass/virtio-win10-prewhql-0.1-146.zip differ diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/README.md b/src/VGA Passthrough/VGA Passthrough (Manjaro)/README.md new file mode 100644 index 0000000..3e0f509 --- /dev/null +++ b/src/VGA Passthrough/VGA Passthrough (Manjaro)/README.md @@ -0,0 +1,30 @@ +# Passthrough Helper for Manjaro + +Run this script using su instead of sudo. The ">" redirects of echo will not work otherwise. + + +# Edit /etc/default/grub + +intel_iommu=on (or) amd_iommu=on\ +rd.driver.pre=vfio-pci\ +kvm.ignore_msrs=1 + + +# Edit /etc/mkinitcpio.conf + +MODULES="vfio_pci vfio vfio_iommu_type1 vfio_virqfd"\ +FILES="/usr/bin/vfio-pci-override.sh"\ +Hooks="... vfio ...." + + +# Tutorial + +* https://www.youtube.com/watch?v=QlGx0XvWuag + +# "Error 43: Driver failed to load" on Nvidia GPUs passed to Windows VMs +* https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#%22Error_43:_Driver_failed_to_load%22_on_Nvidia_GPUs_passed_to_Windows_VMs + +# Sources + +* https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Using_identical_guest_and_host_GPUs +* https://forum.manjaro.org/t/virt-manager-fails-to-detect-ovmf-uefi-firmware/110072 diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/list_iommu_groups.sh b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/list_iommu_groups.sh new file mode 100644 index 0000000..e889899 --- /dev/null +++ b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/list_iommu_groups.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# . CONFIG.sh + +# set -o xtrace ## To debug scripts +# set -o errexit ## To exit on error +# set -o errunset ## To exit if a variable is referenced but not set + + +function main() { + SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )" + cd "${SCRIPTPATH}" + echo "Working Dir: " $(pwd) + + shopt -s nullglob + for d in /sys/kernel/iommu_groups/*/devices/*; do + n=${d#*/iommu_groups/*}; n=${n%%/*} + printf 'IOMMU Group %s ' "$n" + lspci -nns "${d##*/}" + done; +} +main $@; diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/manjaro_help.sh b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/manjaro_help.sh new file mode 100644 index 0000000..ba6e063 --- /dev/null +++ b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/manjaro_help.sh @@ -0,0 +1,54 @@ +# Sources: +# https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Using_identical_guest_and_host_GPUs +# https://forum.manjaro.org/t/virt-manager-fails-to-detect-ovmf-uefi-firmware/110072 + +VERSION=`lsb_release -r | cut -d ' ' -f 2 | cut -d '.' -f 1` + +# Backup files + +mkdir Backup +chmod +x uninstall.sh + +cp /etc/default/grub Backup +cp /etc/mkinitcpio.conf Backup + +# Edit grub amd_iommu=on or intel_iommu=on rd.driver.pre=vfio-pci kvm.ignore_msrs=1 + +nano /etc/default/grub +update-grub + +# Install required packages + +pacman -S vim qemu virt-manager ovmf dnsmasq ebtables iptables + +# Allow libvirt to autostart + +systemctl enable libvirtd.service + +# Copy necessary files + +cp vfio-pci-override.sh /usr/bin/vfio-pci-override.sh +chmod +x /usr/bin/vfio-pci-override.sh +cp vfio-install /etc/initcpio/install/vfio +cp vfio-hooks /etc/initcpio/hooks/vfio +cp vfio.conf /etc/modprobe.d/ + +# Edit mkinitcpio.conf + +# MODULES="vfio_pci vfio vfio_iommu_type1 vfio_virqfd" +# FILES="/usr/bin/vfio-pci-override.sh" +# HOOKS="... vfio ...." + +nano /etc/mkinitcpio.conf +mkinitcpio -P + +# Workaround libvirt bug in previous versions of Manjaro: +# https://forum.manjaro.org/t/virt-manager-fails-to-detect-ovmf-uefi-firmware/110072 + +if [ $VERSION -lt 20 ] + then + echo 'nvram = [ "/usr/share/ovmf/x64/OVMF_CODE.fd:/usr/share/ovmf/x64/OVMF_VARS.fd" ]' >> /etc/libvirt/qemu.conf + mkdir -p /etc/qemu/firmware + sed 's#qemu/edk2-x86_64-code.fd#ovmf/x64/OVMF_CODE.fd#;s#qemu/edk2-i386-vars.fd#ovmf/x64/OVMF_VARS.fd#' < /usr/share/qemu/firmware/60-edk2-x86_64.json > /etc/qemu/firmware/10-ovmf-workaround.json + systemctl restart libvirtd +fi diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/uninstall.sh b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/uninstall.sh new file mode 100644 index 0000000..3802e68 --- /dev/null +++ b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/uninstall.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# . CONFIG.sh + +# set -o xtrace ## To debug scripts +# set -o errexit ## To exit on error +# set -o errunset ## To exit if a variable is referenced but not set + + +function main() { + SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )" + cd "${SCRIPTPATH}" + echo "Working Dir: " $(pwd) + + + rm /usr/bin/vfio-pci-override.sh + rm /etc/initcpio/install/vfio + rm /etc/initcpio/hooks/vfio + rm /etc/modprobe.d/vfio.conf + + + if [ -a Backup/grub ] + then + rm /etc/default/grub + cp Backup/grub /etc/default/ + fi + + if [ -a Backup/mkinitcpio.conf ] + then + rm /etc/mkinitcpio.conf + cp Backup/mkinitcpio.conf /etc/ + fi + + mkinitcpio -P +} +main $@; diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/vfio-hooks b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/vfio-hooks new file mode 100644 index 0000000..7fed0c8 --- /dev/null +++ b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/vfio-hooks @@ -0,0 +1,6 @@ +#!/usr/bin/bash + +run_hook() { + msg ":: Triggering vfio-pci override" + /bin/sh /usr/bin/vfio-pci-override.sh +} diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/vfio-install b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/vfio-install new file mode 100644 index 0000000..4e5b689 --- /dev/null +++ b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/vfio-install @@ -0,0 +1,23 @@ +#!/bin/bash + +# . CONFIG.sh + +# set -o xtrace ## To debug scripts +# set -o errexit ## To exit on error +# set -o errunset ## To exit if a variable is referenced but not set + + +build() { + add_file /usr/bin/vfio-pci-override.sh + add_runscript +} + +function main() { + SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )" + cd "${SCRIPTPATH}" + echo "Working Dir: " $(pwd) + + build + +} +main $@; diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/vfio-pci-override.sh b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/vfio-pci-override.sh new file mode 100644 index 0000000..039ad2c --- /dev/null +++ b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Scripts/vfio-pci-override.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# . CONFIG.sh + +# set -o xtrace ## To debug scripts +# set -o errexit ## To exit on error +# set -o errunset ## To exit if a variable is referenced but not set + + +function main() { + SCRIPTPATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )" + cd "${SCRIPTPATH}" + echo "Working Dir: " $(pwd) + + + for i in /sys/bus/pci/devices/*/boot_vga; do + if [ $(cat "$i") -eq 0 ]; then + GPU="${i%/boot_vga}" + AUDIO="$(echo "$GPU" | sed -e "s/0$/1/")" + echo "vfio-pci" > "$GPU/driver_override" + if [ -d "$AUDIO" ]; then + echo "vfio-pci" > "$AUDIO/driver_override" + fi + fi + done + + modprobe -i vfio-pci +} +main $@; diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/Video/Easiest GPU Passthrough Guide (Manjaro).mkv b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Video/Easiest GPU Passthrough Guide (Manjaro).mkv new file mode 100644 index 0000000..afcffaf Binary files /dev/null and b/src/VGA Passthrough/VGA Passthrough (Manjaro)/Video/Easiest GPU Passthrough Guide (Manjaro).mkv differ diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/gpu-passthrough.pdf b/src/VGA Passthrough/VGA Passthrough (Manjaro)/gpu-passthrough.pdf new file mode 100644 index 0000000..7f37b76 Binary files /dev/null and b/src/VGA Passthrough/VGA Passthrough (Manjaro)/gpu-passthrough.pdf differ diff --git a/src/VGA Passthrough/VGA Passthrough (Manjaro)/vfio.conf b/src/VGA Passthrough/VGA Passthrough (Manjaro)/vfio.conf new file mode 100644 index 0000000..d57c17e --- /dev/null +++ b/src/VGA Passthrough/VGA Passthrough (Manjaro)/vfio.conf @@ -0,0 +1,2 @@ +install vfio-pci /usr/bin/vfio-pci-override.sh +options vfio-pci disable_vga=1 allow_unsafe_interrupts=1